php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55453 SoapClient out of memory when SOAP_COMPRESSION_GZIP enabled
Submitted: 2011-08-18 16:28 UTC Modified: 2024-05-29 19:05 UTC
Votes:5
Avg. Score:4.6 ± 0.5
Reproduced:5 of 5 (100.0%)
Same Version:0 (0.0%)
Same OS:3 (60.0%)
From: johnston dot joshua at gmail dot com Assigned: nielsdos (profile)
Status: Closed Package: SOAP related
PHP Version: 5.3.5 OS: 2.6.38-10-generic #46-Ubuntu
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: johnston dot joshua at gmail dot com
New email:
PHP Version: OS:

 

 [2011-08-18 16:28 UTC] johnston dot joshua at gmail dot com
Description:
------------
Adding request compression either does not work or causes Fatal error: Out of memory (allocated 2359296) (tried to allocate 18446744073709551596 bytes).

When I use the gzip flag in the compression options the client call fails with an Out of memory notice (-1). If I use the deflate flag then nothing happens, no request compression.

This looks like it might be a regression of https://bugs.php.net/bug.php?id=36283

jjohnston@jjohnston:~$ php -v
PHP 5.3.5-1ubuntu7.2 with Suhosin-Patch (cli) (built: May  2 2011 23:00:17) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans

P.S. The earliest php version you can pick is 5.4.0alpha3. Why can't I pick a recent stable php version?


Test script:
---------------
$client = new SoapClient(
    "https://example.org/service.asmx?WSDL",
    array(
        'cache_wsdl'         => WSDL_CACHE_DISK,
        'connection_timeout' => '120',
        'soap_version'       => SOAP_1_1,
        'compression'        => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 5
    )
);

$out = $client->MethodCall(array(
    'type'   => 'test'
));

Expected result:
----------------
I expect the request to work and be compressed

Actual result:
--------------
Fatal error: Out of memory (allocated 2359296) (tried to allocate 18446744073709551596 bytes)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-08-18 16:29 UTC] johnston dot joshua at gmail dot com
-PHP Version: 5.4.0alpha3 +PHP Version: 5.3.5
 [2011-08-18 16:29 UTC] johnston dot joshua at gmail dot com
Updating to real php version since you can't select < 5.4 on create
 [2011-08-18 18:07 UTC] johnston dot joshua at gmail dot com
SOAP_COMPRESSION_DEFLATE or'd with a compression level works as expected.
 [2024-05-29 19:05 UTC] nielsdos@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nielsdos
 [2024-05-29 19:05 UTC] nielsdos@php.net
This happens because of the bogus header removal code. This is fixed in current development versions of PHP 8.2.x and higher.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 09:01:29 2024 UTC