从调用通过浏览器PHP脚本一个svn更新不工作 [英] Calling an svn update from a php script via a browser is not working

查看:90
本文介绍了从调用通过浏览器PHP脚本一个svn更新不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,伙计们,
  我有两个脚本。

Hey guys, I have two scripts.


  1. 运行更新,并调用了shell_exec(SVN更新),并了shell_exec('svn的ST')

  2. 运行mysqldump的了shell_exec('mysqldump的参数')

在SVN脚本不运行更新命令时, SVN ST 是打印效果,而不是 SVN更新

The svn script is not running the update command, the svn st is printing results but not the svn update

我想声明呼吁SVN更新例如,当参数
svn update时。 DIR。 --username myuser的--password密码MyPassWd --non-互动;
- 依然没有
与大多数则params的发挥

I tried to declare parameters when calling svn update eg 'svn update ' . dir . ' --username myuser --password mypasswd --non-interactive'; -- still nothing Played with most of the params

如果这是涉及到二进制文件/权限/组的东西,我没有看到它。
mysqldump命令工作正常,并正在产生一个文件,那么为什么不在SVN更新文件系统?

If this is something related to binaries/permissions/groups, I don't see it. The mysqldump command works fine and is producing a file, so why isn't the svn updating the filesystem?

请不建议在PHP中使用的核心SVN类。这是不是一种选择,我没有对服务器的完全控制和模块不可用。

Please do not advise using core SVN classes in PHP. This is not an option, I don't have complete control over the server and the module is not available.

感谢您的帮助,

-hbt

PS:重要这里要提一下。脚本工作的时候通过命令行调用。它只有在通过网络浏览器叫做失败。

PS: important thing to mention here. The scripts works when called via the command line. It only fails when called via a web browser.

推荐答案

确定。我知道了。
它与权限的问题。 .svn目录包含必须有正确的权限,因为对svn update命令是一个使用这些目录写的东西。

OK. I got it. It is an issue with permissions. The .svn directory must have the right permissions because the svn update command is using those directories to write stuff.

所以!
---确保你运行的所有搭配chmod命令,sudo的或根----

So! ---Make sure you run all chmod commands as sudo or root----


  1. 在的.svn目录运行在chmod 777

  2. 通过命令行运行一个svn update

  3. 调用脚本

如果什么都没有。您必须运行chmod 777递归所有.svn目录,然后运行另一个SVN更新

If nothing. You must run chmod 777 recursively for all .svn directories then run another svn update

还是什么都没有?

请确保你没有这两个SVN客户
在我的情况下,由UI使用的svn客户端不同于SVN(命令行)
如果你有两个客户,确保它们运行相同版本
或更新您的脚本来直接调用客户端。

Make sure you don't have two svn clients In my case, the svn client used by the UI is different from the svn (command line) If you have two clients, make sure they are running the same version Or update your script to call the client directly.

还是什么都没有?

运行在chmod 777 -R *
SVN更新
再试

Run a chmod 777 -R * svn update and try again

如果你可以把它与另一组的权限的工作,请让我知道。我知道,777不理想,但我不能让它的东西较低的工作。

If you can make it work with another set of permissions, please let me know. I know that 777 is not ideal, but I can't make it work with something lower.

再次感谢你们。

这篇关于从调用通过浏览器PHP脚本一个svn更新不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆