|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-08-06 18:59 UTC] salsi at icosaedro dot it
Description: ------------ Executing any PHP CGI script always results in the shebang line being displayed along the correct HTML code of the WEB page. This happens with and without the --enable-discard-path configuration flag (although I'm not really sure this flag be realted to the issue or not). Reproduce code: --------------- #!/usr/local/php-5.3.0/bin/php-cgi -c /home/salsi/php530/php.ini <?php echo PHP_VERSION; ?> Expected result: ---------------- $ ./shebang.php X-Powered-By: PHP/5.3.1-dev Content-type: text/html 5.3.1-dev Actual result: -------------- $ ./shebang.php X-Powered-By: PHP/5.3.1-dev Content-type: text/html #!/usr/local/php-5.3.0/bin/php-cgi -c /home/salsi/php530/php.ini 5.3.1-dev PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 17:00:01 2025 UTC |
I'm using Apache 2.2.8 + suexec without any support for PHP (it executes only CGI programs) and all worked well with PHP 5.2.5 I used until now. But this should not care, as in my opinion the shebang should not be displayed once the script has been detected to be executed as a program. I configured PHP as follows: ./configure \ --disable-all \ --prefix=/usr/local/php-5.3.0 \ --exec-prefix=/usr/local/php-5.3.0 \ --disable-rpath \ --disable-ipv6 \ --enable-ftp=shared \ --enable-sockets=shared \ --enable-tokenizer \ --with-gnu-ld=shared \ --with-pgsql=shared \ --enable-session \ --enable-posix \ --with-pcre-regex \ --enable-mbstring=all \ --enable-mbregex \ --enable-libxml \ --enable-xml \ --enable-dom \ --enable-pdo I can also confirm that with the old version of PHP the shebang line did not came out under Apache and neither did it under the command line.