Re: Re: Call to undefined function: mysql_connect()
| From: | Hans Deragon | Date: | Wed, 14 May 2003 15:25:25 +0000 |
| Subject: | Re: Re: Call to undefined function: mysql_connect() | ||
| References: | 1 2 3 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-10892@lists.php.net to get a copy of this message | ||
Daniel Moore wrote:
I don't know what postnuke is, but have you tried accessing the database just from a simple php script? Have you got the right permissions in that directory? Does it rely on global variables and you have them turned off? Just a guess... It looks like you built it correctly... did you use every option? :P Perhaps you are having some issues with the function mysql_connect()? Could you replace it with mysql_pconnect or something? Have a look at some of the issues here: http://www.php.net/manual/en/function.mysql-connect.php Number one was: mysql_connect jlambert at lambert-comm dot net 18-Aug-2000 11:24 With PHP Version 4.0.1pl2 if you have sql.safe_mode set to on, you will not be able to declare a hostname, username or password. Your username is set to the current user id of the PHP engine. Good luck... Dan.I just tried it, but I get the same error. See: http://site.deragon.biz/phpmysql.php The code behind this php file is: <?php
$link = mysql_connect("localhost", "mysql_user", "mysql_password")
or die("Could not connect: " . mysql_error());
print ("Connected successfully");
mysql_close($link);
?>
It cannot be a connection problem. Php is not complaining about any networking or authentification problem. It complains that the function does not even exist! That is what puzzle me.
Sincerely,
Hans Deragon
--
Deragon Informatique inc. Open source:
http://www.deragon.biz http://swtmvcwrapper.sourceforge.net
mailto://hans@deragon.biz http://autopoweroff.sourceforge.net