[PHP-DEV] B3, pear segfault, and msgs about deprecated
Hello, I'm trying to see why $ make install-pear-packages segfaults with HEAD. I hope I'll commit the fixes today. I suspect references problem... I got new messages (which where not displayed before): : var: Deprecated. Please use the public/private/protected modifiers in XXX.php on line XX Have these warning/notices been introduced recently? Or is it related to the e_pedantic thing? pierre -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
On Thu, 18 Dec 2003 12:43:03 +0100 Pierre-Alain Joye [EMAIL PROTECTED] wrote: Hello, I'm trying to see why $ make install-pear-packages segfaults with HEAD. I hope I'll commit the fixes today. I suspect references problem... I got new messages (which where not displayed before): : var: Deprecated. Please use the public/private/protected modifiers in XXX.php on line XX Have these warning/notices been introduced recently? Or is it related to the e_pedantic thing? Ok segfault is on line pear/PEAR/Registry.php line 345. This is a call to unserialize. I do not know yet why it fails. Maybe (again) the serialized data is corrupted. Anyway unserialize should never segfault. hth pierre -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
On Thu, 18 Dec 2003, Pierre-Alain Joye wrote: Ok segfault is on line pear/PEAR/Registry.php line 345. This is a call to unserialize. I do not know yet why it fails. Maybe (again) the serialized data is corrupted. Anyway unserialize should never segfault. Can you put the datafile + serialize call in a test case? Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
On Thu, 18 Dec 2003 13:50:10 +0100 (CET) Derick Rethans [EMAIL PROTECTED] wrote: On Thu, 18 Dec 2003, Pierre-Alain Joye wrote: Ok segfault is on line pear/PEAR/Registry.php line 345. This is a call to unserialize. I do not know yet why it fails. Maybe (again) the serialized data is corrupted. Anyway unserialize should never segfault. Can you put the datafile + serialize call in a test case? I tried (see links below), but a simple test case does not segfault with the same file. Please note a weird notice about an undefined $data variable. The problem is that $data is a function argument and is used in the 1st line of the functon... Any idea? One of the serialized data which cause the segfault: http://www.pearfr.org/~paj/pear/packageserialized A patch against /php-src/pear/ to see where that happens and to reproduce the weird notice: http://www.pearfr.org/~paj/pear/pear-install-seg.patch A useless test case: http://www.pearfr.org/~paj/pear/test_seg.php It works perfectly, but the same file and code segfaults in PEAR. A bit lost right now, memory issue? pierre -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
Hello Pierre-Alain, Thursday, December 18, 2003, 12:43:03 PM, you wrote: Hello, I'm trying to see why $ make install-pear-packages segfaults with HEAD. I hope I'll commit the fixes today. I suspect references problem... I got new messages (which where not displayed before): : var: Deprecated. Please use the public/private/protected modifiers in XXX.php on line XX Have these warning/notices been introduced recently? Or is it related to the e_pedantic thing? [EMAIL PROTECTED] /usr/src/php5 $ php -derror_reporting=4095 -r 'class t {var $x;}' Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in Command line code on line 1 [EMAIL PROTECTED] /usr/src/php5 $ php -derror_reporting=2047 -r 'class t {var $x;}' [EMAIL PROTECTED] /usr/src/php5 $ php -r 'var_dump(E_STRICT);' int(2048) regards marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
On Thu, 18 Dec 2003 14:44:29 +0100 (CET) Derick Rethans [EMAIL PROTECTED] wrote: Guesso... can you try to run it in valgrind, it should show all memory overruns etc.. Already done, no overuns, and obviously non freed mem after the crash ;) Important note (dunno why I did not say that before :P ) It does not crash in debug mode (bt == /dev/null :/), but: /home/paj/cvs/builds/php5/Zend/zend_hash.c(504) : ht=0x40c09dc4 is being destroyed and valgrind still does see any problem. pierre -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
The only call to error_reporting() is in pearcmd.php: error_reporting(E_ALL ~E_NOTICE); I added a var_dump(error_reporting()); and got 2039 out, as expected, but I am still getting E_STRICT warnings galore. I wonder if E_STRICT is on no matter what in head? I added ~E_STRICT (which of course does nothing) and STILL get the warnings. Greg Daniel Convissor wrote: Hi Pierre: On Thu, Dec 18, 2003 at 12:43:03PM +0100, Pierre-Alain Joye wrote: I got new messages (which where not displayed before): : var: Deprecated. Please use the public/private/protected modifiers in XXX.php on line XX I noticed the same thing. The new E_STRICT reporting level produces such output. But, E_STRICT is turned off by default. Didn't have time to track down exactly what was going on, but I have a hunch that it is due to some of the PEAR install scripts set error_reporting by using numbers rather than constants. --Dan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
On Thu, Dec 18, 2003 at 11:44:27AM -0500, Greg Beaver wrote: I wonder if E_STRICT is on no matter what in head? It's not. Something in the pear install scripts is turning it on. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NYv: 718-854-0335 f: 718-854-0409 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
Unless it is possible to turn on E_STRICT without using the error_reporting() function, then this is not true - there is only 1 error_reporting() in all of the .php files that make up the PEAR core, try grep if you don't believe me. Greg Daniel Convissor wrote: On Thu, Dec 18, 2003 at 11:44:27AM -0500, Greg Beaver wrote: I wonder if E_STRICT is on no matter what in head? It's not. Something in the pear install scripts is turning it on. --Dan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
Daniel Convissor wrote: It's the custom error handler in pearcmd.php. PHP doesn't pay attention to any error_reporting() settings when a custom error handler is established. Then, error_handler() doesn't account for the new warning level. Is it just me or is this undesired behaviour? I noticed this back when I was playing around with error_handlers. I think this should be treated as a bug and be changed for two reasons: 1) It seems illogical that an error_handler is called for an error level which is disabled in php.ini 2) It's a performance issue since the custom error handler is called for e.g. every access to an undefined array index even though I disabled that warning. Opinions? - Chris -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
Personally, I both like and dislike this behavior. I like it for debugging purposes, since it allows me full control over whether I ignore error_reporting level or perhaps just log disabled levels instead of displaying them, etc. On the other hand, there is a minor performance issue, but if you write your code to not emit E_NOTICES, it shouldn't really be a big problem. -Brad Christian Schneider wrote: Daniel Convissor wrote: It's the custom error handler in pearcmd.php. PHP doesn't pay attention to any error_reporting() settings when a custom error handler is established. Then, error_handler() doesn't account for the new warning level. Is it just me or is this undesired behaviour? I noticed this back when I was playing around with error_handlers. I think this should be treated as a bug and be changed for two reasons: 1) It seems illogical that an error_handler is called for an error level which is disabled in php.ini 2) It's a performance issue since the custom error handler is called for e.g. every access to an undefined array index even though I disabled that warning. Opinions? - Chris -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
On Thu, 18 Dec 2003, Christian Schneider wrote: Daniel Convissor wrote: It's the custom error handler in pearcmd.php. PHP doesn't pay attention to any error_reporting() settings when a custom error handler is established. Then, error_handler() doesn't account for the new warning level. Is it just me or is this undesired behaviour? I noticed this back when I was playing around with error_handlers. No, it's desired behavior. I think this should be treated as a bug and be changed for two reasons: 1) It seems illogical that an error_handler is called for an error level which is disabled in php.ini 2) It's a performance issue since the custom error handler is called for e.g. every access to an undefined array index even though I disabled that warning. Performance and error handling don't go together. It's not a valid argument and the current behavior IS the way it should be. (Please search the archives for reasons, we discussed this before here). Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
At the least, this needs to be added to the thin-changes file, as it will bork any script that uses a custom error handler and has PHP 4 objects. Thanks for the catch Dan, that fixes it. Greg Christian Schneider wrote: Daniel Convissor wrote: It's the custom error handler in pearcmd.php. PHP doesn't pay attention to any error_reporting() settings when a custom error handler is established. Then, error_handler() doesn't account for the new warning level. Is it just me or is this undesired behaviour? I noticed this back when I was playing around with error_handlers. I think this should be treated as a bug and be changed for two reasons: 1) It seems illogical that an error_handler is called for an error level which is disabled in php.ini 2) It's a performance issue since the custom error handler is called for e.g. every access to an undefined array index even though I disabled that warning. Opinions? - Chris -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
On Thursday 18 December 2003 18.25, Christian Schneider wrote: Daniel Convissor wrote: It's the custom error handler in pearcmd.php. PHP doesn't pay attention to any error_reporting() settings when a custom error handler is established. Then, error_handler() doesn't account for the new warning level. Is it just me or is this undesired behaviour? I noticed this back when I was playing around with error_handlers. I think this should be treated as a bug and be changed for two reasons: 1) It seems illogical that an error_handler is called for an error level which is disabled in php.ini 2) It's a performance issue since the custom error handler is called for e.g. every access to an undefined array index even though I disabled that warning. I find this very useful and don't think it should be changed, maybe it's just me. /Magnus -- Marriage is a lot like the army, everyone complains, but you'd be surprised at the large number that re-enlist. -- James Garner -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
On Thu, 18 Dec 2003, Greg Beaver wrote: At the least, this needs to be added to the thin-changes file, as it will bork any script that uses a custom error handler and has PHP 4 objects. It won't bork all scripts with a custom errorhandler if their default action is to ignore core and other errors but only handle the ones they should handle. I do agree that it should be mentioned in the changes file though. Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
Any chance you can dissect it to the smallest piece of code that still produces the crash? At 14:46 18/12/2003, Pierre-Alain Joye wrote: On Thu, 18 Dec 2003 12:43:03 +0100 Pierre-Alain Joye [EMAIL PROTECTED] wrote: Hello, I'm trying to see why $ make install-pear-packages segfaults with HEAD. I hope I'll commit the fixes today. I suspect references problem... I got new messages (which where not displayed before): : var: Deprecated. Please use the public/private/protected modifiers in XXX.php on line XX Have these warning/notices been introduced recently? Or is it related to the e_pedantic thing? Ok segfault is on line pear/PEAR/Registry.php line 345. This is a call to unserialize. I do not know yet why it fails. Maybe (again) the serialized data is corrupted. Anyway unserialize should never segfault. hth pierre -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault, and msgs about deprecated
Derick Rethans wrote: It won't bork all scripts with a custom errorhandler if their default action is to ignore core and other errors but only handle the ones they should handle. I do agree that it should be mentioned in the changes file though. On the other hand you have to be very careful (another way of saying 'avoid') using custom error_handlers anyway because http://bugs.php.net/bug.php?id=25547 will break your application. Still there in PHP 5.0.0b3RC1 - Chris -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] B3, pear segfault, and msgs about deprecated
Greg: On Thu, Dec 18, 2003 at 12:48:01PM -0500, Greg Beaver wrote: Thanks for the catch Dan, that fixes it. But your fix uses the E_STRICT constant, which of course doesn't exist in PHP 4, so an undefined constant notice gets produced. I'm wondering why there's even a custom error handler in that file. It doesn't seem to be performing any purpose that isn't met with PHP's own error handling procedures. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NYv: 718-854-0335 f: 718-854-0409 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault, and msgs about deprecated
At 07:20 PM 12/18/2003 +0100, Christian Schneider wrote: Derick Rethans wrote: It won't bork all scripts with a custom errorhandler if their default action is to ignore core and other errors but only handle the ones they should handle. I do agree that it should be mentioned in the changes file though. On the other hand you have to be very careful (another way of saying 'avoid') using custom error_handlers anyway because http://bugs.php.net/bug.php?id=25547 will break your application. Still there in PHP 5.0.0b3RC1 Yeah this is a known bug and will have to be fixed in RC1. It's not a showstopper for B3. In any case, I do think that the custom error handler being called for any error is bogus. Why should E_STRICT or E_NOTICES be sent to the handler if they are off? Anyway, I'm holding off with Beta 3 until we fix the --install-pear-packages problem. I'd call that a showstopper because it's something pretty basic. Has anyone managed to create a reproducing script or backtrace? Andi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault, and msgs about deprecated
On Thu, 18 Dec 2003, Andi Gutmans wrote: In any case, I do think that the custom error handler being called for any error is bogus. Why should E_STRICT or E_NOTICES be sent to the handler if they are off? So you're suggesting to add another BC break here, without a really good reason? :) Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault, and msgs about deprecated
At 10:24 PM 12/18/2003 +0100, Derick Rethans wrote: On Thu, 18 Dec 2003, Andi Gutmans wrote: In any case, I do think that the custom error handler being called for any error is bogus. Why should E_STRICT or E_NOTICES be sent to the handler if they are off? So you're suggesting to add another BC break here, without a really good reason? :) What BC does it break? Some weirdo who logs all of his E_NOTICES? :) Andi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault, and msgs about deprecated
On Thu, 18 Dec 2003, Andi Gutmans wrote: At 10:24 PM 12/18/2003 +0100, Derick Rethans wrote: On Thu, 18 Dec 2003, Andi Gutmans wrote: In any case, I do think that the custom error handler being called for any error is bogus. Why should E_STRICT or E_NOTICES be sent to the handler if they are off? So you're suggesting to add another BC break here, without a really good reason? :) What BC does it break? Some weirdo who logs all of his E_NOTICES? :) Those can be the same weirdos which mix upper and lowercase function names ;-) Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault, and msgs about deprecated
Andi Gutmans wrote: At 10:24 PM 12/18/2003 +0100, Derick Rethans wrote: On Thu, 18 Dec 2003, Andi Gutmans wrote: In any case, I do think that the custom error handler being called for any error is bogus. Why should E_STRICT or E_NOTICES be sent to the handler if they are off? So you're suggesting to add another BC break here, without a really good reason? :) What BC does it break? Some weirdo who logs all of his E_NOTICES? :) Andi Look like I am an weirdo :) with an web farm of servers which log every NOTICE that appear. And even I think it was possible to catch a fatal error that happens in a required file with the way the error handler works now. Andrey -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault, and msgs about deprecated
On Thu, 2003-12-18 at 20:35, Andi Gutmans wrote: At 07:20 PM 12/18/2003 +0100, Christian Schneider wrote: Derick Rethans wrote: It won't bork all scripts with a custom errorhandler if their default action is to ignore core and other errors but only handle the ones they should handle. I do agree that it should be mentioned in the changes file though. On the other hand you have to be very careful (another way of saying 'avoid') using custom error_handlers anyway because http://bugs.php.net/bug.php?id=25547 will break your application. Still there in PHP 5.0.0b3RC1 Yeah this is a known bug and will have to be fixed in RC1. It's not a showstopper for B3. In any case, I do think that the custom error handler being called for any error is bogus. Why should E_STRICT or E_NOTICES be sent to the handler if they are off? Good question. Having an error handling function becomes really expensive if your code is not E_ALL-clean in a loop or something. IMHO the error_reporting mask should be applied before a user error handler is called. That's the solution with greatest flexibility. You can configure PHP to send all errors to the error handler if it's changed, but today it's impossible to prevent your handler from getting notices. I'm +1 on changing this. Anyway, I'm holding off with Beta 3 until we fix the --install-pear-packages problem. I'd call that a showstopper because it's something pretty basic. Has anyone managed to create a reproducing script or backtrace? It doesn't crash on my box :( Could someone with a crashing make install-pear-packages post the contents of their config.nice file and OS signature as well as gcc/libtool/autoconf versions? - Stig -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault, and msgs about deprecated
On Thu, 2003-12-18 at 22:56, Andi Gutmans wrote: At 10:24 PM 12/18/2003 +0100, Derick Rethans wrote: On Thu, 18 Dec 2003, Andi Gutmans wrote: In any case, I do think that the custom error handler being called for any error is bogus. Why should E_STRICT or E_NOTICES be sent to the handler if they are off? So you're suggesting to add another BC break here, without a really good reason? :) What BC does it break? Some weirdo who logs all of his E_NOTICES? :) Watch who you're calling a weirdo ;-) - Stig -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault, and msgs about deprecated
Stig S. Bakken wrote: Good question. Having an error handling function becomes really expensive if your code is not E_ALL-clean in a loop or something. if you set a custom error handler you know what you are doing and probably don't have such places in the code :) IMHO the error_reporting mask should be applied before a user error handler is called. That's the solution with greatest flexibility. You can configure PHP to send all errors to the error handler if it's changed, but today it's impossible to prevent your handler from getting notices. I'm +1 on changing this. me too (as already stated) Andrey -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault, and msgs about deprecated
On Thu, 18 Dec 2003, Stig S. Bakken wrote: Anyway, I'm holding off with Beta 3 until we fix the --install-pear-packages problem. I'd call that a showstopper because it's something pretty basic. Has anyone managed to create a reproducing script or backtrace? It doesn't crash on my box :( Neither does it forme, but it *does* give: [PEAR] HTTP - already installed: 1.2.1 /dat/dev/php/php-5.0dev/Zend/zend_hash.c(504) : ht=0x403592d0 is being destroyed regards, Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php