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 work, but if I call exec("C:\windows\system32\ping google.com");
that does work.
Any ideas?