ID:               43358
 Comment by:       antonprk at mail dot ru
 Reported By:      andrea dot spacca at gmail dot com
 Status:           Open
 Bug Type:         *General Issues
 Operating System: Gentoo
 PHP Version:      5.2.5
 New Comment:

I've got similiar problem.
Server is under CentOS release 4.6 (Final).
The  example  described  in  http://bugs.php.net/bug.php?id=43358
IS NOT working. Scripts that use function eval(); DO NOT work also.
Error message: Parse error: syntax error, unexpected T_STRING,
expecting
T_FUNCTION in /function.php(1) : eval()'d code on line xxx

But  with  previous  version of PHP 5.2.4 everything was working and i
have especially tested it (have installed PHP version 5.2.4).

Disabling or modifying output_buffering do not make it working.
Can you help with any advice?


Previous Comments:
------------------------------------------------------------------------

[2008-02-29 19:33:49] not at public dot com

Was able to eliminate this bug by turning output buffering off in
php.ini

------------------------------------------------------------------------

[2008-02-26 11:31:05] zorfling at hotmail dot com

Hi,

I've been having the same problem and thought I'd post my workaround.
If you simply overwrite the headers to return a 200, it works.

eg header("Content-type: text/html", true, 200); (second arg is to
overwrite the current header)

NB This needs to be called AFTER the eval that causes the issue.

Hope this helps,


Chris

------------------------------------------------------------------------

[2007-12-17 22:28:38] not at public dot com

This is an existing bug. Having the same error on 2.5.4 on FreeBSD.

A failed eval results in a 500 error, although when calling error_log()
on the last line of the code, the php script does reach and execute
that.

The script is executed correctly, and the response from the server also
includes the ( correct ) output of the script without any php errors,
but after the 500 header ofcourse. Browsers hang on the error and don't
show the output.

------------------------------------------------------------------------

[2007-11-21 13:41:33] andrea at spacca dot org

here you can test the http response on our enviroment:
http://89.186.95.3/test/testBug.cgi

------------------------------------------------------------------------

[2007-11-21 10:23:41] andrea at spacca dot org

from our httpd.conf:
LoadModule php5_module etc etc
AddType application/x-httpd-php .php .cgi

------------------------------------------------------------------------

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/43358

-- 
Edit this bug report at http://bugs.php.net/?id=43358&edit=1

Reply via email to