Re: [PHP] strange errors from command line vs. web



On Wed, September 27, 2006 11:36 am, blackwater dev wrote:
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.

Show us the code, without any embedded passwords, of course...


If I call the
script
from the browser, it works fine.

This almost always boils down to:
PHP runs as "nobody" or a similarly unpowered user
You log in as you, blackwaterdev or whatever, with many powers.

In this case, it looks like 'nobody' has their own database, and is
allowed to connect to it, but you are not.

I've changed the permissions and
that
didn't work.

Changed which permissions?

mysql_admin?
If so, did you reload the permissions after change?

File executable?

What?

The db connection is the basic, localhost, root, with no
password.

Now that is an entirely separate problem.

DON'T DO THAT!

:-)

What else can I try?

You're going to have to create a user and set a password anyway, so do
that first.

There's no point in getting localhost/root/[blank] to work when it's
not what you want anyway.

--
Like Music?
http://l-i-e.com/artists.htm
.