All,
I've recently installed Apache version 2.2, MySql version 5.1, and PHP version 5.2.13 and am using Windows as my OS. I've gotten PHP to work on the Apache server, and MySql is working properly on its own. However, when I try to connect to a mysql database, I get this error:
fatal error: "undefined function mysql_connect()"
I've read literally 20 to 30 tech forums about this error. It appears to be a common problem with php versions 5 + because mysql extensions are no longer bundled with php. However, I've tried every fix imaginable and still nothing. Fixes I've tried include:
1. removing the semicolon from the php_mysql extension in the php.ini file
2. adding both c:\php and c:\php\ext\ to my PATH directory (php is my main directory)
3. ensuring that my libmysql.dll is located in the same folder as my php.exe file
4. ensuring that the php_mysql extension is available in my c:\php\ext folder
Despite all of these steps (and many more), I've still had no success. Can someone please help me, I'm about to give up on PHP because of this problem...