Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.7.14RC1

Bug #6015 Syntax error, DB.php on line 470
Submitted: 2005-11-19 17:27 UTC Modified: 2005-11-20 18:14 UTC
From: php-bug at sm dot msk dot ru Assigned: danielc
Status: Wont fix Package: DB
PHP Version: 5.0.5 OS: FreeBSD 5.3-RELEASE
Roadmaps: (Not assigned)    
Subscription  


 [2005-11-19 17:27 UTC] php-bug at sm dot msk dot ru
Description: ------------ Trying to use DB, get the following: Assigning the return value of new by reference is deprecated in /usr/local/share/pear/DB.php on line 470 That line reads: @$obj =& new $classname; Looks like a syntax error / deprecated construction. In phi.ini error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT

Comments

 [2005-11-19 22:58 UTC] danielc
Duplicate of Bug 4868.
 [2005-11-20 17:20 UTC] php-bug at sm dot msk dot ru
Dear sirs, Is it a kind of joke to `fix' a bug declaring it be a duplicate of bogus one? I install the package and PHP says it is full of syntax errors. That error message was the first but not a single; others concerned both `return value of new by reference' and usage of `var' declarations instead of public/protected/private. Actually I need to run a package ( Squirrelmail, though it does not matter ) which relays on pear DB. And pear DB seems to be completely unusable. All I am doing is -- installation of FreeBSD ports which are up-to-date and contain fresh versions of all soft, i.e. PHP 5.0.5, Pear 1.4.4 and pear-DB-1.7.6. As far as I can judge, the syntax used in Pear DB is not compatible with PHP 5. It has been deprecated. Please just tell whether it is true or not, and is there a workaround or I have to downgrade servers to PHP 4.4.1 ? Sorry, I have neither time nor wish to rewrite entire package to get working the application I actually need. WBR, Sergey
 [2005-11-20 18:14 UTC] danielc
I'm sorry. I wasn't reading the report closely. This is not a duplicate of the bug I mentioned. PEAR DB works fine under PHP 5. The issue you're having is regarding your error reporting level. Set it so you don't get E_STRICT warnings and you'll be fine. I see your initial report says you have it set ot a level that shouldn't be getting E_STRICT, but you are. Either the setting is wrong or there's a bug in PHP. Considering E_ALL already doesn't have E_STRICT in it, remove the "& ~E_STRICT" or just set it to E_ALL.