klitscher Posted July 7, 2006 Share Posted July 7, 2006 Hey all,I have installed Apache/PHP5 and Mysql from scratch and have apache and php5 working well. It's installed on an XP box used just for development. I'm able to serve up phpinfo fine. I am also able to use mysql to run on the command line. I've uncommented [b]extension=php_mysql.dll[/b] in php.ini but I can't for the life of me get phpinfo to show the mysql info. I'm able to manipulate the php.ini file to change other extensions, but not mysql or mysqli, and the dll's are in the right spot. Any help? I wish i could show you, but like i said, it's a development machine and not online. Thanks in advance.Ken Quote Link to comment https://forums.phpfreaks.com/topic/13924-solved-problem-installing-mysql-with-php/ Share on other sites More sharing options...
wildteen88 Posted July 7, 2006 Share Posted July 7, 2006 This has been asked a few times and has been posted in the FAQ/Code Snippet Repository forum. [url=http://www.phpfreaks.com/forums/index.php/topic,95378.0.html]Click here[/url] to read the thread.That should be able to help you to get the mysql extension working. Quote Link to comment https://forums.phpfreaks.com/topic/13924-solved-problem-installing-mysql-with-php/#findComment-54290 Share on other sites More sharing options...
klitscher Posted July 7, 2006 Author Share Posted July 7, 2006 Thanks for the help, but I've already done everything as that example says (well, mostly...I've just added my php location to PATH rather than moving everything to c:\windows)...still no luck...any other thoughts?KenEDIT: FWIW, I followed [url=http://www.expertsrt.com/tutorials/Matt/install-apache.html]http://www.expertsrt.com/tutorials/Matt/install-apache.html[/url] these instructions to the t to get this all set up...everything else works great, and the install directory is exactly the same as these instructions. Quote Link to comment https://forums.phpfreaks.com/topic/13924-solved-problem-installing-mysql-with-php/#findComment-54382 Share on other sites More sharing options...
wildteen88 Posted July 7, 2006 Share Posted July 7, 2006 OKay when you added PHP to the path variable you did restart your PC. If havnt restarted your PC then the new variable wont be available until Windows has been restarted.Also verify that PHP is using the correct php.ini too, by running the phpinfo function. Check that [b]Configuration File (php.ini) Path[/b] is pointing to the correct folder in which your php.ini file is located in. If PHP is not pointing to the correct php.ini file then, Add the following line:[code]PHPIniDir "C:/php"[/code]Change C:/php to the correct folder location in which the php.ini file is located in. Restart Apache and check that php is using the correct php.ini file.If it is using the correct php.ini and mysql extension still isn't loaded, Check that the [b]extension_dir[/b] setting is point to PHPs extension folder which stores all your extensions in. Also find [b]display_startup_errors = off[/b] and change off to on. Save your php.ini and restart Apache. If PHP is having any trouble loading up it should popup a little error message with whats wrong. Quote Link to comment https://forums.phpfreaks.com/topic/13924-solved-problem-installing-mysql-with-php/#findComment-54398 Share on other sites More sharing options...
klitscher Posted July 7, 2006 Author Share Posted July 7, 2006 Okay, I had everything set right with the php.ini file, but when I changed the display startup errors line i did receive a bunch of errors that say:PHP Startup: Unable to load dynamic library 'D:\Web\WebServer\PHP\ext\php_mysql.dll' - The specified procedure could not be found.However, when I look in that directory for that file (as well as the 10 others that are giving me the same message because I uncommented all the extensions) that file is located in that directory. This does not happen for all of the extensions though, so I'm at a loss for what to do next. Thanks for your continued help!Ken Quote Link to comment https://forums.phpfreaks.com/topic/13924-solved-problem-installing-mysql-with-php/#findComment-54410 Share on other sites More sharing options...
wildteen88 Posted July 7, 2006 Share Posted July 7, 2006 This can happen when extensions are either not compatible with the current version of PHP. Or the extension requires other files in order for them to work. For example the mysql extension requires a file call [b]libmysql.dll[/b], this file should be located in the root of the PHP folder. Now if the PHP folder is in the path, PHP should be able to pick this file up automatically.For now just enable two extensions, suhc as GD2 and MySQL and copy libmysql.dll file to your WINDOWS folder. Restart Apache. Does PHP now load up the extension. Quote Link to comment https://forums.phpfreaks.com/topic/13924-solved-problem-installing-mysql-with-php/#findComment-54439 Share on other sites More sharing options...
klitscher Posted July 7, 2006 Author Share Posted July 7, 2006 I have enabled GD2 and MySQL, have libmysql.dll in the root php folder which was defined in PATH, as well as in C:\WINDOWS and restarted Apache. Still have the same problem. I get the startup error twice, both times for php_mysql.dll Did not receive an error for GD2. Any other thoughts...thanks for taking the time to help me out... Quote Link to comment https://forums.phpfreaks.com/topic/13924-solved-problem-installing-mysql-with-php/#findComment-54475 Share on other sites More sharing options...
wildteen88 Posted July 7, 2006 Share Posted July 7, 2006 Man this is wierd! Usually adding the php folder to the path solves this or moving the libmysql.dll file to the WINDOWS folder. Sometimes PHP can be a little bit picky, and it gets annoying. I am out of suggestions. The only thing I can suggest is to double check everything and that you havn't made any typos for setting the PATH variable, uncommented the cortrect lines.Also I had a read through the tutorial you linked to and that is fine, everything said in that tutorial is what I do when I setup Apache, PHP and MySQL. Quote Link to comment https://forums.phpfreaks.com/topic/13924-solved-problem-installing-mysql-with-php/#findComment-54495 Share on other sites More sharing options...
klitscher Posted July 7, 2006 Author Share Posted July 7, 2006 okay, thanks....i'll let you know if I discover anything.Ken Quote Link to comment https://forums.phpfreaks.com/topic/13924-solved-problem-installing-mysql-with-php/#findComment-54496 Share on other sites More sharing options...
klitscher Posted July 8, 2006 Author Share Posted July 8, 2006 Okay...figured out...there was another version of libmysql.dll in system32 from when I installed sokkit...apparently when you uninstall sokkit it does not remove these...so all is good...thanks for all your help...I appreciate it (how do you mark this as solved?)ThanksKen Quote Link to comment https://forums.phpfreaks.com/topic/13924-solved-problem-installing-mysql-with-php/#findComment-54677 Share on other sites More sharing options...
wildteen88 Posted July 8, 2006 Share Posted July 8, 2006 Okay. Glad you managed to sort it out. If you get any more problems or need help with your php scripts then please do come back and we'll help you out.Also I'll mark this as solved for you. Quote Link to comment https://forums.phpfreaks.com/topic/13924-solved-problem-installing-mysql-with-php/#findComment-54734 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.