|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #42264 php-5.2.3 and mysql 5.0.16 on windows xp
Submitted: 2007-08-10 04:10 UTC Modified: 2007-08-10 15:19 UTC
From: ericrose at hotmail dot com Assigned: jmertic (profile)
Status: Closed Package: Feature/Change Request
PHP Version: 5CVS-2007-08-10 (snap) OS: win xp
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
50 - 4 = ?
Subscribe to this entry?

 [2007-08-10 04:10 UTC] ericrose at hotmail dot com
I originally wrote this for beginner's who were having issues so bare with me.
I've figured out what the problem is with installing php-5.2.3 and mysql 5.0.16 on windows xp. with apache 2.0 I really don't know what's happening, I'll leave that up to you. 

Anyways there seems to be a conflict going on, a "you can have one thing but not the other scenario" When php5 windows binary installer runs it creates your php.ini file, with all sorts of configuration data. One very important line is extension_dir it looks something like this extension_dir "C:\php\ext\" This directive tells php where it's extension files are stored, in order to use mysql, you need to have selected the extension mysql at the time of install, it copies the file php_mysql.dll into the "C:\php\ext\" folder. 

You are also asked at the time of install, the path to your apache config folder, it then writes some directives in the file httpd.conf, it looks like this 

PHPIniDir "C:\\PHP5\\"
LoadModule php5_module "C:\\PHP5\\php5apache2.dll"

Now you may think that this looks all great, and you should have php running along side mysql. Wrong! I can tell you how to get your mysql working fine. Simply change the two forward slashes to one backwards slash.

PHPIniDir "C:/PHP5/"
LoadModule php5_module "C:/PHP5/php5apache2.dll"

Restart your server and you'll be able to connect to your database.

Herein lies the double edged sword. Now you've lost much php functionality, including error reporting.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-10 12:59 UTC]
Assigned to the installer maintainer.
 [2007-08-10 15:19 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

I've never seen this be a problem, but I have changed the '\\' to '/' in the apache config file about 2 months ago in CVS.

I'm not sure how that change would break error_reporting() or anything else. If you can elaborate more on what else appears to not work after the above change, that would be great.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Mar 02 11:01:28 2024 UTC