|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-11-21 10:13 UTC] andrea dot spacca at gmail dot com
Description:
------------
When E_NOTICE or E_WARNING happen in eval'd code the script return 500
HTTP respons even on not blank pages
PS: third time i have to open the bug, 'cause jani@php.net continue to close it as bogus without wait my reply to his comments. i'll put, as soon as possibile, a script online on our server so you could test the behaviour on the enviroment where we reproduce the bug
Reproduce code:
---------------
<?php
eval('$pluto = "test ".UNDEFINED_CONST." test";');
echo 'AFTER';
?>
Expected result:
----------------
Apache Access Log:
192.168.1.1 - - [20/Nov/2007:16:09:23 +0100] "GET /testBug.cgi HTTP/1.1"
200 25
Actual result:
--------------
Apache Access Log:
192.168.1.1 - - [20/Nov/2007:16:09:23 +0100] "GET /testBug.cgi HTTP/1.1"
500 25
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 07:00:02 2025 UTC |
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