ID: 49182
Updated by: [email protected]
Reported By: salsi at icosaedro dot it
-Status: No Feedback
+Status: Verified
Bug Type: CGI related
-Operating System: Slackware 12.0
+Operating System: *
-PHP Version: 5.3SVN-2009-08-06 (SVN)
+PHP Version: 5.3SVN-2009-09-04 (SVN)
New Comment:
Still borked.
Previous Comments:
------------------------------------------------------------------------
[2009-09-04 07:34:01] niklas at narhinen dot net
Hi, using php 5.3.0.
my script is:
#!/path/to/php-cgi
<?php
phpinfo();
?>
and it prints "#!/path/to/php-cgi" on top of the normal phpinfo
Running Debian Etch
This bug needs to be reopened..
------------------------------------------------------------------------
[2009-08-14 01:00:02] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2009-08-09 09:51:26] salsi at icosaedro dot it
I also noted that the CGI version considers the shebang line as
"generated output", and then namespace declarations are not allowed. For
example:
#!/usr/local/php-5.3.0/bin/php-cgi -c /home/salsi/php530/php.ini
<?php
namespace foo\bar;
?>
tells
Fatal error: Namespace declaration statement has to be the very first
statement in the script in /home/salsi/php530/test.php on line 3
The CLI version /usr/local/php-5.3.0/bin/php instead works as expected
and the shebang line is not displayed.
------------------------------------------------------------------------
[2009-08-06 20:45:08] salsi at icosaedro dot it
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.
------------------------------------------------------------------------
[2009-08-06 20:01:38] [email protected]
What webserver? How did you configure PHP into it?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/49182
--
Edit this bug report at http://bugs.php.net/?id=49182&edit=1