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)
#!/bin/bash
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.
Switch to the user id under which your web server/php runs as, then manually run,
and see what you get.
Or, change
to
which will redirect error messages to stdout, which should then show up in your web page to help with diagnosis.
Subversion uses stderr to dislay output to the user, so I should imagine that this will fix it:
echo system('/updatesvnscript.sh 2>&1');