mattevansnz Posted October 22, 2009 Share Posted October 22, 2009 Hi All, I am getting the following error. Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 1024 bytes) in /var/www/xxx.xxx.xxx/xxxx/xxxx/xxxxxxxxxx.class.php on line 157 I have tried changing the memory limit through .htaccess using... php_value memory_limit 12M I have also tried changing it using "ini_set"... example below... ini_set('memory_limit', '12M'); When I tried both of these, I get no error - the page just doesn't load at all (blank white page). As soon as I remove the memory limit setting - the page then loads, but with the memory limit error shown above. I am unable to change the size in the php.ini file (this is not an option for me - don't have access). What is happening? How can I fix this problem? Any help is appreciated. Thanks, Matt. Quote Link to comment Share on other sites More sharing options...
MadTechie Posted October 23, 2009 Share Posted October 23, 2009 The white screen is probably an error in your .htaccess file, have you tried adding the ini_set('memory_limit', '12M'); right above the line with the error.. However you may want to get a better host, as even if you get this to work, your host may just suspend your site for using too much resource. as I assume your on a shared host. of course the other option (if possible) is to change your code, so it uses less memory Quote Link to comment Share on other sites More sharing options...
obay Posted October 26, 2009 Share Posted October 26, 2009 You probably have an infinite loop somewhere. Try removing (commenting out) your loops, and see if it removes the problem. Quote Link to comment 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.