Re: Script execution
| From: | Ashley Sheridan | Date: | Mon, 09 Mar 2009 21:06:12 +0000 |
| Subject: | Re: Script execution | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-289705@lists.php.net to get a copy of this message | ||
On Mon, 2009-03-09 at 16:59 -0400, George Larson wrote:
> Hi everybody.
>
> The "problem" that I'm having is probably because I've got more of a
> Windows
> background -- and it isn't so much a problem as a point of curiosity.
>
> I've recently noticed that when I write a script that they seem to have
> different permissions when executed at the command line. Two that I have
> written recently run just fine when you execute 'php scriptname.php' but
> they are unable, at least, to write the data if I browse to them on
> localhost.
>
> Am I imagining things? If not, how would I properly make them able to run
> through a browser?
>
> Thanks!
> G
This is to do with the fact that the web browser runs as a different
user from you (usually apache, apache2 or wwwrun) What you could do is
make the directory where you want to write files with the script part of
a new group. Add the apache user to this group and you should then be
able to get it to run.
Ash
www.ashleysheridan.co.uk