Re: Connect Problem

From: Date: Thu, 09 May 2002 06:48:11 +0000
Subject: Re: Connect Problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-96773@lists.php.net to get a copy of this message
In article <MPG.1744e13e7f17e2f2989719@news.php.net>, robleyd@paradise.net.nz says... > In article <20020509043220.21830.qmail@pb1.pair.com>, > wombat@bluetravel.com.au says... > > Hey there, > > > > I can't connect to mysql through a php web page, it isn't talking to it. And > > also $PHP_SELF gives a permission error, access denied. Do I have > > permissions set incorrectly? > > > > This is my php, > > > > <?php > > $dbcnx = @mysql_connect("host", "user", "password"); > > if (!$dbcnx) { > > echo ("blah"); > > exit(); > > } > > ?> > > > > I get no errors, just no response so it obviously no connecting. Changing > > user names or passwords produce the same result. I can connect with a shell > > in the root mysql dir. > > lost.. > > Jeremy > > It almost sounds like _PHP_ isn't working. Try a simple phpinfo() script > to ensure that you have php functioning correctly. > > And to follow up - you don't say whether 'blah' is being echoed; if it is, the reason you get no error message is the @ in front of mysql_connect. Drop that and any error message will be displayed. -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.general (#96773) next »