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: 2011-08-18 18:07 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:
Status: Open Package: SOAP related
PHP Version: 5.3.5 OS: 2.6.38-10-generic #46-Ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 08:01:30 2024 UTC