php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46134 soap fault eror
Submitted: 2008-09-20 09:53 UTC Modified: 2009-02-21 01:00 UTC
From: gsndirectory at gmail dot com Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.2CVS-2008-09-20 (snap) OS: windows xp
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-09-20 09:53 UTC] gsndirectory at gmail dot com
Description:
------------
I tried to pull the data using the soap function but always gets a error message 
Fatal error: SOAP Fault: (faultcode: Sender, faultstring: Allowed memory
> size of 100663296 bytes exhausted (tried to allocate 16 bytes))

I succeed  to pull the data of 2MB but when tried pulling the data which is of larger than 35MB it give an error

Reproduce code:
---------------
$client->__setSoapHeaders(array($sforce_header));

$result = $client->__call("GetCurrentDataVer1",array());

htmlspecialchars($client->__getLastRequest(), ENT_QUOTES);

htmlspecialchars($client->__getLastResponse(), ENT_QUOTES);

foreach ($result->GetCurrentDataVer1Result as $val){
	$vars = get_object_vars($val);
	$keys = array_keys($vars);
	$akeys = "a".$keys[0];
	if($keys[0]=="AssetDataCoreFields"){
		$akeys = "aAssetData";
		$tblname = "AssetData";
		}
	else
		$tblname = $keys[0];
	
	$tblname = strtolower($tblname); 	
	echo "Inseting Data into ".$tblname."\n";

	foreach ($result->GetCurrentDataVer1Result->$akeys->$keys[0] as $val1){
		
		$vars1 = get_object_vars($val1);
		$keys1 = array_keys($vars1);
		$count = count($keys1);
		
		$sql = "insert into ".$tblname." (";
		
		for($i=0; $i<$count; $i++){
			if($count-1 == $i)
				$sql = $sql.$keys1[$i];
			else
				$sql = $sql.$keys1[$i].","; 
			}
		
		$sql = $sql.") values (";
		
		for($i=0; $i<$count; $i++){
			if($count-1 == $i) 
				$sql = $sql."'".$val1->$keys1[$i]."'";
			else
				$sql = $sql."'".$val1->$keys1[$i]."',";
			}	
		
		$sql = $sql.")";
		
		$res = mysql_query($sql) or die(mysql_error());
		}
		if($res)
			echo "Data Inserted in ".$tblname. "\n";		

	}
  
?> 

Expected result:
----------------
get the data


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-13 23:33 UTC] felipe@php.net
Please try using this CVS snapshot:

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

  http://windows.php.net/snapshots/


 [2009-02-21 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".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 22:01:31 2024 UTC