php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51696 Bug #49800 is not a bug - must be rolled back
Submitted: 2010-04-29 18:28 UTC Modified: 2010-05-03 15:35 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: david dot coleman at globant dot com Assigned: iliaa (profile)
Status: Not a bug Package: SimpleXML related
PHP Version: 5.3.2 OS: all
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: david dot coleman at globant dot com
New email:
PHP Version: OS:

 

 [2010-04-29 18:28 UTC] david dot coleman at globant dot com
Description:
------------
Bug #49800  	SimpleXML allow serialize() calls without warning

This bug is not a bug.  The "fix" that has been put in place for PHP 5.3.2 breaks memcached horribly.

please see (censored) stack trace as posted in the "actual result" box on this form.

This functionality MUST be allowed to maintain compatibility with existing systems.

Thank you in advance for un-"fixing" this.

David Coleman
david.coleman@globant.com
david_coleman_007@hotmail.com


{"error":{"code":500,"message":"Serialization of 'SimpleXMLElement' is not allowed","debug":{"name":"Exception","message":"Serialization of 'SimpleXMLElement' is not allowed","traces":["at () in \/opt\/workspace\/NDA_DOMAIN.COM\/NDA_MODULE_LOCATION\/0.99.2.1\/lib\/memcache\/NDA_PREFIX_Memcache.class.php line n\/a","at Memcache->set() in \/opt\/workspace\/NDA_DOMAIN.COM\/NDA_MODULE_LOCATION\/0.99.2.1\/lib\/memcache\/NDA_PREFIX_Memcache.class.php line 0","at NDA_PREFIX_Memcache->set('NDA_REQUEST::a9f15d6cc587244cf26106655829de64edf1ae74', object('NDA_PREFIX_FuzzyMemcacheValueWrapper'), '1', '1') in \/opt\/workspace\/NDA_DOMAIN.COM\/NDA_MODULE_LOCATION\/0.99.2.1\/lib\/memcache\/NDA_PREFIX_FuzzyMemcache.class.php line 162","at NDA_PREFIX_FuzzyMemcache->set('NDA_REQUEST::a9f15d6cc587244cf26106655829de64edf1ae74', array(object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT')), '1', '1') in \/opt\/workspace\/NDA_DOMAIN.COM\/NDA_MODULE_LOCATION\/0.99.2.1\/lib\/rest\/common\/NDA_REQUEST.class.php line 878","at NDA_REQUEST->createAndCacheResponseValue(null) in \/opt\/workspace\/NDA_DOMAIN.COM\/NDA_MODULE_LOCATION\/0.99.2.1\/lib\/rest\/common\/NDA_REQUEST.class.php line 819","at NDA_REQUEST->call(null) in \/opt\/workspace\/NDA_DOMAIN.COM\/NDA_MODULE_LOCATION\/0.99.2.1\/lib\/rest\/common\/NDA_REQUEST.class.php line 706","at NDA_REQUEST->get() in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/NDA_PREFIX_WorkoutGroupPlugin\/lib\/NDA_PREFIX_WorkoutGroupPeer.class.php line 241","at NDA_PREFIX_WorkoutGroupPeer::getResults('693A0001', '382129543', '1270080000', '1272585600') in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/NDA_PREFIX_JournalHubPlugin\/lib\/models\/NDA_PREFIX_CalendarMonth.model.php line 74","at NDA_PREFIX_CalendarMonth->buildDayDataArray() in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/NDA_PREFIX_JournalHubPlugin\/lib\/models\/NDA_PREFIX_CalendarMonth.model.php line 166","at NDA_PREFIX_CalendarMonth->setReferenceTimestamp('1272549514') in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/NDA_PREFIX_JournalHubPlugin\/lib\/models\/NDA_PREFIX_CalendarMonth.model.php line 54","at NDA_PREFIX_CalendarMonth->__construct('1272549514') in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/NDA_PREFIX_JournalHubPlugin\/lib\/helpers\/NDA_PREFIX_JournalHubMainCalendarHelper.class.php line 50","at NDA_PREFIX_JournalHubMainCalendarHelper::buildDomJson('1272549514') in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/NDA_PREFIX_WorkoutGroupPlugin\/modules\/NDA_PREFIX_WorkoutGroupServices\/actions\/actions.class.php line 109","at NDA_PREFIX_WorkoutGroupServicesActions->getMainCalendarData('1272549514') in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/NDA_PREFIX_WorkoutGroupPlugin\/modules\/NDA_PREFIX_WorkoutGroupServices\/actions\/actions.class.php line 104","at NDA_PREFIX_WorkoutGroupServicesActions->executeWorkoutGroupResults(object('sfWebRequest')) in SF_SYMFONY_LIB_DIR\/action\/sfActions.class.php line 53","at sfActions->execute(object('sfWebRequest')) in SF_SYMFONY_LIB_DIR\/filter\/sfExecutionFilter.class.php line 90","at sfExecutionFilter->executeAction(object('NDA_PREFIX_WorkoutGroupServicesActions')) in SF_SYMFONY_LIB_DIR\/filter\/sfExecutionFilter.class.php line 76","at sfExecutionFilter->handleAction(object('sfFilterChain'), object('NDA_PREFIX_WorkoutGroupServicesActions')) in SF_SYMFONY_LIB_DIR\/filter\/sfExecutionFilter.class.php line 42","at sfExecutionFilter->execute(object('sfFilterChain')) in SF_SYMFONY_LIB_DIR\/filter\/sfFilterChain.class.php line 53","at sfFilterChain->execute() in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/engEngineSupportPlugin\/lib\/filter\/engTokenExtensionFilter.class.php line 82","at engTokenExtensionFilter->execute(object('sfFilterChain')) in SF_SYMFONY_LIB_DIR\/filter\/sfFilterChain.class.php line 53","at sfFilterChain->execute() in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/escAlfrescoPlugin\/lib\/filters\/escAlfrescoPreviewFilter.class.php line 19","at escAlfrescoPreviewFilter->execute(object('sfFilterChain')) in SF_SYMFONY_LIB_DIR\/filter\/sfFilterChain.class.php line 53","at sfFilterChain->execute() in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/engEngineSupportPlugin\/lib\/filter\/engIdmSessionSyncFilter.class.php line 78","at engIdmSessionSyncFilter->execute(object('sfFilterChain')) in SF_SYMFONY_LIB_DIR\/filter\/sfFilterChain.class.php line 53","at sfFilterChain->execute() in SF_SYMFONY_LIB_DIR\/filter\/sfRenderingFilter.class.php line 33","at sfRenderingFilter->execute(object('sfFilterChain')) in SF_SYMFONY_LIB_DIR\/filter\/sfFilterChain.class.php line 53","at sfFilterChain->execute() in SF_SYMFONY_LIB_DIR\/controller\/sfController.class.php line 245","at sfController->forward('NDA_PREFIX_WorkoutGroupServices', 'workoutGroupResults') in SF_SYMFONY_LIB_DIR\/controller\/sfFrontWebController.class.php line 48","at sfFrontWebController->dispatch() in SF_SYMFONY_LIB_DIR\/util\/sfContext.class.php line 159","at sfContext->dispatch() in SF_ROOT_DIR\/web\/NDA_DOMAINcom_dev.php line 6"]}}}



Expected result:
----------------
NDA_WIDGET renders properly with out exploding internally on symfony's memcached layer.

Actual result:
--------------
{"error":{"code":500,"message":"Serialization of 'SimpleXMLElement' is not allowed","debug":{"name":"Exception","message":"Serialization of 'SimpleXMLElement' is not allowed","traces":["at () in \/opt\/workspace\/NDA_DOMAIN.COM\/NDA_MODULE_LOCATION\/0.99.2.1\/lib\/memcache\/NDA_PREFIX_Memcache.class.php line n\/a","at Memcache->set() in \/opt\/workspace\/NDA_DOMAIN.COM\/NDA_MODULE_LOCATION\/0.99.2.1\/lib\/memcache\/NDA_PREFIX_Memcache.class.php line 0","at NDA_PREFIX_Memcache->set('NDA_REQUEST::a9f15d6cc587244cf26106655829de64edf1ae74', object('NDA_PREFIX_FuzzyMemcacheValueWrapper'), '1', '1') in \/opt\/workspace\/NDA_DOMAIN.COM\/NDA_MODULE_LOCATION\/0.99.2.1\/lib\/memcache\/NDA_PREFIX_FuzzyMemcache.class.php line 162","at NDA_PREFIX_FuzzyMemcache->set('NDA_REQUEST::a9f15d6cc587244cf26106655829de64edf1ae74', array(object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT'), object<\/em>('NDA_OBJECT')), '1', '1') in \/opt\/workspace\/NDA_DOMAIN.COM\/NDA_MODULE_LOCATION\/0.99.2.1\/lib\/rest\/common\/NDA_REQUEST.class.php line 878","at NDA_REQUEST->createAndCacheResponseValue(null) in \/opt\/workspace\/NDA_DOMAIN.COM\/NDA_MODULE_LOCATION\/0.99.2.1\/lib\/rest\/common\/NDA_REQUEST.class.php line 819","at NDA_REQUEST->call(null) in \/opt\/workspace\/NDA_DOMAIN.COM\/NDA_MODULE_LOCATION\/0.99.2.1\/lib\/rest\/common\/NDA_REQUEST.class.php line 706","at NDA_REQUEST->get() in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/NDA_PREFIX_WorkoutGroupPlugin\/lib\/NDA_PREFIX_WorkoutGroupPeer.class.php line 241","at NDA_PREFIX_WorkoutGroupPeer::getResults('693A0001', '382129543', '1270080000', '1272585600') in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/NDA_PREFIX_JournalHubPlugin\/lib\/models\/NDA_PREFIX_CalendarMonth.model.php line 74","at NDA_PREFIX_CalendarMonth->buildDayDataArray() in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/NDA_PREFIX_JournalHubPlugin\/lib\/models\/NDA_PREFIX_CalendarMonth.model.php line 166","at NDA_PREFIX_CalendarMonth->setReferenceTimestamp('1272549514') in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/NDA_PREFIX_JournalHubPlugin\/lib\/models\/NDA_PREFIX_CalendarMonth.model.php line 54","at NDA_PREFIX_CalendarMonth->__construct('1272549514') in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/NDA_PREFIX_JournalHubPlugin\/lib\/helpers\/NDA_PREFIX_JournalHubMainCalendarHelper.class.php line 50","at NDA_PREFIX_JournalHubMainCalendarHelper::buildDomJson('1272549514') in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/NDA_PREFIX_WorkoutGroupPlugin\/modules\/NDA_PREFIX_WorkoutGroupServices\/actions\/actions.class.php line 109","at NDA_PREFIX_WorkoutGroupServicesActions->getMainCalendarData('1272549514') in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/NDA_PREFIX_WorkoutGroupPlugin\/modules\/NDA_PREFIX_WorkoutGroupServices\/actions\/actions.class.php line 104","at NDA_PREFIX_WorkoutGroupServicesActions->executeWorkoutGroupResults(object('sfWebRequest')) in SF_SYMFONY_LIB_DIR\/action\/sfActions.class.php line 53","at sfActions->execute(object('sfWebRequest')) in SF_SYMFONY_LIB_DIR\/filter\/sfExecutionFilter.class.php line 90","at sfExecutionFilter->executeAction(object('NDA_PREFIX_WorkoutGroupServicesActions')) in SF_SYMFONY_LIB_DIR\/filter\/sfExecutionFilter.class.php line 76","at sfExecutionFilter->handleAction(object('sfFilterChain'), object('NDA_PREFIX_WorkoutGroupServicesActions')) in SF_SYMFONY_LIB_DIR\/filter\/sfExecutionFilter.class.php line 42","at sfExecutionFilter->execute(object('sfFilterChain')) in SF_SYMFONY_LIB_DIR\/filter\/sfFilterChain.class.php line 53","at sfFilterChain->execute() in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/engEngineSupportPlugin\/lib\/filter\/engTokenExtensionFilter.class.php line 82","at engTokenExtensionFilter->execute(object('sfFilterChain')) in SF_SYMFONY_LIB_DIR\/filter\/sfFilterChain.class.php line 53","at sfFilterChain->execute() in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/escAlfrescoPlugin\/lib\/filters\/escAlfrescoPreviewFilter.class.php line 19","at escAlfrescoPreviewFilter->execute(object('sfFilterChain')) in SF_SYMFONY_LIB_DIR\/filter\/sfFilterChain.class.php line 53","at sfFilterChain->execute() in \/opt\/workspace\/NDA_DOMAIN.com\/plugins\/engEngineSupportPlugin\/lib\/filter\/engIdmSessionSyncFilter.class.php line 78","at engIdmSessionSyncFilter->execute(object('sfFilterChain')) in SF_SYMFONY_LIB_DIR\/filter\/sfFilterChain.class.php line 53","at sfFilterChain->execute() in SF_SYMFONY_LIB_DIR\/filter\/sfRenderingFilter.class.php line 33","at sfRenderingFilter->execute(object('sfFilterChain')) in SF_SYMFONY_LIB_DIR\/filter\/sfFilterChain.class.php line 53","at sfFilterChain->execute() in SF_SYMFONY_LIB_DIR\/controller\/sfController.class.php line 245","at sfController->forward('NDA_PREFIX_WorkoutGroupServices', 'workoutGroupResults') in SF_SYMFONY_LIB_DIR\/controller\/sfFrontWebController.class.php line 48","at sfFrontWebController->dispatch() in SF_SYMFONY_LIB_DIR\/util\/sfContext.class.php line 159","at sfContext->dispatch() in SF_ROOT_DIR\/web\/NDA_DOMAINcom_dev.php line 6"]}}}



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-29 23:53 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: iliaa
 [2010-05-03 15:35 UTC] iliaa@php.net
-Status: Assigned +Status: Bogus
 [2010-05-03 15:35 UTC] iliaa@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

You cannot serialize SimpleXML objects.
 [2010-05-24 13:01 UTC] php at mylnf dot de
Hello,

serializing SimpleXML-Objects should not be the case - it's useful e.g. to convert xml to array via

$aXml = unserialize(str_replace('O:16:"SimpleXMLElement"','a', serialize($oXml)));

or, of course for logging issues where the original xml-string (via ->asXML()) is not necessary.

As serialization won't even issue a notice prior to 5.3.2, it's a very radical approach and so, as serialization is very common, the goal should be to make SimpleXML (and DOMDocument, which is still serialize-able) fully serialize-able.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 23:01:28 2024 UTC