Re: [PHP] strange errors from command line vs. web
- From: ceo@xxxxxxxxx ("Richard Lynch")
- Date: Wed, 27 Sep 2006 18:24:42 -0500 (CDT)
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
.
- Follow-Ups:
- Re: [PHP] strange errors from command line vs. web
- From: "blackwater dev"
- Re: [PHP] strange errors from command line vs. web
- References:
- strange errors from command line vs. web
- From: "blackwater dev"
- strange errors from command line vs. web
- Prev by Date: Re: [PHP] Stored procs and transactions using Linux/PHP and Windows/MSSQL
- Next by Date: Re: [PHP] Displaying MySQL results on runtime
- Previous by thread: strange errors from command line vs. web
- Next by thread: Re: [PHP] strange errors from command line vs. web
- Index(es):