Categorized | News

Setting up PHP5 and MySQL on WinXP

Posted on 03 January 2004 by Demian Turner

Thanks to Perry Lewis who sent in this guide to getting up and running with PHP5, MySQL, Apache2 on WinXP:

Here’s what had to be done to getting it working on Windows XP:

Server Configuration:
Windows XP
Apache 2.0.48
PHP 5.0 Beta 3 (running SAPI DLL php4apache2.dll – PHP.ORG states they will rename the file to php5apache2.dll once PHP 5 is released for production)
MySQL 4.0.16

Steps to Setup:

  1. After the initial installation and configuration of PHP 5, copy ALL DLL’s in PHP ‘dlls’ directory/folder to Win/Systems32 (especially libmySQL.dll).
  2. Verify that the size of the file (libmySQL.dll) in System32 is the same as in ‘dlls’ directory/folder (this was what was causing my problems – for some reason the libmySQL.dll did not move to the System32 directory gracefully – it was ‘oversized’ for PHP 4 and ‘undersized’ for PHP 5 – which prompted me to delete the file and move it again – second time was a charm).
  3. Ensure that php_mysql.dll is in the directory/folder that contains your extensions
  4. Edit the php.ini file such that the php_mysql.dll IS NOT commented out in the EXTENSIONS section.

That should get it working; however, if you use as PHP.ORG now calls them ‘old style input arrays’ (e.g. – HTTP_GET VARS or its’ cousins) you need to edit the PHP.INI.  In exact, find register_long_arrays and change the default value of OFF to ON.

Bookmark and Share

1 Comments For This Post

  1. efarmboy Says:

    Thanks – this was helpfull 🙂

    I was having an issue getting php to load the php_mysql.dll in the c:/php/ext directory. It was the missing libmysql.dll in the win/system32 directory.

Leave a Reply



Demian Turner's currently-reading book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists



PHPkitchen recommends you also check out the following sites :

Accounting for Small Businesses

FreeAgent sign-up