Newbie MySQL Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  I'm running RH 8.0, and MySQL, PHP, and Apache all seem to be working
independently of one another.  What I can't get to work are the links 
between my
.php files and the MySQL server.  I'm successfully publishing .html and 
.php
pages to Apache from a user's directory.  Then, after creating a MySQL 
account
and databases for the same user, I used this command to link to the 
database
server from the .php page:

<?php
$dbcnx = @mysql_connect("localhost", "user", "userpwd");
if (!$dbcnx) {
echo ("<p>Unable to connect to the server at this time.</p>");
exit();
}
?>

With this command, the page displays up to the spot of the command,
and then dies.  If I remove the @ from "@mysql_connect (thus turning on 
the PHP
errors), I get this:  "

Fatal error: Call to undefined function: mysql_connect() in
/home/user/public_html/index.php on line 16

I checked my phpinfo() and my php.ini, and by all appearances MySQL 
support has
been installed for PHP (I installed all the packages at installation 
time).  Any
ideas?

Dave





[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux