Wednesday, November 14th, 2007

Web Server Install

After the adventures that I had a few weeks ago trying to install XAMPP and WAMP5, having to manually edit the config files, and still not being able to get either of them to work, I decided to have another go - this time with separate installs for Apache, PHP, mySQL, and phpMyAdmin.

The individual installs were somewhat more awkward than the all in one install in that in each case manual edits of config files were required but it did make testing each component part much easier so as to allow me to get it all up and running properly (eventually).

First for Apache I downloaded the windows installer version and ran that. The Apache install ran smoothly and the service was automatically installed. One step done with no issues at all.

I next tried to run the windows installer version of PHP but it just completely refused to run giving error messages almost as soon as I started the install. I therefore downloaded the zip file version and extracted it manually. A number of manual edits to the php.ini file from the PHP install and the httpd.conf file from the Apache install were needed to configure the extensions that I wanted and to attach PHP into the web server. Setting the right values to get the extensions working took a while but I eventually managed to get a web page working that I knew uses the GD graphics extension.

The windows installer version of mySQL ran as smoothly as the Apache one did. The mySQL service installed automatically and mySQL was running quite happily, unfortunately not from the web server though. It took a while to track down that the mySQL extension needed to be enabled AND the libmysql.dll file from the PHP install needed to be found from the system path in order for PHP and mySQL to be able to communicate with one another.

The phpMyAdmin install also ran smoothly and the database creates worked BUT when I tried to import the tables I got the exact same error as I had with the XAMPP and WAMP5 installs. At least this time I had a better idea of what was and wasn’t working to be able to investigate further.

Rinning a PHP script that contained mySQL to create a table worked fine so that showed that PHP and mySQL were working properly together so the problem appeared to relate to phpMyAdmin - to be more specific it appeared to relate to the import.php file. I eventually tracked it to the entered file name not being passed to the module. It looked like for some reason either cookies or sessions were not running properly in the browser. As I had been testing with Firefox, I decided to try tests with Safari and IE7 and see if either of those would work. No such luck they all gave the same error meaning that the problem wasn’t in the browser settings. I decided to take a look at the Firewall settings since that seemed the only place that could be affecting all three browsers.

By turning off settings in ZoneAlarm one at a time I eventually got a different response. I have no idea why but the setting to disable vbScript in the privacy settings in ZoneAlarm was causing the problem.

So now instead of an error message the script was just stopping with a blank screen. I decided to try using the SQL page instead of the import page and just run pieces of the code there instead of trying to run the entire database upload at once. That worked perfectly so it was back to the php.ini file to increase the timeout limits and I now have a completely up to date web server setup on my Windows XP computer that uses Apache 2.2.6, PHP 5.2.5, mySQL 5.0, and phpMyAdmin 2.11.2 as well as my Windows NT4 computer running Apache 1.3, PHP 4.4.4, mySQL 3.21 and phpMyAdmin 2.5.7. That should ensure that all the scripts that I write should work on just about any version of those products that are likely to be in current use.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Furl
  • description
  • StumbleUpon

Tags: , , , , , , ,

Leave a Reply