PHP 4.0 Bug #9515: PHP misbehaves when run as a script with SERVER_NAME environment variable def'd
| From: | bram at xspace dot com | Date: | Fri, 02 Mar 2001 00:01:27 +0000 |
| Subject: | PHP 4.0 Bug #9515: PHP misbehaves when run as a script with SERVER_NAME environment variable def'd | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-47742@lists.php.net to get a copy of this message | ||
From: bram@xspace.com
Operating system: Linux
PHP version: 4.0.4pl1
PHP Bug Type: Scripting Engine problem
Bug description: PHP misbehaves when run as a script with SERVER_NAME environment variable
def'd
In order to run a php script under a separate account while serving a web page, I use suexec to run
php script as a shell.
Problem: When the environment variable SERVER_NAME is defined, PHP misbelieves that it is NOT a
shell script.
In reality, it is a shell script. Bug 8898 is more less the same problem with another symptom.
Some functions simply do not work correctly. GetMyUID() returns nothing when PHP is running as a
shell script, but the environment variable SERVER_NAME is defined.
As a last resort, an invocation flag option should be available to inform PHP that it is a shell
script being invoked by a web server.
--
Edit Bug report at: http://bugs.php.net/?id=9515&edit=1