Re: exec dont work for svn
| From: | Richard Lynch | Date: | Thu, 31 May 2007 22:16:40 +0000 |
| Subject: | Re: exec dont work for svn | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-255943@lists.php.net to get a copy of this message | ||
On Wed, May 30, 2007 4:30 pm, Manolet Gmail wrote:
> 2007/5/30, Richard Lynch <ceo@l-i-e.com>:
>>
>>
>> On Tue, May 29, 2007 10:44 am, Manolet Gmail wrote:
>> > 2007/5/28, Greg Donald <gdonald@gmail.com>:
>> >> On 5/28/07, Manolet Gmail <manolet@gmail.com> wrote:
>> >> > but this doesnt work:
>> >> >
>> >> > exec("svn update",$out);
>>
>> exec("svn update", $out, $error);
>> if ($error) echo "OS Error: $error. Use perror $error in shell to
>> get
>> message";
>
> give me error 1:
> OS error code 1: Operation not permitted
>
> also, the checkout was did by other user. but i do chmod -R 777 * as
> root.
>
> so what i can do ?
[shudder] Having a bunch of root owned files set to 777 is definitely
the wrong way to go... Think about it for awhile.
As far as the OS Error goes, we don't even know exactly what is wrong
here...
Maybe the PHP user can't run svn
maybe the PHP user can run svn, but can't alter the hidden .svn files
that you probably didn't chmod.
Maybe...
I'd suggest doing an 'su' to the PHP User and trying to do svn update
on the command line, before you put PHP into the mix.
You also should use a full path to 'svn' and you need to be in the
right directory before you do 'svn', so I'd put a 'cd /whatever; svn
up' instead.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?