inPrestashop Posted February 11, 2013 Share Posted February 11, 2013 (edited) Hi, when I run this command: $webService -> get(array('url' => PS_SHOP_PATH . '/api/products?schema=synopsis')); or open this url (when _PS_MODE_DEV_ = true) http://domain.tld/api/products?schema=synopsis It gives me: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /classes/db/DbPDO.php on line 148 It's only small XML schema and I have 128M memory limit.. What's wrong? Thanks Edited February 11, 2013 by inPrestashop (see edit history) Link to comment Share on other sites More sharing options...
Goofy03 Posted March 16, 2013 Share Posted March 16, 2013 I find a solution, this is my override : class WebserviceRequest extends WebserviceRequestCore { public function getFilteredObjectList() { $objects = array(); $filters = $this->manageFilters(); if (!isset($this->urlFragments['schema'])) { $this->resourceConfiguration['retrieveData']['params'][] = $filters['sql_join']; $this->resourceConfiguration['retrieveData']['params'][] = $filters['sql_filter']; $this->resourceConfiguration['retrieveData']['params'][] = $filters['sql_sort']; $this->resourceConfiguration['retrieveData']['params'][] = $filters['sql_limit']; //list entities $tmp = new $this->resourceConfiguration['retrieveData']['className'](); $sqlObjects = call_user_func_array(array($tmp, $this->resourceConfiguration['retrieveData']['retrieveMethod']), $this->resourceConfiguration['retrieveData']['params']); if ($sqlObjects) { foreach ($sqlObjects as $sqlObject) $objects[] = new $this->resourceConfiguration['retrieveData']['className']((int)$sqlObject[$this->resourceConfiguration['fields']['id']['sqlId']]); return $objects; } } } } Link to comment Share on other sites More sharing options...
vekia Posted March 16, 2013 Share Posted March 16, 2013 @inPrestashop can you check @Goofy03 solution? maybe it will work for you, i hope so Link to comment Share on other sites More sharing options...
Recommended Posts