Page 1 of 1

Please help with PHP and mysql_connect Fatal error

Posted: Mon Oct 21, 2002 11:27 pm
by smonsivaes
Fatal error: Call to undefined function: mysql_connect() in /var/www/html/php/mysqlconnect.php on line 2
...this is the problem i am having.
RedHat 8.0
Running Apache 2.0.40
compiled in modules:
core.c
prefork.c
http_core.c
mod_so.c
MySQL 3.23.52
PHP 4.2.2 installed as a DSO module
and includes --with-mysql=shared,/usr' '
(note that i do not know if this --with-mysql statement is correct..my libmysqlclient.so is in /usr/lib/mysql ...? is this correct? )

i installed PHP as an RPM since im a newbie in compiling and installing.
note: i am able to run PHP scripts on the web server and it does parse the code correctly but my problem is when i try to connect to mysql using a simple script like so to test the connection.
<?php
$conn = mysql_connect("localhost", "user", "pass");
echo "$conn";
?>

any help or point in the right direction is very much appreciated!

Posted: Tue Oct 22, 2002 1:06 am
by volka
probably there is another package in your distribution for the mysql/php-plugin.
afaik redhat uses names like php-mysql-<version>.<architecture>.rpm for packages