Re: Re[2]: [PHP] cURL in an exec() . more

From: Date: Wed, 03 Jul 2002 15:29:39 +0000
Subject: Re: Re[2]: [PHP] cURL in an exec() . more
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-105224@lists.php.net to get a copy of this message
Bingo! That will work! This is what I do with the modem script. Since there's no PHP function or script for the modem, so I used the C programming that is already written by someone and just use PHP to execute the file. "Jay Blanchard" <jay.blanchard@niicommunications.com> wrote in message news:002901c222a3$8c2a6f00$8102a8c0@niigziuo4ohhdt... > [snip] > Ok from the beginning PHP executes and writes files with > permissions (like userid and groupid) Webserver is running. > So what i think will be the best way for you to do. Is to create an > executable with the same owner. and then execute it. As for > /usr/local/bin directory it allows to write in it only to root or > superuser. I recommend you to create a user like foo > then in his home directory create a subdirectory like web and chmod it > to 777. and use it as an output for the script. Got an idea? > Also you always can use /tmp directory :) > [/snip] > > Apache runs as 'nobody' and 'nogroup', so therefore PHP runs as the same. > (Security, don't you know.) :) I cannot change file owner or group through > PHP. The executable (getlist.sh) is created with the same owner/group. I do > change the file permissions to '755' to allow the file to be an executable. > > {snip] > Try hand writing a script then exec() it from php. > [/snip] > > Tried that, no go. > > crud, I knew this was gonna' happen because of the very tight deadline I am > on. I had a feeling that this is why the original exec(curl) didn't work. > > Thanks, > > Jay > >

« previous php.general (#105224) next »