Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have made a script for svn update for programmers. The script works fine from bash. Programmers want to execute it from browser (via theirs administrator site).

Script is very simple (its only example not exacly the same)

echo "Start update..."

cd /dir/with/site

/usr/bin/svn update
echo "Update ended."


In browser bash script is starting via php file something like:

echo system('/updatesvnscript.sh');

After executing it in bash I can see all output from echos and svn aplication, script is working good in bash.

Starting script in browser via php gives me output only from echos, like Start update... Update ended., but no output from svn. Problem is that the script also doesn't update my site when I make update via browser, so I need to find where is the problem.

So I want to see output from svn in browser to see if something with svn via browser isnt working.

Bash script has proper rights to execute it via browser, and has a proper right to modify (update) file in site directory.

add comment

2 Answers

up vote 4 down vote accepted

Switch to the user id under which your web server/php runs as, then manually run,

cd /dir/with/site
/usr/bin/svn update

and see what you get.

Or, change

/usr/bin/svn update


/usr/bin/svn update 2>&1

which will redirect error messages to stdout, which should then show up in your web page to help with diagnosis.

I'm such a moron :) Thx for your help :D –  B14D3 Jun 8 '12 at 11:45
add comment

Subversion uses stderr to dislay output to the user, so I should imagine that this will fix it:

echo system('/updatesvnscript.sh 2>&1');

+1 Your answer is good to but @EightBitTony was first :D –  B14D3 Jun 8 '12 at 11:46
add comment

This site is currently not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .