php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33394 Socket Timeout on SOAP request causes general exception in Apache process
Submitted: 2005-06-18 14:19 UTC Modified: 2005-12-07 14:57 UTC
Votes:3
Avg. Score:4.3 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: neale at nealeupstone dot com Assigned: dmitry (profile)
Status: Closed Package: SOAP related
PHP Version: 5.0.4 OS: Windows XP
Private report: No CVE-ID: None
 [2005-06-18 14:19 UTC] neale at nealeupstone dot com
Description:
------------
If I make a SOAP request (method call) that times out on the server (with default_socket_timeout=5), I get the following (c0000005) Exception consistently 5 seconds after attempting the connection: 

AppName: apache.exe	 AppVer: 2.0.53.0	 ModName: php5ts.dll
ModVer: 5.0.4.4	 Offset: 00007704 (=> address 00a07704)

It's an attempt to access memory at 0fffffff8 (i.e. -8) (if I recall correctly.. Windows only gave me that info the once).

This is linked with default_socket_timeout, as if I set default_socket_timeout=10, the exception happens 10 seconds later.

No data is returned to the browser from the PHP script.



Reproduce code:
---------------
How I reproduce this is to set a breakpoint in a method on a Java based service.



Relevant PHP configs are:

default_socket_timeout = 5


[soap]
; Enables or disables WSDL caching feature.
soap.wsdl_cache_enabled=1
; Sets the directory name where SOAP extension will put cache files.
soap.wsdl_cache_dir="/tmp"
; (time to live) Sets the number of second while cached file will be used 
; instead of original one.
soap.wsdl_cache_ttl=86400


Expected result:
----------------
A SoapException would be thrown ?

Certainly, the PHP script could be expected to continue rather than die.

Actual result:
--------------
PHP script dies

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-18 14:27 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-06-26 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2005-12-07 14:05 UTC] s dot strampelli at isinet dot it
I want to proose a fix for this bug.

In etc/soap/http.c (about line 177)

if (!get_http_headers(stream, &http_headers, &http_header_size TSRMLS_CC) || http_headers == NULL) {
  php_stream_close(stream);
  stream = NULL;
}
efree(http_headers);

I think the bug is the call of efree without checking if http_headers is not null
 [2005-12-07 14:16 UTC] tony2001@php.net
Assigned to the maintainer.
 [2005-12-07 14:57 UTC] dmitry@php.net
Thank you for patch. It is appliead into CVS HEAD, PHP_5_1 and PHP_5_0.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 22 22:01:32 2024 UTC