web页面php调用shell脚本,执行svn update 更新的问题。

WBOY
Release: 2016-06-02 11:28:27
Original
1458 people have browsed it

phpsvnshellweb

大神们,求救!

SvnUpdate.php代码:
set_time_limit(0);
system("/usr/bin/sudo /usr/www/SvnUpdate.sh");
?>

SvnUpdate.sh代码:
time="$(date +"%Y%m%d-%H%M%S")"
codes="/usr/www/codes"

#update the codes from SVN server
/usr/bin/svn update $codes/tiyushe --username xx --password xx --no-auth-cache

出现问题:
1、在linux终端,www(root)用户 执行 php SvnUpdate.php 能正常更新
2、在web页面,点击按钮,则一片空白
3、如果把update 换成checkout 或者是 export ,Linux终端和web页面都能正常执行。。

会是什么原因呢?排查了一天了。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!