Re: mysq_connect()

From: Date: Fri, 31 Jan 2003 00:53:21 +0000
Subject: Re: mysq_connect()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-133721@lists.php.net to get a copy of this message
On Thu, 30 Jan 2003, Cesar Rodriguez wrote: > Hi there, my name is Cesar Rodriguez and I am trying to upgrade from Caldera > Linux Server 2.3 into RedHat Server 8.0. The problem I encounter is that > after testing different scripts, php is working, except when I make an MySQL > call like mysql_connect() or mysql_pconnect(). > The call is as follows: > > $link = mysql_connect('localhost', 'user1', 'passwd') > or exit(); > > mysql_select_db ('mydb') > or exit (); > > $result = mysql_query ('SELECT COUNT(*) FROM clients') > or exit (); > > if ($row = mysql_fetch_array ($result)) > ..... etc ...... > > The message I get is: > > "Fatal error: Call to undefined function: mysql_pconnect() in > var/www/html/lesson/firsta.php" > > Seems that PHP4 does not find the MySQL library. I checked php.ini and > httpd.conf files and everything is in its place apparently. I re-installed > everything from scratch with no positive result. I would appreciate advice > on this issue. Install the php-mysql rpm, restart apache, and they will now exist. (assuming you already installed the mysql rpm) In short, there are three rpms: php, mysql, and php-mysql. http://www.rpmfind.net/ Regards, Philip

« previous php.general (#133721) next »