ID:               50902
 Comment by:       william at therileys dot freetcp dot com
 Reported By:      william at therileys dot freetcp dot com
 Status:           Open
 Bug Type:         Reproducible crash
 Operating System: CentOS 4.7
 PHP Version:      5.2.12
 New Comment:

php.ini below

[PHP]
expose_php=Off
safe_mode = Off
memory_limit = 128M
short_open_tag = On
soap.wsdl_cache_enabled=0

upload_max_filesize = 10M
post_max_size = 10M

display_errors=Off
log_errors=On
error_log=/var/log/php.log

include_path = 
".:/php/include:/usr/local/include/php/include:/usr/local/lib/php"
extension_dir = "/usr/local/lib/php/extensions"


Previous Comments:
------------------------------------------------------------------------

[2010-02-01 23:17:30] william at therileys dot freetcp dot com

Description:
------------
When creating a new SoapClient PHP will segfault if the client is 
unreachable or returns a 404. This behavior appears to be "fixed" if 
date.timezone is defined in php.ini or if error_log is not set 
(regardless of whether log_errors is on or off).

Reproduce code:
---------------
try
{
    $client = new SoapClient("http://1.2.3.4/wsdl";);
}
catch(Exception $e)
{
    echo "\n\nNO SEG FAULT!\n\n";
}

Expected result:
----------------
See 'NO SEG FAULT' printed to screen

Actual result:
--------------
Segmentation fault

#0  0x0837ed83 in zend_object_store_get_object (zobject=0x0, 
tsrm_ls=0x0) at /usr/src/redhat/BUILD/php-
5.2.12/Zend/zend_objects_API.c:261
#1  0x0837e419 in zend_std_object_get_class (object=0xb7ec6eb8, 
tsrm_ls=0x8bdb050) at /usr/src/redhat/BUILD/php-
5.2.12/Zend/zend_object_handlers.c:1088
#2  0x08228c2b in soap_error_handler (error_num=2048, 
error_filename=0xb7ec746c "Command line code", error_lineno=1, 
format=0x8677f27 "%s", args=0xbff9b038 "@\214ì·xcÌ\b\t")
    at /usr/src/redhat/BUILD/php-5.2.12/ext/soap/soap.c:2117
#3  0x0836484a in zend_error (type=2048, format=0x8677f27 "%s") at 
/usr/src/redhat/BUILD/php-5.2.12/Zend/zend.c:976
#4  0x0832316e in php_verror (docref=0xb7ec7d40 "\220}
ì·client.soapclient", params=0x8663415 "", type=2048,
    format=0x8447b50 "It is not safe to rely on the system's timezone 
settings. Please use the date.timezone setting, the TZ environment 
variable or the date_default_timezone_set() function. In case you used

any of those m"..., args=0xbff9b0d0 "Ç\212D\b\030\f¾\b", 
tsrm_ls=0x8bdb050) at /usr/src/redhat/BUILD/php-5.2.12/main/main.c:733
#5  0x08323548 in php_error_docref0 (docref=0x0, tsrm_ls=0x8bdb050, 
type=2048,
    format=0x8447b50 "It is not safe to rely on the system's timezone 
settings. Please use the date.timezone setting, the TZ environment 
variable or the date_default_timezone_set() function. In case you used

any of those m"...) at /usr/src/redhat/BUILD/php-
5.2.12/main/main.c:745
#6  0x080c7385 in guess_timezone (tzdb=Variable "tzdb" is not 
available.
) at /usr/src/redhat/BUILD/php-5.2.12/ext/date/php_date.c:627
#7  0x080c7524 in get_timezone_info (tsrm_ls=0x8bdb050) at 
/usr/src/redhat/BUILD/php-5.2.12/ext/date/php_date.c:684
#8  0x080c80e5 in php_format_date (format=0x8677e3b "d-M-Y H:i:s", 
format_len=11, ts=1265064008, localtime=1, tsrm_ls=0x8bdb050) at 
/usr/src/redhat/BUILD/php-5.2.12/ext/date/php_date.c:934
#9  0x08322ea8 in php_log_err (
    log_message=0xb7ec8950 "PHP Fatal error:  SOAP-ERROR: Parsing 
WSDL: Couldn't load from 'http://1.2.3.4/wsdl' : failed to load 
external entity \"http://1.2.3.4/wsdl\"\n in Command line code on line

1",
    tsrm_ls=0x8bdb050) at /usr/src/redhat/BUILD/php-
5.2.12/main/main.c:516
#10 0x08323b75 in php_error_cb (type=1, error_filename=0xb7ec746c 
"Command line code", error_lineno=1, format=0x865af24 "SOAP-ERROR: 
Parsing WSDL: Couldn't load from '%s' : %s",
    args=0xbff9b808 "Øxì·ÐõÖ\bÌyì·Øxì·\024") at 
/usr/src/redhat/BUILD/php-5.2.12/main/main.c:919
#11 0x08229254 in soap_error_handler (error_num=1, 
error_filename=0xb7ec746c "Command line code", error_lineno=1, 
format=0x865af24 "SOAP-ERROR: Parsing WSDL: Couldn't load from '%s' : 
%s",
    args=0xbff9b808 "Øxì·ÐõÖ\bÌyì·Øxì·\024") at 
/usr/src/redhat/BUILD/php-5.2.12/ext/soap/soap.c:2170
#12 0x0836484a in zend_error (type=1, format=0x865af24 "SOAP-ERROR: 
Parsing WSDL: Couldn't load from '%s' : %s") at 
/usr/src/redhat/BUILD/php-5.2.12/Zend/zend.c:976
#13 0x08249a5d in load_wsdl_ex (this_ptr=0xb7ec6eb8, struri=0xb7ec78d8

"http://1.2.3.4/wsdl";, ctx=0xbff9b9d0, include=0, tsrm_ls=0x8bdb050) 
at /usr/src/redhat/BUILD/php-5.2.12/ext/soap/php_sdl.c:307
#14 0x08254c7a in get_sdl (this_ptr=0xb7ec6eb8, uri=0xb7ec78d8 
"http://1.2.3.4/wsdl";, cache_wsdl=Variable "cache_wsdl" is not 
available.
) at /usr/src/redhat/BUILD/php-5.2.12/ext/soap/php_sdl.c:713
#15 0x082242e2 in zim_SoapClient_SoapClient (ht=1, 
return_value=0xb7ec6ea0, return_value_ptr=0x0, this_ptr=0xb7ec6eb8, 
return_value_used=0, tsrm_ls=0x8bdb050)
    at /usr/src/redhat/BUILD/php-5.2.12/ext/soap/soap.c:2505
#16 0x08381c06 in zend_do_fcall_common_helper_SPEC 
(execute_data=0xbff9cdf0, tsrm_ls=0x8bdb050) at 
/usr/src/redhat/BUILD/php-5.2.12/Zend/zend_vm_execute.h:200
#17 0x08381221 in execute (op_array=0xb7ec7360, tsrm_ls=0x8bdb050) at 
/usr/src/redhat/BUILD/php-5.2.12/Zend/zend_vm_execute.h:92
#18 0x08358fed in zend_eval_string (str=0xbffceb91 "try { $client = 
new SoapClient(\"http://1.2.3.4/wsdl\";); } catch(Exception $e){ echo 
\"\\n\\nNO SEG FAULT!\\n\\n\"; }", retval_ptr=0x0,
    string_name=0x869af27 "Command line code", tsrm_ls=0x8bdb050) at 
/usr/src/redhat/BUILD/php-5.2.12/Zend/zend_execute_API.c:1222
#19 0x0835918f in zend_eval_string_ex (str=0xbffceb91 "try { $client =

new SoapClient(\"http://1.2.3.4/wsdl\";); } catch(Exception $e){ echo 
\"\\n\\nNO SEG FAULT!\\n\\n\"; }", retval_ptr=0x0,
    string_name=0x869af27 "Command line code", handle_exceptions=1, 
tsrm_ls=0x8bdb050) at /usr/src/redhat/BUILD/php-
5.2.12/Zend/zend_execute_API.c:1257
#20 0x083d6d39 in main (argc=3, argv=0xbff9d224) at 
/usr/src/redhat/BUILD/php-5.2.12/sapi/cli/php_cli.c:1254



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50902&edit=1

Reply via email to