Re: Re: [PHP] PHP from the command line
| From: | php at swimwebs dot com | Date: | Thu, 03 Nov 2005 15:36:01 +0000 |
| Subject: | Re: Re: [PHP] PHP from the command line | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-225050@lists.php.net to get a copy of this message | ||
Sorry, I failed to mention that I ran the command line script as the
apache user.
Robbert
replies-lists-php@listmail.innovate.net wrote on 11/03/2005, 04:25:40
PM:
> the most obvious is db permissions -- but you should be able to get php
> to report a decent error so you know more precisely what the issue is.
>
> for the db permissions issue -- when you run the php script from the
> command line it's running as "you", so the (default) connect to the db
> will come from . when the same script is
> run through the apache server the (default) connect will be from
> . if the "apache user" doesn't have
> access to the db (but "you" do) it will fail.
>
>
>
>
>
> ------------ Original Message ------------
> > Date: Thursday, November 03, 2005 06:59:30 AM -0800
> > From: Robbert van Andel
> > To: php-general@lists.php.net
> > Subject: [PHP] PHP from the command line
> >
> > I run a linux webserver with Apache and PHP5. Does anyone out there
> > know why a php script would work from the command line but fail when
> > running it through a web browser? In particular, I'm trying to get a
> > connection to an MSSQL server but PHP fails to connect when I run the
> > script with a web browser. My regular scripts (i.e. ones without any
> > mssql functions) work fine from the browser. When I run the script
> > from the command line, the connection succeeds. Any idea if this is a
> > PHP error or an apache error. If this is an apache error, does anyone
> > know what I need to search for to find an answer?
> >
> >
> >
> > Thanks,
> >
> > Robbert van Andel
> >
> >
> >
>
> ---------- End Original Message ----------