mrcolj Posted October 6, 2006 Share Posted October 6, 2006 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)? Link to comment https://forums.phpfreaks.com/topic/23197-php-mysql-connect-issue/ Share on other sites More sharing options...
printf Posted October 7, 2006 Share Posted October 7, 2006 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[code]e:\php\dlls[/code]Open that directory, move the following dll files into that directory [b]dlls[/b]!ssleay32.dllntwdblib.dllmsql.dlllibmysql.dlllibmhash.dlllibmcrypt.dlllibeay32.dllgds32.dllfdftk.dllGo to >> My Computer >> right click >> scroll down >> Properties >> left clickSystem Properties >> at the top, left click the Advanced tableft click the Environment Variables... tabEnvironment Variables, lower window >> System VariablesScroll the lower window and find Variable >> Path >> left double clickEdit system Variables, Variable ValueGo to the end of the Variable Value InputIf the last character is * ; * < semi-colon, add what is below![code]e:\php;e:\php\pear;e:\php\dlls[/code]If the last character is not * ; * < semi-colon, add what is below![code];e:\php;e:\php\pear;e:\php\dlls[/code]left click OK (3) timesthen open your PHP.INI file (e:\php\php.ini)Make sure this line is uncommented[code];extension=php_mysql.dll[/code]It should look like this... (without the semi-colon)[code]extension=php_mysql.dll[/code]Change.... [code]include_path = ".;C:\php5\pear"[/code]To...include_path = "e:\php;e:\php\pear;."NET STOP iisadminenter YWait till it's doneNET START w3svcme! Link to comment https://forums.phpfreaks.com/topic/23197-php-mysql-connect-issue/#findComment-105317 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.