I have recently set up a box with RH Linux 8.0 and installed Apache (v2.0), PHP (v4.2.2) and mySQL (v3.23.52) from the RPM. I can access mySQL fine from the terminal but as soon as I hit any MySQL functions in PHP it chokes.
Since I'm a total newbie with Linux I am hoping I don't have to rebuild and reinstall anything because I don't really know my way around yet. Is this possibly due to something set incorrectly in the php.ini file?
One thing might be that the path to one of the necessary files is not right. It seems that the guy who did the install for me put it all on one partition and I am not finding things in the usual paths. Maybe you could tell me what to look for.
Here is my simple test:
<?php
$dbcnx = mysql_connect("localhost", "root");
if (!$dbcnx)
{
echo "Error: Could not connect to database. Please try again later.";
exit;
} //end if
?>
I get the error:
"Fatal error: Call to undefined function: mysql_connect() in /home/xxxx/public_html/test_mysql.php on line 13"
I tried this with "$dbcnx = mysql_connect("localhost", "root", "password");"
and "$dbcnx = @mysql_pconnect("localhost", "root", "password");"
but I also get errors with these statements.
So it really looks like a problem with my set up.
How can I troubleshoot this?
TIA
-Labrat