Re: strange errors from command line vs. web

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

 



> 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux