ID: 28126 Updated by: [EMAIL PROTECTED] Reported By: rasch at raschnet dot com -Status: Open +Status: Bogus Bug Type: CGI related Operating System: Linux 2.4.25 (Debian unstable) PHP Version: 4.3.4 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The CGI binary used the SERVER_SOFTWARE environment variable to determine if it is running on the command line or via a webserver. If this environment variable is set, then CGI binary thinks it is running from the server and does not parse command line arguments. Previous Comments: ------------------------------------------------------------------------ [2004-04-23 17:04:59] rasch at raschnet dot com Description: ------------ the php CGI binary detects the SERVER_SOFTWARE, SERVER_NAME, GATEWAY_INTERFACE, REQUEST_METHOD, and then ignores all command-line parameters. The result is, that the below script combination prints out the entire perl script to the web server, since it reads it, and finds 0 php start/end tags. I needed to do the below as we're working on a transition of some scripts from Perl to PHP. As a workaround, i had to change the "system" line to "unset" all the environment variables listed above before launching the php script. Reproduce code: --------------- -- perl script: #!/usr/bin/perl system("/path/to/script.php"); -- /path/to/script.php: #!/usr/bin/php4 -q print ("hello"); Expected result: ---------------- Expected the result to be "hi" Actual result: -------------- web server prints: #!/usr/bin/perl system("/path/to/script.php"); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28126&edit=1