#34298 [Fbk]: Bug with zend.ze1_compatibility_mode auto_prepend_file
| From: | sniper@php.net | Date: | Tue, 30 Aug 2005 08:43:38 +0000 |
| Subject: | #34298 [Fbk]: Bug with zend.ze1_compatibility_mode auto_prepend_file | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84167@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: Feedback
Bug Type: PHP options/info functions
Operating System: WindowsXP
PHP Version: 5CVS-2005-08-30
New Comment:
Also note: zend.ze1_compatibility mode only affects the cloning,
nothing else.
Previous Comments:
------------------------------------------------------------------------
[2005-08-30 10:42:42] sniper@php.net
Try setting those options in php.ini file instead of .htaccess.
------------------------------------------------------------------------
[2005-08-30 00:29:13] demjanich at yandex dot ru
There is the same bug too. In ver 5.1.0-dev and also in latest brench
of 5.0.x-dev.
------------------------------------------------------------------------
[2005-08-29 23:31:32] sniper@php.net
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
------------------------------------------------------------------------
[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