Bug #77212 [Com]: Memory allocation failed : growing buffer on aws server
Edit report at https://bugs.php.net/bug.php?id=77212&edit=1
ID: 77212
Comment by: spam2 at rhsoft dot net
Reported by: sujaljhaonly4u at gmail dot com
Summary: Memory allocation failed : growing buffer on aws
server
Status: Open
Type: Bug
Package: SimpleXML related
Operating System: linux
PHP Version: 5.6.38
Block user comment: N
Private report: N
New Comment:
this is a bugtracker and not a support forum!
contact your administrator and make sure you have *at least* twice the memory of stuff you want to
proceed available and that there are no resource limits
Previous Comments:
------------------------------------------------------------------------
[2018-11-28 13:09:21] sujaljhaonly4u at gmail dot com
Description:
------------
Hi, i am receiving this message when i am trying to parse the 1.7gb xml file for inserting on aws
server.
Memory allocation failed : growing buffer..
please help me out!
Thank You,
Sujal Jha
Test script:
---------------
<?php
include('../product/upload_function_backup.php');
include('../../config/database.php');
include('../../objects/hooks/function.php');
$dir = '../product_feeds/tata cliq';
$file= "tata_cliq_fashion.xml";
$data = file_get_contents($dir.'/'.$file);
$xml=stripslashes($data);
libxml_use_internal_errors(true);
$arr = simplexml_load_string((string)$xml);
foreach( libxml_get_errors() as $error ) {
print_r($error);
}
print_r($arr);
?>
Expected result:
----------------
SimpleXMLElement Object
(
[Product] => Array
(
[0] => SimpleXMLElement Object
(
[ProductID] => 1065005367
[ProductSKU] => A08160
[ProductName] => WOMEN'S TRAINING STELLASPORT WOVEN SHORTS
[ProductDescription] => Stella McCartney inspired adidas SC Woven shorts for
women. It comes with an Elasticated waist with two side pockets, one back zipped pocket and all-over
'Stellasport' branding.
[ProductPrice] => 1000.00
[ProductPriceCurrency] => INR
[WasPrice] => 2499.00
[DiscountedPrice] => 0.00
[ProductURL] => http://clk.omgt5.com/?AID=1327881&PID=17736&Type=12&r=https://shop.adidas.co.in/%23!product/A08160_scwovenshort
[PID] => 17736
[MID] => 929898
[ProductImageMediumURL] => https://content.adidas.co.in/static/Product-A08160/Women_Training_Shorts_A08160_1.jpg
[StockAvailability] => In stock
[Brand] => SPORT PERFORMANCE
[custom1] => Gender - Female
[custom2] => AgeGroup - Adult
[CategoryName] => SHORTS (1/4)
[CategoryPathAsString] => Root|TEXTILES|SHORTS (1/4)|
)
)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77212&edit=1
Thread (4 messages)