bonekrusher Posted September 7, 2008 Share Posted September 7, 2008 Hi I am trying to get PHP5 to work with MySQL. I have followed these directions: Getting PHP5 to work with MySQL - Official Info Unfortunately PHP5 removed built-in support for MySQL. To get it to work, the easiest way is to copy the mysql library file by hand. Open the folder you unzipped your PHP to. Copy the libmysql.dll file (should be located like E:\php\libmysql.dll ) into your Window's System folder (usually C:\Windows\System32\ although might be C:\WinNT\System\ or something). Then open up your php.ini in a text editor and search for ;extension=php_mysql.dll and remove the ; infont of that line. Restart Apache and see if you get any errors. If it complains about "php_mysql.dll" either your extension directory isn't correct or windows can't find libmysql.dll I get this error: Fatal error: Call to undefined function mysql_connect() Am I missing something? Link to comment https://forums.phpfreaks.com/topic/123110-getting-php5-to-work-with-mysql/ Share on other sites More sharing options...
mattal999 Posted September 7, 2008 Share Posted September 7, 2008 did you restart Apache? because it hasnt loaded the mysql extension... Link to comment https://forums.phpfreaks.com/topic/123110-getting-php5-to-work-with-mysql/#findComment-635775 Share on other sites More sharing options...
bonekrusher Posted September 7, 2008 Author Share Posted September 7, 2008 Got it working: had to change: extension_dir = "./" to extension_dir = "c:/php/ext" in the php.ini file... Thanks.... Link to comment https://forums.phpfreaks.com/topic/123110-getting-php5-to-work-with-mysql/#findComment-635778 Share on other sites More sharing options...
Mchl Posted September 7, 2008 Share Posted September 7, 2008 You might want to start with mysqli extension instead of mysql. It's similar in use to mysql, but has some extra features. Link to comment https://forums.phpfreaks.com/topic/123110-getting-php5-to-work-with-mysql/#findComment-635781 Share on other sites More sharing options...
bonekrusher Posted September 7, 2008 Author Share Posted September 7, 2008 Will do - thanks Link to comment https://forums.phpfreaks.com/topic/123110-getting-php5-to-work-with-mysql/#findComment-635806 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.