dpsu84620 2011-02-12 22:31
浏览 42
已采纳

通过Apache Webserver为PHP-CLI和PHP提供不同的System PATH变量内容? 怎么修?

I'm a little bit confused about the Windows System %PATH% variable. When I ran the following script with both, php-cli and as a webpage delivered by apache, I get different output for the path variable.

// different output for php-cli and php executed by apache webserver
<?php
system('echo %PATH%');
?>

Where can I change the PATH variable that is in use with the apache webserver?

My system:

  • Win7 64bit
  • Zend Server Community Edition 5.0.4 (with Apache, not IIS)

Edit: Sorry, I had to give you an example to understand the problem:

I wanted to exec the system('mysqldump .....') command or something like that. The point is, running the script from the command line works, because the MySQL bin path is in the system's path but running the script via webbrowser doesn't include the MySQL bin path in the system's path.

The web system's path is:

C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\Programme\Sysinternals;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Zend\ZendServer\bin 

Bit the original system's path is much longer. My question is now, where is the system's path limited or where can I find the system's path settings for the web executed php script?

  • 写回答

3条回答 默认 最新

  • duanfangbunao36970 2011-02-14 23:31
    关注

    See at C:\Path\To\Zend\ZendServer\ZendEnablerConf.xml.

    There is a path variable definied.

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

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料