php.net |  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ericrose at hotmail dot com
New email:
PHP Version: OS:

 

 [2007-08-10 04:10 UTC] ericrose at hotmail dot com
Description:
------------
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-10 12:59 UTC] jani@php.net
Assigned to the installer maintainer.
 [2007-08-10 15:19 UTC] jmertic@php.net
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
http://snaps.php.net/.
 
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-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 08 09:01:27 2023 UTC