dsyk33753 2014-12-22 08:05
浏览 42
已采纳

svn日志输出没有在php页面的浏览器中显示

I have a query in my php page, Could you please help me to resolve that. In php page i want to do SVN list of the repo, so i written the code as below.

page name: svn_list.php

<?php
$cmd = '/usr/bin/svn list repo_name';
exec($cmd, $output);
$output = implode("
", $output) . "
";
echo $output;
?>

If i run this script in putty by giving command "php svn_list.php" is working fine. it list out the files. but i want to see this output in browser. If i open the php file in browser it shows empty. Even i tried with using following PHP header at the top of the PHP Code, eventhough it's not displaying. Please help me on this.

header('Content-type: text/html; charset=utf-8');

Thanks in advance.

  • 写回答

2条回答 默认 最新

  • dqxsuig64994 2014-12-22 08:37
    关注

    The problem , here , to me seems to be with the user level access.

    Not sure but you might have checked the script in cli with the user (may be a root user) who has the privilege of running the svn list command and hence must be giving the result and the user (for Apache which might be running as user www-data and group www-data or as user apache and group apache) might not have that permission for running the svn list command.

    Try checking the permission level. http://fideloper.com/user-group-permissions-chmod-apache

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站