 |
Fatal error: Call to undefined function mysql_connect()
SUMMARY Fatal error: Call to undefined function mysql_connect() PHP no longer bundles PHP with the MySQL libraries enabled. This means that to use the MySQL functions you will need to enable them manually. Because the MySQL libraries are not enabled the mysql functions are undefined, this being the result of the above error. Follow the instructions below to correct the error. These instructions assume you have PHP installed in the C:\PHP directory. INSTRUCTIONS Search your server for libmysql.dll. Delete any instance of libmysql.dll that is not in the C:\PHP directory. This limits the possibility of older MySQL client API's being used with PHP.
Search your server for php_mysql.dll. Delete any instance of php_mysql.dll that is not in the C:\PHP directory. This limits the possibility of older MySQL client API's being used with PHP.
Open your C:\%WIN%\php.ini file in a text editor (Notepad will work).
Search for the line that looks like...
;extension=php_mysql.dll
Change this line to...
extension=php_mysql.dll
- Save the modified php.ini file.
- Copy C:\PHP\libmysql.dll and C:\PHP\ext\php_mysql.dll to the C:\%WIN%\system32 folder.
- Restart IIS and test it out.
|
 |
 |
| Article ID: |
73 |
| Created: |
November 29, 2004 |
| Updated: |
November 29, 2004 |
| Rating: |
(2325 votes)
|
|