pacala Posted November 13, 2006 Share Posted November 13, 2006 I'm new.I have php5, apache 2.0.52, and MySQL 4.0.21. The problem is that I can't connect to MySQL, from php. PHP and Apache are working fine. MySQL is installed and works fine. I copied php_mysql in windows\system, and windows\system32 ( I'm using XP PRo). I opened the extension php_mysql.dll in php.ini and I defined the path: "c:\php5\ext", I keep getting the error message "module cannot be found, loaded" or something like that when I restart apache. If I don't open the extension from php.ini, when I try to connect with mysql_connect(all parameters are correct) I'm getting a blank screen even if I set mysql.trace_mode = OnAll help is appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/27106-php-mysql-connection/ Share on other sites More sharing options...
Destruction Posted November 13, 2006 Share Posted November 13, 2006 You said you copied it to the windows folders...[quote]I opened the extension php_mysql.dll in php.ini and I defined the path: "c:\php5\ext"[/quote]And yet defining it as c:\php5\ext? You may wish to make sure the dll is inside the ext folder as defined.Dest Quote Link to comment https://forums.phpfreaks.com/topic/27106-php-mysql-connection/#findComment-123927 Share on other sites More sharing options...
pacala Posted November 13, 2006 Author Share Posted November 13, 2006 Yep, the file is in that folder. I also added the path c:\php5 in the windows system paths and restarted the computer. Still a blank screen. How am I going to make php_mysql.dll work? Quote Link to comment https://forums.phpfreaks.com/topic/27106-php-mysql-connection/#findComment-123947 Share on other sites More sharing options...
wildteen88 Posted November 13, 2006 Share Posted November 13, 2006 Please read [url=http://www.phpfreaks.com/forums/index.php/topic,95378.0.html]this FAQ[/url]It should help.Also remove any instances of php_mysql.dll in the WINDOWS and WINDOWS/SYSTEM32 folders. No need to move/copy any files outside of the PHP folder if you have added PHP to the Windows PATH variable. Also make sure there is no older files with the name of libmysql.dll or php_mysql.dll which PHP may be finding. libmysql.dll is an important file for PHP to find (should be located in the root of the PHP folder) in order for the mysql library to successfully load up correctly. Quote Link to comment https://forums.phpfreaks.com/topic/27106-php-mysql-connection/#findComment-124004 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.