Fatal error:

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
User avatar
binary_w0lf
Forum Newbie
Posts: 14
Joined: Mon Mar 22, 2004 11:48 am
Location: Greece : Salonika

Fatal error:

Post by binary_w0lf »

Fatal error: Call to undefined function: mysql_connect() in /var/www/html/index.php on line 3

This is the error i get, when i try to access my local mysql server, at my Fedora Core 1. Searching around the net, and my desktop, i have discovered, that the PHP version my server is running, is not compiled with the mysql module.

Therefor , i downloaded php 4.something and compiled it with mysql, and still i get nothing..
The most logical thing, is that im doing something wrong in the installation, most propably, the new php version is installed in a directory that does not affect the previous version..

Please advice...
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

You may just need to edit your php.ini and add/uncomment extension=mysql.so then restart the webserver.
User avatar
binary_w0lf
Forum Newbie
Posts: 14
Joined: Mon Mar 22, 2004 11:48 am
Location: Greece : Salonika

Post by binary_w0lf »

tryed that.. in didnt work, i think php needs recompiling at the current moment.. i need advice on that..

Thanks for the interest though!
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

I have posted on a few threads recently regarding compiling PHP it may be worth searching under my username for 'compiling' or 'building'.

If you are building MySQL you will need to run 'make install-all-headers' in order for PHP to locate the required library and header files for MySQL during the compiling of PHP.

After building PHP did you check that your webserver (I'm guessing Apache?) config file had been updated to locate the correct installation of PHP?
Post Reply