 | | | | |  | | | | | Guest | exec dont work for svn -
06-02-2007, 08:55 PM
hi, i want to do a svn update (subversion) from php using exec (or system)
now, this works:
exec("ls; pwd",$out);
foreach($out as $line)echo"<br/>$line\n";
and this also works and print me the help from subversion:
exec("svn help",$out);
foreach($out as $line)echo"<br/>$line\n";
but this doesnt work:
exec("svn update",$out);
foreach($out as $line)echo"<br/>$line\n";
dont print anything... dont update the files, pwd returns me the
correct path...
any ideas? im using cpanel... php5 and fedora 4 php runs as nobody... | | | | | | | | Guest | Re: exec dont work for svn -
06-02-2007, 08:55 PM
Please try:
svn update 2>&1
To maybe see some errors.
On May 28, 6:34 pm, mano...@gmail.com ("Manolet Gmail") wrote:
> hi, i want to do a svn update (subversion) from php using exec (or system)
>
> now, this works:
>
> exec("ls; pwd",$out);
> foreach($out as $line)echo"<br/>$line\n";
>
> and this also works and print me the help from subversion:
>
> exec("svn help",$out);
> foreach($out as $line)echo"<br/>$line\n";
>
> but this doesnt work:
>
> exec("svn update",$out);
> foreach($out as $line)echo"<br/>$line\n";
>
> dont print anything... dont update the files, pwd returns me the
> correct path...
>
> any ideas? im using cpanel... php5 and fedora 4 php runs as nobody... | | | | | | | | Guest | Re: [PHP] exec dont work for svn -
06-02-2007, 08:55 PM
On 5/28/07, Manolet Gmail <EMAIL REMOVED> wrote:
> but this doesnt work:
>
> exec("svn update",$out);
> foreach($out as $line)echo"<br/>$line\n";
>
> dont print anything... dont update the files
Is it possible you need to provide some type of authentication? `svn
update` may be asking for input your exec call isn't providing.
--
Greg Donald http://destiney.com/ | | | | | | | | Guest | [PHP] exec dont work for svn -
06-02-2007, 08:55 PM
2007/5/28, Greg Donald <EMAIL REMOVED>:
> On 5/28/07, Manolet Gmail <EMAIL REMOVED> wrote:
> > but this doesnt work:
> >
> > exec("svn update",$out);
> > foreach($out as $line)echo"<br/>$line\n";
> >
> > dont print anything... dont update the files
>
> Is it possible you need to provide some type of authentication? `svn
> update` may be asking for input your exec call isn't providing.
well, i have error reporting (E ALL) and dont give me any error, also
i try with
svn update --non-interactive --username user --p***word p***
and again... nothing appears. Also if the svn update ask for a
p***word why php dont show it?, or why i dont receive a maximum
ececution time of script error?.
the script run instantly btw,..
>
>
> --
> Greg Donald
> http://destiney.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> | | | | | | | | Guest | RE: [PHP] exec dont work for svn -
06-02-2007, 08:55 PM
Hi,
In many apps the messages comes as STDERR, so try:
exec("svn update 2>&1", $out);
Best regards,
Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free
> -----Original Message-----
> From: Manolet Gmail [private.php?do=newpm&u=]
> Sent: Tuesday, May 29, 2007 5:45 PM
> To: PHP List
> Subject: [php] exec dont work for svn
>
> 2007/5/28, Greg Donald <EMAIL REMOVED>:
> > On 5/28/07, Manolet Gmail <EMAIL REMOVED> wrote:
> > > but this doesnt work:
> > >
> > > exec("svn update",$out);
> > > foreach($out as $line)echo"<br/>$line\n";
> > >
> > > dont print anything... dont update the files
> >
> > Is it possible you need to provide some type of authentication? `svn
> > update` may be asking for input your exec call isn't providing.
>
> well, i have error reporting (E ALL) and dont give me any error, also
> i try with
>
> svn update --non-interactive --username user --p***word p***
>
> and again... nothing appears. Also if the svn update ask for a
> p***word why php dont show it?, or why i dont receive a maximum
> ececution time of script error?.
>
> the script run instantly btw,..
>
> >
> >
> > --
> > Greg Donald
> > http://destiney.com/
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php | | | | | | | | Guest | Re: [PHP] exec dont work for svn -
06-02-2007, 08:55 PM
Hi, thanks petter, now im getting this error...
svn: Can't check path '/root/.svn': Permission denied
using this:
$cmd = "svn up";
$cmd .= " --username $user --p***word $p*** --non-interactive --revision $rev";
$cmd .= " --no-auth-cache --config-dir ~/.svn/ 2>&1";
i try with --config-dir /tmp/ with $_SERVER['document_root'] but
always return me the same error, any idea?
2007/5/29, Peter Lauri <EMAIL REMOVED>:
> Hi,
>
> In many apps the messages comes as STDERR, so try:
>
> exec("svn update 2>&1", $out);
>
> Best regards,
> Peter Lauri
>
> www.dwsasia.com - company web site
> www.lauri.se - personal web site
> www.carbonfree.org.uk - become Carbon Free
>
> > -----Original Message-----
> > From: Manolet Gmail [private.php?do=newpm&u=]
> > Sent: Tuesday, May 29, 2007 5:45 PM
> > To: PHP List
> > Subject: [php] exec dont work for svn
> >
> > 2007/5/28, Greg Donald <EMAIL REMOVED>:
> > > On 5/28/07, Manolet Gmail <EMAIL REMOVED> wrote:
> > > > but this doesnt work:
> > > >
> > > > exec("svn update",$out);
> > > > foreach($out as $line)echo"<br/>$line\n";
> > > >
> > > > dont print anything... dont update the files
> > >
> > > Is it possible you need to provide some type of authentication? `svn
> > > update` may be asking for input your exec call isn't providing.
> >
> > well, i have error reporting (E ALL) and dont give me any error, also
> > i try with
> >
> > svn update --non-interactive --username user --p***word p***
> >
> > and again... nothing appears. Also if the svn update ask for a
> > p***word why php dont show it?, or why i dont receive a maximum
> > ececution time of script error?.
> >
> > the script run instantly btw,..
> >
> > >
> > >
> > > --
> > > Greg Donald
> > > http://destiney.com/
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> | | | | | | | | Guest | Re: [PHP] exec dont work for svn -
06-02-2007, 08:56 PM
Did 'nobody' do the initial checkout?
If not, 'nobody' probably can't have permission to do the update.
On Mon, May 28, 2007 5:34 pm, Manolet Gmail wrote:
> hi, i want to do a svn update (subversion) from php using exec (or
> system)
>
> now, this works:
>
> exec("ls; pwd",$out);
> foreach($out as $line)echo"<br/>$line\n";
>
> and this also works and print me the help from subversion:
>
> exec("svn help",$out);
> foreach($out as $line)echo"<br/>$line\n";
>
> but this doesnt work:
>
> exec("svn update",$out);
> foreach($out as $line)echo"<br/>$line\n";
>
> dont print anything... dont update the files, pwd returns me the
> correct path...
>
> any ideas? im using cpanel... php5 and fedora 4 php runs as nobody...
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
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? | | | | | | | | Guest | Re: [PHP] exec dont work for svn -
06-02-2007, 08:56 PM
On Tue, May 29, 2007 10:44 am, Manolet Gmail wrote:
> 2007/5/28, Greg Donald <EMAIL REMOVED>:
>> On 5/28/07, Manolet Gmail <EMAIL REMOVED> 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";
>> > foreach($out as $line)echo"<br/>$line\n";
>> >
>> > dont print anything... dont update the files
>>
>> Is it possible you need to provide some type of authentication?
>> `svn
>> update` may be asking for input your exec call isn't providing.
>
> well, i have error reporting (E ALL) and dont give me any error, also
> i try with
>
> svn update --non-interactive --username user --p***word p***
>
> and again... nothing appears. Also if the svn update ask for a
> p***word why php dont show it?, or why i dont receive a maximum
> ececution time of script error?.
>
> the script run instantly btw,..
>
>>
>>
>> --
>> Greg Donald
>> http://destiney.com/
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
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? | | | | | | | | Guest | Re: [PHP] exec dont work for svn -
06-02-2007, 08:56 PM
2007/5/30, Richard Lynch <EMAIL REMOVED>:
>
>
> On Tue, May 29, 2007 10:44 am, Manolet Gmail wrote:
> > 2007/5/28, Greg Donald <EMAIL REMOVED>:
> >> On 5/28/07, Manolet Gmail <EMAIL REMOVED> 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 ?
>
> >> > foreach($out as $line)echo"<br/>$line\n";
> >> >
> >> > dont print anything... dont update the files
> >>
> >> Is it possible you need to provide some type of authentication?
> >> `svn
> >> update` may be asking for input your exec call isn't providing.
> >
> > well, i have error reporting (E ALL) and dont give me any error, also
> > i try with
> >
> > svn update --non-interactive --username user --p***word p***
> >
> > and again... nothing appears. Also if the svn update ask for a
> > p***word why php dont show it?, or why i dont receive a maximum
> > ececution time of script error?.
> >
> > the script run instantly btw,..
> >
> >>
> >>
> >> --
> >> Greg Donald
> >> http://destiney.com/
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> 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?
>
> | | | | | | | | Guest | Re: [PHP] exec dont work for svn -
06-02-2007, 08:56 PM
On Wed, May 30, 2007 4:30 pm, Manolet Gmail wrote:
> 2007/5/30, Richard Lynch <EMAIL REMOVED>:
>>
>>
>> On Tue, May 29, 2007 10:44 am, Manolet Gmail wrote:
>> > 2007/5/28, Greg Donald <EMAIL REMOVED>:
>> >> On 5/28/07, Manolet Gmail <EMAIL REMOVED> 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? | | | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | |  |