开发者

PHP-CGI not loading PATH in windows

开发者 https://www.devze.com 2023-04-01 20:42 出处:网络
I have a windows webserver running lighttpd and using PHP with CGI. Previously I was using Apache without CGI and I noticed something.

I have a windows webserver running lighttpd and using PHP with CGI. Previously I was using Apache without CGI and I noticed something.

When using the php exec() command, it used to load everything from the Windows %PATH% environment variable. However, now that doesn't appear to be the case with my new setup.

Let me give an example. Under the old setup, I could call exec("ping google.com"); and that would work just fine.

However now that doesn't wor开发者_运维知识库k, but if I call exec("C:\windows\system32\ping google.com"); that does work.

Any ideas?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号