Setting up PHP 5.x to support MySQL
As usual, I will make this guide quick and straight-forward.
By default, MySQL module on PHP 5.x versions is not enabled. You need to uncomment and declare the extension in the php.ini file to load the MySQL module. Below are the steps to perform to enable the MySQL module.
Windows 200*/XP
- Copy the “php.ini-recommended” file to your windows or winnt directory (C:\WINDOWS or C:\WINNT) and rename it to “php.ini”
- Open the “php.ini” file in your favorite text editor (sciTE on my case) and setup the modules directory path
; Directory in which the loadable extensions (modules) reside.
extension_dir = “your/path/to/your/modules” (e.g “E:/rdc/www/php5/ext”)
- After setting up your module directory directive go to the extensions directive, this is where you will enable or uncomment the extension directive for loading the php mysql module.
;extension=php_mysql.dll
- remove the semi-colon to uncomment the directive and finally enable the php mysql module.
extension=php_mysql.dll
- Restart your web server to enable changes.
To view if the php mysql module is successfully loaded, simply create a php file that invokes the phpinfo() function.
If you have questions, corrections or clarifications, Please feel free to post your comments.
Spread the word
del.icio.us Digg Furl Google StumbleUpon Technorati Windows Live Yahoo! Help



















Leave a Comment