Page 1 of 1

Problem connecting to mysql server using php

Posted: Mon Jan 17, 2005 11:22 am
by jlryan
Whenever i try to connect to mysql server, i get this:
Fatal error: Call to undefined function mysql_connect() in ........ on Line ....

What's wrong?
i've mysql and apache installed on an external drive and both of them are working individually. Their host is localhost and the port for apache is 81 and for mysql is 3306.

Posted: Mon Jan 17, 2005 11:37 am
by feyd
php5? you have to enable mysql support.

php4? you may need to edit your php.ini and restart the server.

Posted: Tue Jan 18, 2005 2:07 am
by jlryan
how to enable mysql support?

Posted: Tue Jan 18, 2005 5:37 am
by JAM
ref.mysql.php wrote:In PHP 5, MySQL is no longer enabled by default, nor is the MySQL library bundled with PHP. ...

Note: Windows users will need to enable php_mysql.dll inside of php.ini and either copy libmysql.dll into the Windows system directory, or make it available to the PATH.
Additional information can be found on install.windows.php and ref.mysqli.php