#10222 closed defect (bug) (fixed)
Fatal error: Trying to clone an uncloneable object of class ReflectionClass in /var/www/htdocs/syz/html/wp-includes/class-simplepie.php on line 11739...
Reported by: | codestyling | Owned by: | |
---|---|---|---|
Milestone: | 2.8.1 | Priority: | highest omg bbq |
Severity: | blocker | Version: | 2.8 |
Component: | Administration | Keywords: | malfunction of wordpress scripting |
Focuses: | Cc: |
Description
This is no direct issue of WordPress own code but inside the shipped SimplePie classes. They use Reflections code, which is only available at PHP5.
Furthermore the addressed line tries to clone using Reflection API a class and crashes while the provider didn't configure a specific setting correctly. Reflections only works properly if
zend.ze1_compatibility_mode=Off in php.ini
as can be read here http://docs.php.net/manual/de/language.oop5.reflection.php#79578 and has been tested successfully by an user of german WordPress forum have had this issue.
I don't know, how the solution could look like, because this are more issues in one case:
- PHP 5 usage (even if WordPress claims to be compatible with PHP 4)
- wrong provider setting avoid proper function of WordPress if using PHP 5
One possible solution could be to show up during install the test result of reading this value and in case of PHP 5 and On a warning could be presented.
I'm afraid, this is not the best solution but it is one. Please find a way to handle this type of issue safely.
Attachments (2)
Change History (18)
#1
@
16 years ago
- Component changed from Upgrade/Install to Administration
- Keywords crash removed
- Owner dd32 deleted
#2
@
16 years ago
- Keywords malfunction of wordpress scripting added
- Priority changed from high to highest omg bbq
- Severity changed from critical to blocker
After testing this setting on PHP 5 version set to On the Dashboard comes up but nothing was working, no javascript will be delivered, the quick edit is missing, the RSS boxes are missing and no javascript based interaction is possible!
I attached a patch for SimplePie disables PHP 5 usage more specific but this doesn't solve the malfunction of Dashboard or entire WP. Furthermore no TinyMCE Editor can be used, simply nothing requires javascripts is working.
Please check and test it, why this set WordPress out of function in this way.
#3
follow-up:
↓ 4
@
16 years ago
simply nothing requires javascripts is working.
Have you disabled All plugins and switched to the default theme? Some plugins load incompatible versions of Javascript libraries, such as jQuery, which can cause issues like no JS loading..
#4
in reply to:
↑ 3
@
16 years ago
Replying to dd32:
simply nothing requires javascripts is working.
Have you disabled All plugins and switched to the default theme? Some plugins load incompatible versions of Javascript libraries, such as jQuery, which can cause issues like no JS loading..
Yes, i did. WP 2.8 in pure install, default theme and no plugins.
The Dasboard is damaged because of
<b>Fatal error</b>: Trying to clone an uncloneable object of class ReflectionClass in <b>C:\Program Files (x86)\xampp\htdocs\_root_wp28\wp-includes\class-simplepie.php</b> on line <b>11740</b><br />
this is again driven by a missing PHP 5 test even if the constant now respects mis-configuration:
function SimplePie_Parse_Date() { $this->day_pcre = '(' . implode(array_keys($this->day), '|') . ')'; $this->month_pcre = '(' . implode(array_keys($this->month), '|') . ')'; static $cache; if (!isset($cache[get_class($this)])) { if (extension_loaded('Reflection')) { $class = new ReflectionClass(get_class($this));
No safety test is made to test if a PHP 5 can be used.
#5
@
16 years ago
Oh now i understand.
I suggest you submit the patch upstream to the SimplePie bug tracker then as well.
#6
@
16 years ago
But i'm afraid there have to be spend more time to solve all inside SimplePie, because i did now some more safety checks inplace (additional patches) and got now the Quick edit back and also some feeds but in the last 2 feed boxes now this occures:
Fatal error: Maximum execution time of 60 seconds exceeded in C:\Program Files (x86)\xampp\htdocs\_root_wp28\wp-includes\class-simplepie.php on line 3087
This is related to the destruction of SimplePie element here:
/** * Remove items that link back to this before destroying this object */ function __destruct() { unset($this->feed); }
#9
@
16 years ago
Patch does avoid the errors, but the dashboard modules are really slow to load or don't load at all with zend.ze1_compatibility_mode on.
#10
@
16 years ago
The patch of SimplePie has been made to avoid this issue at: http://bugs.simplepie.org/repositories/diff/sp1/trunk/simplepie.inc?rev=1058
Could this be merged somehow ?
#13
@
16 years ago
1058 by itself doesn't seem to help. Looks like we need both, but need a different means of looping on that one line. Maybe do a for loop instead of foreach?
The version of SimplePie in use is PHP4 compatible, The ReflectionClass is only used if that extension is available (Which its not on PHP4 obviously)
Host mis-configurations are probably outside of the scope of what wordpress should be alerting on..