Re: Newbie MySQL Question

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

 



On Mon, 2002-10-14 at 08:37, Dave Clark wrote:
>   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 
[snip]
> 
> <?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

For some reason, Red Hat separates the PHP-MySQL library from the
standard PHP package (they do the same with Postgres).  This means you
have to also install this pacakges for PHP to talk to MySQL:

php-mysql-4.2.2-8.0.5.i386.rpm

This package contains exactly ONE file: /usr/lib/php4/mysql.so.  Why Red
Hat does this, I don't know.  You won't find it in the list of packages
to install from the package manager, but it is available on CD3.

Best Regards,
Keith
-- 
LPIC-2, MCSE, N+
Life's the same, except for my shoes
Got spam? Get spastic http://spastic.sourceforge.net





[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