manuelflara
manuelflara

Reputation: 457

Invoking subversion (svn <stuff>) using shell_exec

I'm trying to do a lot of svn blames on a project and I've done a PHP script for it.

The problem is, while echo shell_exec( 'ls' ) shows the files of the (svn-versioned) directory the executed file is on, shell_exec( 'svn info' ) or the like, returns NULL. Any idea why? Of course, it works from the terminal.

I'm on OSX Leopard.

Thanks!

Upvotes: 0

Views: 161

Answers (2)

Brian
Brian

Reputation: 8616

Could be a few things: Volume of Data, Permissions on svn command...

Also try:

exec('svn info',$execOut);
print_r($execOut);

Upvotes: 0

Nick Veys
Nick Veys

Reputation: 23939

Working fine on OSX Lion:

<?php
echo shell_exec('svn info');
?>

When I run php test.php on it.

You could try adding 2>&1 to the end of the string to see if something is being missed on stderr?

Upvotes: 1

Related Questions