Hi
I am busy building a web server that will have PHP support (under Windows).
I have chosen to send PHP scripts to PHP.exe, and redirect the output to a
file, like this:
c:\php>php test.php > result.txt
This works fine, with one problem: PHP doesn't seem to be using the latest
QUERY_STRING environment variable. It uses the value that QUERY_STRING was
when Windows started.
Say test.php contains the following code:
<?php
echo "Your name is " . $NAME;
?>
When I use the registry editor to change QUERY_STRING to same "NAME=Peter",
it still uses the previous setting (when I last shutdown the PC), e.g.
"NAME=Marc".
The registry key I am updating is as follows:
\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment
How can I get PHP to "notice" that the environment variables have changed?
Regards
Peter