|  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
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
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:	 ModName: php5ts.dll
ModVer:	 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

; Enables or disables WSDL caching feature.
; Sets the directory name where SOAP extension will put cache files.
; (time to live) Sets the number of second while cached file will be used 
; instead of original one.

Expected result:
A SoapException would be thrown ?

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

Actual result:
PHP script dies


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-18 14:27 UTC]
Please try using this CVS snapshot:
For Windows:

 [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) {
  stream = NULL;

I think the bug is the call of efree without checking if http_headers is not null
 [2005-12-07 14:16 UTC]
Assigned to the maintainer.
 [2005-12-07 14:57 UTC]
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