#34298 [Opn->Fbk]: Bug with zend.ze1_compatibility_mode auto_prepend_file
| From: | sniper@php.net | Date: | Mon, 29 Aug 2005 21:31:33 +0000 |
| Subject: | #34298 [Opn->Fbk]: Bug with zend.ze1_compatibility_mode auto_prepend_file | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84150@lists.php.net to get a copy of this message | ||
ID: 34298
Updated by: sniper@php.net
Reported By: demjanich at yandex dot ru
-Status: Open
+Status: Feedback
Bug Type: PHP options/info functions
Operating System: WindowsXP
PHP Version: 5.0.4
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-08-29 19:39:44] demjanich at yandex dot ru
Description:
------------
Hello!
There is one bug with zend.ze1_compatibility_mode.
For example, I have three files:
1. D:/localhost/index.php
2. D:/localhost/prepend_file.php
3. .htaccess file
And if I use function error_handler(), then this function catch errors
of php4/php5 compatibility.
So ze1_compatibility_mode don't work in auto prepend file and maybe in
auto append file.
Reproduce code:
---------------
index.php
--------------
<?
class Test1
{
var $foo = 'Test1';
function Test1()
{
echo $this->foo;
}
}
$Test1 = & new Test1;
$Test1 = new Test1;
?>
prepend_file.php
--------------
<?
//phpinfo();
ini_set('error_reporting',E_ALL);
ini_set('display_errors',1);
class Test
{
var $foo = 'Test';
function Test()
{
echo $this->foo;
}
}
$Test = new Test;
function error_handler($errno = '', $errstr = '', $errfile = '',
$errline = '')
{
$errstr_debug = $errstr;
$errmsg_debug = $errno.' '.$errstr."<br />\r\nFile: ".$errfile."
Line:".$errline."<br />\r\n";
echo '<br />'.$errmsg_debug.'<br />';
}
set_error_handler('error_handler');
?>
.htaccess
--------------
php_flag zend.ze1_compatibility_mode On
php_value auto_prepend_file D:/localhost/prepend_file.php
Expected result:
----------------
TestTest1Test1
Actual result:
--------------
Test
2048 var: Deprecated. Please use the public/private/protected
modifiers
File: d:\localhost\index.php Line:6
2048 Assigning the return value of new by reference is deprecated
File: d:\localhost\index.php Line:13
Test1Test1
2048 Implicit cloning object of class 'Test1' because of
'zend.ze1_compatibility_mode'
File: d:\localhost\index.php Line:15
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34298&edit=1