Re: strange errors from command line vs. web

From: Date: Wed, 27 Sep 2006 18:51:00 +0000
Subject: Re: strange errors from command line vs. web
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-242316@lists.php.net to get a copy of this message
> I have some code that makes a connection to the db. When I run this code > from the command line, it stops at the db connection. If I call the script > from the browser, it works fine. I've changed the permissions and that > didn't work. The db connection is the basic, localhost, root, with no > password. > > What else can I try? Try to get the error message from the DB Connection when it stops. If MySQL something like this (from the PHP Manual for mysql_connect) $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$link) { die('Could not connect: ' . mysql_error()); } Travis Doherty

« previous php.general (#242316) next »