Forum Moderators: coopster

Message Too Old, No Replies

Fatal Error: undefined function mysql connect() - 2

MySQL connection in PHP, Windows XP, Apache

         

lechuan peng

7:04 am on Dec 1, 2006 (gmt 0)

10+ Year Member



I've got error "undefined function mysql_connect()" calling mysql_connect().

I have the exactly the same configuration as stated in here:
[webmasterworld.com...]

I finally solved the problem by deleting the ";" in front of "extension=php_mysql.dll" in php.ini under

; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.

eelixduppy

11:50 am on Dec 1, 2006 (gmt 0)



Welcome to WebmasterWorld, lechuan peng!

I'm glad you have everything sorted out.

Just for reference:


MySQL is no longer enabled by default, so the php_mysql.dll DLL must be enabled inside of php.ini. Also, PHP needs access to the MySQL client library. A file named libmysql.dll is included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH.

[us3.php.net...]

What you did basically uncommented that line within the php.ini file.

;)