From: gsndirectory at gmail dot com
Operating system: windows xp
PHP version: 5.2CVS-2008-09-20 (snap)
PHP Bug Type: SOAP related
Bug description: soap fault eror
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
--
Edit bug report at http://bugs.php.net/?id=46134&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46134&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46134&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46134&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46134&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=46134&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46134&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46134&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46134&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46134&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46134&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=46134&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=46134&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46134&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46134&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46134&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46134&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46134&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46134&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46134&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46134&r=mysqlcfg