[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: problem in running svn command through php on CentOS

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-12-20 14:59:37 CET

On Dec 20, 2007, at 07:26, pinky goyal wrote:

> i am having problem in running all the commands of svn.exe on
> CentOS through php's exec() function but i am able to run the
> svnlook commands by exec() function.
>
> i am trying to execute svn list file:///PathToRepositoryDir
>
> $cmd = "/usr/bin/svn" list file:////var/subversion/devfoundry/
>
> i am able to run $cmd thorugh command line but not thorugh exec()
> function.
>
> i have checked the permissions on the executables.svn exe has same
> permissions as svnlook exe.
>
> it's very urgent and i am running out of time :(
> Please if anyone can help me out to resolve the issue or have
> suggestion regarding this i will be greatful.

Some error is probably occurring, so you should probably examine the
stderr output. Here, I redirect stderr (stream 2) to the same place
stdout is going (stream 1) so that we get the error into $output too.

<?php
$cmd = '/usr/bin/svn list file:///var/subversion/devfoundry/ 2>&1';
exec($cmd, $output);
$output = implode("\n", $output) . "\n";
echo $output;
?>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 20 16:43:40 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.