trickyidiot
asked on
PHP: system/shell/passthru not working with svn update command
I have a script that is being used as a commit-hook for a subversion repository on another server.
I have tried using system, shell, shell_exec and passthru to run the svn update command.
With system and passthru, I get a returned value of '1' and nothing returned with the rest.
The command isn't actually processing.
The code for the file is listed below.
I have the file chmodded to 777 and it is within the web root.
non of the commands I am trying to use are disabled through php.ini or any other ini_set method.
What am I doing wrong here?
I have tried using system, shell, shell_exec and passthru to run the svn update command.
With system and passthru, I get a returned value of '1' and nothing returned with the rest.
The command isn't actually processing.
The code for the file is listed below.
I have the file chmodded to 777 and it is within the web root.
non of the commands I am trying to use are disabled through php.ini or any other ini_set method.
What am I doing wrong here?
<?php
error_reporting(E_ALL);
$command = '/usr/bin/svn update /var/www/dev/webdata/pricelive';
system($command, $output);
echo "{$output}<br />";
$command = '/usr/bin/svn update /var/www/dev/webdata/pricelive_includes';
system($command, $output);
echo "{$output}<br />";
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
<slaps forehead>
you're probably 100% right. I'm an idiot for not considering that.
I'll test once I get into work and award point as soon as I do.
Thank for you handing me my moron card.
you're probably 100% right. I'm an idiot for not considering that.
I'll test once I get into work and award point as soon as I do.
Thank for you handing me my moron card.
ASKER
The echo statements from that bash script ARE returning, but the svn command isn't working.
I have the bash file chmodded to 777 (for testing)
What am I doing wrong here?
Open in new window