ID: 24864 Comment by: paul at boxedart dot com Reported By: tom at minnesota dot com Status: Bogus Bug Type: CGI related Operating System: NetBSD/Alpha (64bit) - 1.6 PHP Version: 4.3.2 New Comment:
Does the same thing to me also. Using FC1 and Zeus web server. Any ideas? Previous Comments: ------------------------------------------------------------------------ [2003-07-30 02:04:04] [EMAIL PROTECTED] Works fine here. Must be your configuration that is borked. (httpd.conf / php.ini / configure options..) ------------------------------------------------------------------------ [2003-07-30 01:55:57] tom at minnesota dot com If I change the php cgi file: cat /usr/local/libexec/cgi-bin/php --- #!/bin/sh export SCRIPT_FILENAME=$PATH_TRANSLATED /usr/local_install/php-4-200307300130-cgi/bin/php --- Then now it displays the phpinfo page properly. Some notes I found relating to this problem in previous PHP versions: --- It appears that when Apache executes the RedHat php cgi it passes SCRIPT_FILENAME as /var/www/cgi-bin/php and PATH_TRANSLATED is the name of the php script /var/www/maplab/htdocs/index.phtml. The php cgi on the other hand does not execute against PATH_TRANSLTED it executes against SCRIPT_FILENAME. The result is if you use the RedHat Apache/Php-CGI in the default configuration, every time the Php CGI executes, it uses itself (a binary file) as the input file to translate. And then it spews garbage because it is trying to parse a binary file. --- ------------------------------------------------------------------------ [2003-07-30 01:21:48] tom at minnesota dot com I should also note that accessing the phpinfo.phtml page via shell and php (cgi) directly works fine. It shows that error when accessing the script with php cgi through Apache. ------------------------------------------------------------------------ [2003-07-30 01:18:14] tom at minnesota dot com Description: ------------ When accessing a simple page with via the browser and php (cgi): <?php phpinfo(); ?> I get: --- Warning: Unexpected character in input: ' in /usr/local_install/php-4-200307300130-cgi/bin/php on line 4819 Warning: Unexpected character in input: ' in /usr/local_install/php-4-200307300130-cgi/bin/php on line 4819 Warning: Unexpected character in input: ' in /usr/local_install/php-4-200307300130-cgi/bin/php on line 4819 Parse error: parse error in /usr/local_install/php-4-200307300130-cgi/bin/php on line 4819 --- Works fine with apache module and older 4.3.1 cgi. Reproduce code: --------------- <?php phpinfo(); ?> Expected result: ---------------- Show the phpinfo page. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24864&edit=1