Installation fails: wrong PHP version?

3 posts / 0 new
Last post
Installation fails: wrong PHP version?

Hi. I'm returning to CWIS after a couple of years absence to see if I can use it to replace an existing static site with a proper repository with proper metadata. Sadly, I'm hitting problems installing it, as I did before. I'm trying to install in Windoze 8 under XAMPP. The problems, in order of appearance, are:

1. The installation form won't accept a blank value in the MySQL password box. Fair enough, perhaps, but XAMPP defaults to root/blank for the MySQL pass. So that required changing the password using XAMPP security console. No big, but perhaps one to flag.

2. I ran http://localhost/cwis/installcwis.php, and filled in the form and hit the button. A shedload of PHP notices appeared, along the lines of: "Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\xampp\htdocs\cwis\lib\AxisPHP\Axis--Database.php on line 59".

Ok, fair enough - PHP notices can be ignored or suppressed. However, the output finished with:

""Errors Encountered:
Error creating administrator account (9).
Error creating administrator account (10)."

Which of course is fatal. I note that the sysreqs for CWIS are:

"CWIS 3.1.1 requires a web server with PHP 5.2.1 and MySQL 5.0 or later."

The latest XAMPP has PHP 5.6.3, MySQL 5.6.21 and Apache 2.4.10. I'm guessing that the above problems are caused by CWIS not being compatible with these newer versions - is that correct? If so, when is it likely to be compatible? If it's not a version problem, could folk please suggest solutions?

There isn't a downloadable XAMPP which goes back to 5.2.1 and MySQL 5.0, and even if there were I'd prefer not to use it as I use XAMPP for many other localhost applications (eg Wordpress, Joomla, Moodle) so I want to stay current.

This isn't important - I'm just after testing CWIS locally, so if I can't get it going then I'll give it a miss. It's probably a bit over the top for my requirements anyway.


Re: Installation fails: wrong PHP version?

We're actually quite interested in providing explicit support for running under XAMPP for future CWIS releases.  And we have successfully installed and run CWIS version 3.1.1 under XAMPP.  In other words, there is not a compatibility problem that we are aware of.

As you noted, newer versions of PHP dislike the mysql functions that our database layer uses. We'll be rewriting that portion of our code to please newer PHP in the near future. In the short term, the warnings can be silenced by changing the mysql_connect() call in the referenced file to @mysql_connect().

The errors you report are for "Illegal Password". CWIS wants a password that is at least 6 characters long. Admittedly, our installer should do a much better job expressing this requirement to the user and reporting errors with it.

I suspect that if you try the install with a longer password, it should succeed.

Re: Installation fails: wrong PHP version?

Thanks for the reply, and sorry for not coming back earlier but I didn't receive an email notification :(

I'll suppress the notices as you suggest, and also try a better password (I think I was using admin/admin or somesuch as it was only on localhost). As you write, it would be useful if a better error message appeared on form submission, or the form element label stated the password rules. Maybe better, use a jQuery script to enforce client-side password rules? I've done this on a couple of my sites, though I can't off the top of my head remember which library I used.

Having been a passive but grateful subscriber to the Scout Project going back to the mid-90s, I am rather keen to get my teeth into CWIS :)