Jump to content


This topic is now archived and is closed to further replies.


PHP & MySQL connect issue

Recommended Posts

I've seen a lot of people who can't get PHP5 and MySQL5 to talk to each other, and I haven't seen anyone transcend it.  Maybe there's an error in the wizard or something.

I'm WIMP based; my PHP files load fine, and I can get around MySQL fine; the MySQL extensions are set up in exactly the same way as the other extensions which have loaded correctly. But when you go to http://www.colinjensen.com/phpinfo.php there is no mention of MySQL (except in the windows path.) Any suggestions on where I go from here to diagnose things?

I have other extensions enabled in the same way, so I'm enabling them correctly. MySQL is just not being recognized.  I have PHP.ini in e:\php, php.ini looking in e:\php\ext for extensions, have libmysql.dll in e:\php and php_mysql.dll and php_mysqli.dll in e:\php\ext; and the latter two uncommented in the php.ini.  I've tried both the limysql and php_mysql and php_mysqli which come from mysql.com and those that come from php.net.

Any suggestions from you php pros (or you amateurs who got it working)?

Share this post

Link to post
Share on other sites
I don't see your PHP dlls folder or any path pointing to it. One problem with PHP on windows, is that it can not find the dynamic link libraries if they are not given a mapping. Placing them in the system folder doesn't help and should be avoided at all costs. PHP files are not system files so they should never be placed in the system folder. Plus by setting up a good directory structure you can keep track of your PHP install which makes updates easier, also avoiding version collisions!

Create a folder in your php directory e:\php, call it 'dlls'

You should now have


Open that directory, move the following dll files into that directory [b]dlls[/b]!


Go to >> My Computer >> right click >> scroll down >> Properties >> left click
System Properties >> at the top, left click the Advanced tab
left click the Environment Variables... tab
Environment Variables, lower window >> System Variables

Scroll the lower window and find Variable >> Path >> left double click

Edit system Variables, Variable Value

Go to the end of the Variable Value Input

If the last character is * ; * < semi-colon, add what is below!


If the last character is not * ; * < semi-colon, add what is below!


left click OK (3) times

then open your PHP.INI file (e:\php\php.ini)

Make sure this line is uncommented


It should look like this... (without the semi-colon)



[code]include_path = ".;C:\php5\pear"[/code]


include_path = "e:\php;e:\php\pear;."

NET STOP iisadmin

enter Y

Wait till it's done



Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.