我想从php5.6和symfony2升级到php7和symfony3。我有一些symfony控制台命令,它使用soap来请求第三方API。
升级到 php7和 php7.0-soap 后,但命令失败并出现分段错误。我尝试使用 gdb 进行调试,下面是跟踪。看起来这是php7.0-soap的问题?解决方案是什么?
Program received signal SIGSEGV, Segmentation fault.
0x00005555557bc4db in zend_hash_destroy ()
(gdb) bt
#0 0x00005555557bc4db in zend_hash_destroy ()
#1 0x00007fffecbbe141 in delete_type_persistent () from /usr/lib/php/20151012/soap.so
#2 0x00005555557bc5dd in zend_hash_destroy ()
#3 0x00007fffecbc55f1 in ?? () from /usr/lib/php/20151012/soap.so
#4 0x00007fffecbc565f in ?? () from /usr/lib/php/20151012/soap.so
#5 0x00005555557bc4d2 in zend_hash_destroy ()
#6 0x00007fffecb95f0b in zm_shutdown_soap () from /usr/lib/php/20151012/soap.so
#7 0x00005555557b25f3 in module_destructor ()
#8 0x00005555557ab08c in ?? ()
#9 0x00005555557bd048 in zend_hash_graceful_reverse_destroy ()
#10 0x00005555557ac055 in zend_shutdown ()
#11 0x000055555574fb3b in php_module_shutdown ()
#12 0x000055555563d796 in main ()
你暂时不能在 PHP7 中使用WSDL_CACHE_MEMORY
(或WSDL_CACHE_BOTH
):https://bugs.php.net/bug.php?id=71931
通过在php.ini
中设置soap.wsdl_cache
来改用WSDL_CACHE_DISK
,或者 - 如果您无权访问php.ini
- 使用ini_set
:
ini_set('soap.wsdl_cache', WSDL_CACHE_DISK);