php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52922 fastcgi & SoapClient & set_error_handler cause core
Submitted: 2010-09-25 08:53 UTC Modified: 2021-09-05 04:22 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: gaosimeng at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: SOAP related
PHP Version: 5.3.3 OS: Linux 2.6.18.8-xenU
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: gaosimeng at gmail dot com
New email:
PHP Version: OS:

 

 [2010-09-25 08:53 UTC] gaosimeng at gmail dot com
Description:
------------
I use apache2.0 & fastcgi, and the Network for me is unreachable.
When I try to new the SoapClient the first time.
I get this: 
[soapclient.soapclient]: failed to open stream: Network is unreachable
It seems ok. 
But then I try the second(or third) time, I get a core.

The way I started the fastcgi:
PHP_FCGI_CHILDREN=1
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec php/bin/php-cgi -b 127.0.0.1:7654 -c php/etc/php.ini

Test script:
---------------
<?php

function err_handler(){
        $error = func_get_args();
        echo $error[0]."        ".$error[1]."   ".$error[2]."   ".$error[3]."\n";
        exit;
//If I change exit to return ****,there is no core.
//        return true; 

}
set_error_handler('err_handler');
//nomatter which the wsdl file is.
$client = new SoapClient("http://www.google.com:8080/hello.WSDL");

?>

Expected result:
----------------
[soapclient.soapclient]: failed to open stream: Network is unreachable

Actual result:
--------------
#0  0x000000302af6ff20 in strlen () from /lib64/tls/libc.so.6
#1  0x00000000006ff8f6 in php_stream_display_wrapper_errors (wrapper=0xdcb3e0, path=Variable "path" is not available.
) at /home/mall/src/php-5.3.3/main/streams/streams.c:151
#2  0x0000000000702c72 in _php_stream_open_wrapper_ex (path=0xfc4c50 "http://www.google.com:8080/hello.WSDL", mode=0x822303 "rb", options=8, 
    opened_path=0x0, context=0x2b8fd8d23b18) at /home/mall/src/php-5.3.3/main/streams/streams.c:1941
#3  0x000000000048c74b in php_libxml_streams_IO_open_wrapper (filename=Variable "filename" is not available.
) at /home/mall/src/php-5.3.3/ext/libxml/libxml.c:317
#4  0x000000000048c8be in php_libxml_input_buffer_create_filename (URI=Variable "URI" is not available.
) at /home/mall/src/php-5.3.3/ext/libxml/libxml.c:326
#5  0x000000302d72aff4 in xmlNewInputFromFile () from /usr/lib64/libxml2.so.2
#6  0x000000302d735348 in xmlLoadExternalEntity () from /usr/lib64/libxml2.so.2
#7  0x000000302d7352bd in xmlLoadExternalEntity () from /usr/lib64/libxml2.so.2
#8  0x000000302d74425c in xmlCreateURLParserCtxt () from /usr/lib64/libxml2.so.2
#9  0x0000000000616509 in soap_xmlParseFile (filename=Variable "filename" is not available.
) at /home/mall/src/php-5.3.3/ext/soap/php_xml.c:91
#10 0x00000000006083a7 in load_wsdl_ex (this_ptr=0x2b8fd8d23110, struri=0x2b8fd8d25f18 "http://www.google.com:8080/hello.WSDL", ctx=0x7fffd2215bd0, 
    include=0) at /home/mall/src/php-5.3.3/ext/soap/php_sdl.c:299
#11 0x000000000061438b in get_sdl (this_ptr=0x2b8fd8d23110, uri=0x2b8fd8d25f18 "http://www.google.com:8080/hello.WSDL", cache_wsdl=Variable "cache_wsdl" is not available.
)
    at /home/mall/src/php-5.3.3/ext/soap/php_sdl.c:714
#12 0x00000000005ded29 in zim_SoapClient_SoapClient (ht=1, return_value=Variable "return_value" is not available.
) at /home/mall/src/php-5.3.3/ext/soap/soap.c:2674
#13 0x0000000000760340 in zend_do_fcall_common_helper_SPEC (execute_data=0x2b8fdbcfc050) at /home/mall/src/php-5.3.3/Zend/zend_vm_execute.h:316
#14 0x000000000075f839 in execute (op_array=0x2b8fd8d23140) at /home/mall/src/php-5.3.3/Zend/zend_vm_execute.h:107
#15 0x000000000073e985 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/mall/src/php-5.3.3/Zend/zend.c:1194
#16 0x00000000006eea58 in php_execute_script (primary_file=0x7fffd221b9d0) at /home/mall/src/php-5.3.3/main/main.c:2260
#17 0x00000000007c3a80 in main (argc=5, argv=0x7fffd221bb58) at /home/mall/src/php-5.3.3/sapi/cgi/cgi_main.c:2109


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-08-25 10:08 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-08-25 10:08 UTC] cmb@php.net
Is this still an issue with any of the actively supported PHP
versions[1]?

[1] <https://www.php.net/supported-versions.php>
 [2021-09-05 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC