Local MySQL DB with PHP and Apache2

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
elAdi
Forum Newbie
Posts: 4
Joined: Tue Nov 22, 2005 7:09 pm
Location: Perth, Australia

Local MySQL DB with PHP and Apache2

Post by elAdi »

I am going NUTS here and seriously would appreciate some help.

So, this is the environment:

Windows XP Professional V2002 SP2
Apache Server 2.0.54
PHP 5.0.5
MySQL 4.0.21.

All applications are working as such (Apache, PHP and MySQL DB), but when I try to connect to the DB, nothing happens (not even an error). I was reading around a bit and tried some stuff. Eventually I found some things I haven't done):

####
went into php.ini and inserted the path of the apache document root path into the doc_root field
in addition inserted the extensions dir path to the extension_dir field in php.ini, which was c:\php\ext

scrolled down to almost the bottom of the php.ini file and deleted the 'comment' character to activate the php_mysql.dll extension.
###

Now, I did this, but when I restart the Apache Server I get two error messages:

PHP Startup: Unable to load dynamic library 'C:\php\ext\php_mysql.dll' - The specified module could not be found.

This does not make sense, because the dll IS in that folder. I even reinstalled PHP and reconfigured the ini-File. Nothing. And it really, really, REALLY am getting annoyed here (yes, I tried forward slashes).

Funny enough, the server itself seems to run after the error messages. But no connection to the DB.

Does anybody know what is going on here and how I can solve this problem.

Thank you so much in advance!
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

My installation works with these two configuration options:

Code: Select all

extension_dir = "./ext/"
extension=php_mysql.dll
Try using that instead of C:/php/
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

Try putting a copy of mysql.dll in your windows dir
Post Reply