PHP problem with self-made web server
| From: | Peter Jukel | Date: | Thu, 11 Oct 2001 15:21:31 +0000 |
| Subject: | PHP problem with self-made web server | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-67778@lists.php.net to get a copy of this message | ||
Hi
I need to run PHP from the command line through my web server which I am
building.
However, when I issue a command such as
php.exe test.php > result.txt
where test.php contains:
<html>
<?php
echo $SERVER_NAME;
?>
</html>
and I get the error:
X-Powered-By: PHP/4.0.5
Content-type: text/html
<html>
PHP Version in use:
<br>
<b>Warning</b>: Undefined variable: SERVER_NAME in <b>c:\test.php</b> on
line <b>4</b><br>
</html>
I am also not able to pass parameters to a PHP script through the
QUERY_STRING environment variable.
Do I need to set other environment variables before calling the PHP
interpreter to enable certain variables? If so, which ones?
Thanks in advance
Regards
Peter