Ricky55 Posted August 9, 2016 Share Posted August 9, 2016 Hi guys Bit of a PHP noob and the dev I use is away on holiday and I've got a client screaming at me, the usual carry on :-( I'm getting the following error Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 32 bytes) in /var/www/vhosts/XXXXX.co.uk/httpdocs/os/system/database/drivers/mysql/mysql_result.php on line 167 The memory allocation was set to the default option of 128M I've tried increasing this to 2048M and it still errors. Php Info is reporting the new allocation too. Do I need to set this in the script? or restart the server? any tips would be massively appreciated. I think the app was created using Codeigniter, it uses the MVC framework anyway I know that much. (not sure if that has any bearing) Cheers guys. Quote Link to comment https://forums.phpfreaks.com/topic/301797-memory-allocation-error/ Share on other sites More sharing options...
Jacques1 Posted August 9, 2016 Share Posted August 9, 2016 268435456 bytes are 256 MiB, not 128 MiB and not 2048 MiB. So you're obviously looking at the wrong configuration. And, yes, the webserver usually has to be restarted after configuration changes. Quote Link to comment https://forums.phpfreaks.com/topic/301797-memory-allocation-error/#findComment-1535811 Share on other sites More sharing options...
Ricky55 Posted August 9, 2016 Author Share Posted August 9, 2016 where else can it be configured? I was changing it in Plesk in the PHP settings. Quote Link to comment https://forums.phpfreaks.com/topic/301797-memory-allocation-error/#findComment-1535813 Share on other sites More sharing options...
Jacques1 Posted August 9, 2016 Share Posted August 9, 2016 Try setting the limit with ini_set() within the offending script. The global settings can be overriden in local ini files, .htaccess files and at runtime. Quote Link to comment https://forums.phpfreaks.com/topic/301797-memory-allocation-error/#findComment-1535815 Share on other sites More sharing options...
Ricky55 Posted August 9, 2016 Author Share Posted August 9, 2016 thanks man Quote Link to comment https://forums.phpfreaks.com/topic/301797-memory-allocation-error/#findComment-1535816 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.