|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-04-12 00:52 UTC] test1 at boxaroo dot com
Description: ------------ I get a segault when talking to PayPal via SOAP. It seems like the segfault happens AFTER the Soap call has happened, because I can usually dump the results to the screen just before the crash. This happens on a Mac system with PHP 5.2.4 and a Linux system with 5.2.5. I have tried 3 different ways of talking to PayPal; one using their SDK, one using straight SOAP code I wrote, and one using a SOAP wrapper library I found. All crash the same way. I use SOAP for tons of other things (eBay, for instance) without issues. Reproduce code: --------------- http://img1.boxaroo.com/images/php_soap_segv.txt And, BTW, you do *not* need to put in your PayPal info (I have mine replaced with '---'). It still crashes in the same way whether it accepts your creds or not. Expected result: ---------------- Should just be a dump of the return; instead you should see the segfault. Actual result: -------------- Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x2a26b9e5 0x0028ef3e in zend_objects_store_del_ref_by_handle () (gdb) bt #0 0x0028ef3e in zend_objects_store_del_ref_by_handle () #1 0x0028f0b1 in zend_objects_store_del_ref () #2 0x00264ce7 in _zval_ptr_dtor () #3 0x0027bf90 in zend_hash_destroy () #4 0x0028bb22 in zend_object_std_dtor () #5 0x0028bb4a in zend_objects_free_object_storage () #6 0x0028f097 in zend_objects_store_del_ref_by_handle () #7 0x0028f0b1 in zend_objects_store_del_ref () #8 0x00264ce7 in _zval_ptr_dtor () #9 0x0027bf90 in zend_hash_destroy () #10 0x0028bb22 in zend_object_std_dtor () #11 0x0028bb4a in zend_objects_free_object_storage () #12 0x0028f097 in zend_objects_store_del_ref_by_handle () #13 0x0028f0b1 in zend_objects_store_del_ref () #14 0x00264ce7 in _zval_ptr_dtor () #15 0x0027c12a in zend_hash_apply_deleter () #16 0x0027c47c in zend_hash_reverse_apply () #17 0x00263fba in shutdown_destructors () #18 0x00272541 in zend_call_destructors () #19 0x0022dee3 in php_request_shutdown () #20 0x0030243a in main () PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 19:00:01 2025 UTC |
Segmentation fault also occurs on Ubuntu 9.10 with PHP 5.2.4. The problem is located in php-sdk/lib/PayPal/SOAP/Client.php : function &__decodeResponse(&$response, $shift = true) { ... // Decode to native php datatype. $returnArray =& $this->_decode($response); // HERE ... } The solution : function _decode_fix($soapvalue) { return parent::_decode($soapvalue); } function &__decodeResponse(&$response, $shift = true) { ... // Decode to native php datatype. $returnArray =& $this->_decode_fix($response); ... } Note that simply replacing the "HERE" line by : $returnArray = parent::_decode($soapvalue); will NOT remove the segmentation fault, you have to call it from another method, like _decode_fix