Bug #62281 [Fbk-Opn]: crash when method in extending class has different params than parent class
Edit report at https://bugs.php.net/bug.php?id=62281edit=1 ID: 62281 User updated by:michael dot stering at gmx dot net Reported by:michael dot stering at gmx dot net Summary:crash when method in extending class has different params than parent class -Status: Feedback +Status: Open Type: Bug Package:Class/Object related Operating System: Windows 7 Ultimate PHP Version:5.4.3 Block user comment: N Private report: N New Comment: Tried the r324251 for windows; works. Previous Comments: [2012-06-10 02:36:09] larue...@php.net Please try using this snapshot: http://snaps.php.net/php-trunk-latest.tar.gz For Windows: http://windows.php.net/snapshots/ a knew issue has been fixed [2012-06-09 19:22:50] michael dot stering at gmx dot net Description: When a method of a class which extends another class has the same name, but a different amount of parameters than the parent class, php seems to crash. Every browser tells that the website is not reachable. Wasn't able to get useful info from the logfiles. Test script: --- class basicUser { private function methodA() { echo hello; } } ... class extendedUser extends basicUser { private function methodA($var1) { echo bye!; } } Expected result: overloading methods with the same name, but different params shouldn't be that kind of problem! -- Edit this bug report at https://bugs.php.net/bug.php?id=62281edit=1
Bug #62281 [Opn-Csd]: crash when method in extending class has different params than parent class
Edit report at https://bugs.php.net/bug.php?id=62281edit=1 ID: 62281 Updated by: larue...@php.net Reported by:michael dot stering at gmx dot net Summary:crash when method in extending class has different params than parent class -Status: Open +Status: Closed Type: Bug Package:Class/Object related Operating System: Windows 7 Ultimate PHP Version:5.4.3 -Assigned To: +Assigned To:laruence Block user comment: N Private report: N New Comment: closed Previous Comments: [2012-06-10 08:08:35] michael dot stering at gmx dot net Tried the r324251 for windows; works. [2012-06-10 02:36:09] larue...@php.net Please try using this snapshot: http://snaps.php.net/php-trunk-latest.tar.gz For Windows: http://windows.php.net/snapshots/ a knew issue has been fixed [2012-06-09 19:22:50] michael dot stering at gmx dot net Description: When a method of a class which extends another class has the same name, but a different amount of parameters than the parent class, php seems to crash. Every browser tells that the website is not reachable. Wasn't able to get useful info from the logfiles. Test script: --- class basicUser { private function methodA() { echo hello; } } ... class extendedUser extends basicUser { private function methodA($var1) { echo bye!; } } Expected result: overloading methods with the same name, but different params shouldn't be that kind of problem! -- Edit this bug report at https://bugs.php.net/bug.php?id=62281edit=1
[PHP-BUG] Bug #62284 [NEW]: getimagesize does not work with all supported images
From: dnied at tiscali dot it Operating system: Linux, i386 PHP version: 5.3.13 Package: GetImageSize related Bug Type: Bug Bug description:getimagesize does not work with all supported images Description: The getimagesize function does not work with some (allegedly supported) images. I could not observe this on images stored locally, so it only seems to affect images retrieved via the http wrapper. FWIW, URL length doesn't seem to affect this: I tried a shortened URL for the image that didn't work, and it still didn't work. Test script: --- ~ php -r '$imgInfo = getimagesize(http://upload.wikimedia.org/wikipedia/commons/thumb/d/d9/Disney_Concert_Hall_by_Carol_Highsmith_edit2.jpg/767px-Disney_Concert_Hall_by_Carol_Highsmith_edit2.jpg;); print_r($imgInfo);' ~ ~ ~ php -r '$imgInfo = getimagesize(https://bugs.php.net/images/logo.gif;);print_r($imgInfo);' Array ( [0] = 130 [1] = 67 [2] = 1 [3] = width=130 height=67 [bits] = 8 [channels] = 3 [mime] = image/gif ) ~ Expected result: An array of image properties, for both images Actual result: -- A boolean false on the 1st image, the expected array of image properties on the 2nd one. -- Edit bug report at https://bugs.php.net/bug.php?id=62284edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62284r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62284r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62284r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62284r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62284r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62284r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62284r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62284r=needscript Try newer version: https://bugs.php.net/fix.php?id=62284r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62284r=support Expected behavior: https://bugs.php.net/fix.php?id=62284r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62284r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62284r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62284r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62284r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62284r=dst IIS Stability: https://bugs.php.net/fix.php?id=62284r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62284r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62284r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62284r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62284r=mysqlcfg
Bug #62284 [Opn]: getimagesize does not work with all supported images
Edit report at https://bugs.php.net/bug.php?id=62284edit=1 ID: 62284 Updated by: larue...@php.net Reported by:dnied at tiscali dot it Summary:getimagesize does not work with all supported images Status: Open Type: Bug Package:GetImageSize related Operating System: Linux, i386 PHP Version:5.3.13 Block user comment: N Private report: N New Comment: I can not reproduce this, is the network to wikimedia okey? Previous Comments: [2012-06-10 14:01:16] dnied at tiscali dot it Description: The getimagesize function does not work with some (allegedly supported) images. I could not observe this on images stored locally, so it only seems to affect images retrieved via the http wrapper. FWIW, URL length doesn't seem to affect this: I tried a shortened URL for the image that didn't work, and it still didn't work. Test script: --- ~ php -r '$imgInfo = getimagesize(http://upload.wikimedia.org/wikipedia/commons/thumb/d/d9/Disney_Concert_Hall_by_Carol_Highsmith_edit2.jpg/767px-Disney_Concert_Hall_by_Carol_Highsmith_edit2.jpg;); print_r($imgInfo);' ~ ~ ~ php -r '$imgInfo = getimagesize(https://bugs.php.net/images/logo.gif;);print_r($imgInfo);' Array ( [0] = 130 [1] = 67 [2] = 1 [3] = width=130 height=67 [bits] = 8 [channels] = 3 [mime] = image/gif ) ~ Expected result: An array of image properties, for both images Actual result: -- A boolean false on the 1st image, the expected array of image properties on the 2nd one. -- Edit this bug report at https://bugs.php.net/bug.php?id=62284edit=1
Bug #62284 [Opn]: getimagesize does not work with all supported images
Edit report at https://bugs.php.net/bug.php?id=62284edit=1 ID: 62284 User updated by:dnied at tiscali dot it Reported by:dnied at tiscali dot it Summary:getimagesize does not work with all supported images Status: Open Type: Bug Package:GetImageSize related Operating System: Linux, i386 PHP Version:5.3.13 Block user comment: N Private report: N New Comment: Yes, I can get the non-working image with my browser and with wget. Your comment made me think of a config issue, so I tried an original, untouched php.ini file with all extensions enabled (not that my own php.ini was really tweaked). Still, no go. I do get a couple of warnings for 2 missing libs, but they look unrelated to me (one is a spell-checking lib, the other is SQLite3 -- neither is documented as a dependency to getimagesize): PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/enchant.so' - /usr/lib/php/extensions/enchant.so: cannot open shared object file: No such file or directory in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/enchant.so' - /usr/lib/php/extensions/enchant.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/sqlite3.so' - /usr/lib/php/extensions/sqlite3.so: cannot open shared object file: No such file or directory in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/sqlite3.so' - /usr/lib/php/extensions/sqlite3.so: cannot open shared object file: No such file or directory in Unknown on line 0 Previous Comments: [2012-06-10 15:17:09] larue...@php.net I can not reproduce this, is the network to wikimedia okey? [2012-06-10 14:01:16] dnied at tiscali dot it Description: The getimagesize function does not work with some (allegedly supported) images. I could not observe this on images stored locally, so it only seems to affect images retrieved via the http wrapper. FWIW, URL length doesn't seem to affect this: I tried a shortened URL for the image that didn't work, and it still didn't work. Test script: --- ~ php -r '$imgInfo = getimagesize(http://upload.wikimedia.org/wikipedia/commons/thumb/d/d9/Disney_Concert_Hall_by_Carol_Highsmith_edit2.jpg/767px-Disney_Concert_Hall_by_Carol_Highsmith_edit2.jpg;); print_r($imgInfo);' ~ ~ ~ php -r '$imgInfo = getimagesize(https://bugs.php.net/images/logo.gif;);print_r($imgInfo);' Array ( [0] = 130 [1] = 67 [2] = 1 [3] = width=130 height=67 [bits] = 8 [channels] = 3 [mime] = image/gif ) ~ Expected result: An array of image properties, for both images Actual result: -- A boolean false on the 1st image, the expected array of image properties on the 2nd one. -- Edit this bug report at https://bugs.php.net/bug.php?id=62284edit=1
Bug #62265 [Opn]: crash with static member followed by 2+ non-static members
Edit report at https://bugs.php.net/bug.php?id=62265edit=1 ID: 62265 User updated by:lomo74 at gmail dot com Reported by:lomo74 at gmail dot com Summary:crash with static member followed by 2+ non-static members Status: Open Type: Bug Package:Reproducible crash Operating System: Windows 7 PHP Version:5.4.3 Block user comment: N Private report: N New Comment: I apologize. I further tracked down the problem and it seems it is due to XDebug: http://bugs.xdebug.org/view.php?id=824 If noone has objections, I'm closing this report -- Previous Comments: [2012-06-08 23:24:05] ni...@php.net Could you check whether the issue also exists when running PHP from the commandline (cli)? This way one could exclude the IIS and FastCGI parts of the chain. [2012-06-08 17:17:18] lomo74 at gmail dot com just tested on a Windows 2003 machine + IIS + PHP FastCGI 5.4.3, it is not affected. will test on another Windows 7 machine ASAP. [2012-06-08 15:55:27] lomo74 at gmail dot com Description: using IIS + FastCGI PHP 5.4.3 on a Win7 machine. declaring a class that contains a static var followed by two or more non-static vars, the engine crashes when you try to instantiate the class. my Linux machine (Apache + PHP 5.4.3) is not affected by this issue. Test script: --- ?php class MYTest1 { static $data; } class MYTest2 { static $data; var $a; } class MYTest3 { static $data; var $a; var $b; } $obj = new MYTest1(); //ok $obj = new MYTest2(); //ok //the following crashes PHP $obj = new MYTest3(); echo Still alive.; //won't print ? Expected result: the string Still alive. Actual result: -- no output at all. -- Edit this bug report at https://bugs.php.net/bug.php?id=62265edit=1
Bug #62265 [Opn-Nab]: crash with static member followed by 2+ non-static members
Edit report at https://bugs.php.net/bug.php?id=62265edit=1 ID: 62265 Updated by: fel...@php.net Reported by:lomo74 at gmail dot com Summary:crash with static member followed by 2+ non-static members -Status: Open +Status: Not a bug Type: Bug Package:Reproducible crash Operating System: Windows 7 PHP Version:5.4.3 Block user comment: N Private report: N New Comment: Thanks. Previous Comments: [2012-06-10 16:02:14] lomo74 at gmail dot com I apologize. I further tracked down the problem and it seems it is due to XDebug: http://bugs.xdebug.org/view.php?id=824 If noone has objections, I'm closing this report -- [2012-06-08 23:24:05] ni...@php.net Could you check whether the issue also exists when running PHP from the commandline (cli)? This way one could exclude the IIS and FastCGI parts of the chain. [2012-06-08 17:17:18] lomo74 at gmail dot com just tested on a Windows 2003 machine + IIS + PHP FastCGI 5.4.3, it is not affected. will test on another Windows 7 machine ASAP. [2012-06-08 15:55:27] lomo74 at gmail dot com Description: using IIS + FastCGI PHP 5.4.3 on a Win7 machine. declaring a class that contains a static var followed by two or more non-static vars, the engine crashes when you try to instantiate the class. my Linux machine (Apache + PHP 5.4.3) is not affected by this issue. Test script: --- ?php class MYTest1 { static $data; } class MYTest2 { static $data; var $a; } class MYTest3 { static $data; var $a; var $b; } $obj = new MYTest1(); //ok $obj = new MYTest2(); //ok //the following crashes PHP $obj = new MYTest3(); echo Still alive.; //won't print ? Expected result: the string Still alive. Actual result: -- no output at all. -- Edit this bug report at https://bugs.php.net/bug.php?id=62265edit=1
Bug #52412 [Com]: __autoload fails to throw exception when calling a static method on the class
Edit report at https://bugs.php.net/bug.php?id=52412edit=1 ID: 52412 Comment by: rahuijts at tiscali dot nl Reported by:madboyka at yahoo dot com Summary:__autoload fails to throw exception when calling a static method on the class Status: Not a bug Type: Bug Package:Scripting Engine problem Operating System: * PHP Version:5.3.3 Block user comment: N Private report: N New Comment: Please - explain (and let the documentation show) why it is not possible to throw an exception in the __autoload function if a static call is made on a non-existing class, when it is possible to do so if a non-existing class is instantiated, - or reopen this bug report to acknowledge that it should be possible in both cases but currently fails for static calls due to a bug in PHP. The documentation indeed supports the case for this bug report, but to defend der...@php.net as well: the first part of his response is probably a template text when marking a report as Not a bug. The rest of his message does not mention static calling, which is essential for the problem to occur, so I think he closed the report because he missed that point. Please let us know, because the current status is very confusing. Previous Comments: [2011-02-21 19:35:10] php dot net at phrozenbyte dot de I support this re-opening-request... Since 5.3 __autoload() is definitly *not* the last line of defense for PHP to find a class definition. That's simply wrong. http://www.php.net/manual/en/language.oop5.autoload.php (Note #1 + Example #3) http://www.php.net/manual/en/language.oop5.changelog.php (#5) [2011-02-19 23:06:12] michael at squiloople dot com Here's a request to re-open the bug, for it is indeed a bug: exceptions can be thrown and caught if the method called is _not_ static, as documented, but cannot be thrown and caught if the method _is_ static (and where the class name is not a variable), which is both inconsistent and against the documentation. It is _unexpected_ behaviour. [2011-02-16 15:31:49] madboyka at yahoo dot com To: der...@php.net I don't think you've read the documentation on autoloading yourself: http://www.php.net/manual/en/language.oop5.autoload.php The first note states that since PHP 5.3, you may throw an exception from the autoload function (even if the class can be loaded) and catch that exception without a problem. Examples #3 and #4 in the documentation entry demonstrate this. This works when the autoload function gets invoked when instantiating a class, but doesn't when you make a static call on it. This behavior is not consistent. Also, take a look at michael@...'s workaround, which unexpectedly works great. And don't tell me that PHP behaves as expected. I understand, that this is not a major bug, we all can live without a fix, but at least mark it as to be fixed in the far future. [2011-02-16 11:24:38] der...@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php FWIW, this is expected. The __autoload() method is the last line of defense for PHP to find a class definition. If it can't find it, PHP bails out with a fatal error. If you throw an exception, you basically abort this final chance, and thus gives PHP you that fatal can not find class error. However, you can catch the exception in the __autoload() method, [2011-02-16 08:05:14] michael at squiloople dot com There's a slight hack of a solution tested using PHP 5.3.5 and Windows Vista: use a variable as the class name: function __autoload($class) { if (!include $class . '.php') { throw new Exception('Cannot autoload ' . $class); } } $class = 'Application'; try { $class::start(); } catch (Exception $e) { echo $e-getMessage(); } // Outputs the exception as expected. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=52412 -- Edit this bug report at https://bugs.php.net/bug.php?id=52412edit=1
Bug #62234 [Com]: PHP crashes if a trait + alias is used.
Edit report at https://bugs.php.net/bug.php?id=62234edit=1 ID: 62234 Comment by: j dot amend at gmail dot com Reported by:manchokapitancho at gmail dot com Summary:PHP crashes if a trait + alias is used. Status: Open Type: Bug Package:Reproducible crash Operating System: win 7 PHP Version:5.4.5-dev Block user comment: N Private report: N New Comment: The Windows snapshots page seems to be broken since the git migration (https://bugs.php.net/bug.php?id=61712). I found the latest snapshot here though: http://windows.php.net/downloads/snaps/php-5.4/r51a5e98/php-5.4-nts-windows-vc9-x86-r51a5e98.zip Previous Comments: [2012-06-06 12:02:44] manchokapitancho at gmail dot com Tried this one: For Windows: http://windows.php.net/snapshots/ But when I click on the link (VC9 x86 Thread Safe Zip [15.27MB]) I get the following error: The page cannot be found. I hope that someone will fix the windows build links. Then I can try again. [2012-06-06 08:09:30] larue...@php.net Please try using this snapshot: http://snaps.php.net/php-trunk-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2012-06-06 06:32:09] manchokapitancho at gmail dot com Reopening... [2012-06-06 06:31:48] manchokapitancho at gmail dot com Sorry, my fault. The bug is still there. If I don't have aliases, everything is fine. But once I uncomment one, the error is back. Tried 5.5.0-dev and 5.4.5-dev. class XXX { use \logi\tile\html\feature { getTemplateNames as getTemplateNamesBase; } protected function getTemplateNames() { $tpls = (array)$this-getTemplateNamesBase(); array_push ($tpls, /listing\\template); array_push ($tpls, admin\\listing\\template); return $tpls; } } It is worth mentioning that the trait is autoloaded. [2012-06-06 06:06:54] manchokapitancho at gmail dot com My bug seems to be a duplicate of this one. https://bugs.php.net/bug.php?id=61998 I had 3 occurrences of use X as Y. After removing them, there were no more crashes. I tried the latest snapshot and I have no more problems with the original code. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=62234 -- Edit this bug report at https://bugs.php.net/bug.php?id=62234edit=1