|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-02-13 23:33 UTC] felipe@php.net
[2009-02-21 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 13:00:01 2025 UTC |
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