ID: 9515 Updated by: bbonev Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Scripting Engine problem Assigned To: Comments: a working setup is: ScriptAlias /cgi-bin/ /home/someuser/cgi-bin/ AddType application/x-httpd-php .php AddHandler php-script .php Action php-script /cgi-bin/php a way to solve the SERVER_NAME, PATH_INFO, etc. vars problem is to make an 'unset' wrapper. plase note that when these vars are set php will get the script name to execute from them. if for instance from a php script you exec (not include) another one starting with #!/path-to-php/php the latter invocation will execute the page requested by http again. there are two cases: 1) php is invoked as shell script and shall process command line only no matter what env vars are set 2) php is invoked the way described above and shall preffer env vars (for security reasons - the /cgi-bin/php/etc/passwd issue) if no - command line please note that php itself cannot distinguish those cases - #2 is the expected behaviour for all cgi setups, while IMHO #1 does not exist and may be activated through an option Previous Comments: --------------------------------------------------------------------------- [2001-03-01 19:01:27] [EMAIL PROTECTED] 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. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9515&edit=2 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]