Fatal error: Allowed memory size of

General questions relating to Joomla! There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
fashion24
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Dec 25, 2007 10:58 am

Fatal error: Allowed memory size of

Post by fashion24 » Tue Dec 25, 2007 11:04 am

Anyone knows where I can change the allowed size on pictures when adding new products in Virtuemart?
On large pictures I get this error:

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 5576 bytes) in /home/xtcubeco/public_html/fashion24.no/administrator/components/com_virtuemart/classes/class.img2thumb.php on line 151

Regards
Fashion24

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23366
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Fatal error: Allowed memory size of

Post by pe7er » Tue Dec 25, 2007 4:42 pm

Could you increase PHP's memory limit from 16 Mb to 32 Mb?

Do you have access to php.ini ?
If so, search for memory_limit and change the value to 32M

If not, do you have a .htaccess file in your Joomla website root folder?
If so, add the following line:
php_value memory_limit 32M
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
The best website: https://the-best-website.com

fashion24
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Dec 25, 2007 10:58 am

Re: Fatal error: Allowed memory size of

Post by fashion24 » Tue Dec 25, 2007 9:15 pm

Hi,

Thanks for replying. I have checked the root folder, but theres no .htacces file, only a htaccess.txt file.
No I don't have access to the php.ini file. Is this something I can ask the hosting company to change?

Or is it possible to add a .htaccess file in the root folder? If yes, what should be in it?

Thanks

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23366
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Fatal error: Allowed memory size of

Post by pe7er » Thu Dec 27, 2007 12:49 pm

fashion24 wrote:Or is it possible to add a .htaccess file in the root folder? If yes, what should be in it?
I would create an empty .htaccess file and put
php_value memory_limit 32M
in it...
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
The best website: https://the-best-website.com

pitchick
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Fri Aug 31, 2007 3:30 am

Re: Fatal error: Allowed memory size of

Post by pitchick » Sun Jan 06, 2008 1:00 am

thank you very much pe7er!  I was having exactly this problem and edited my .htaccess file as you suggested.  Not only did it fix this problem, but it made some other database stuff go super fast, much faster than they were and I didn't even know that this was the issue, I thought it was just my slow internet connection.  Thanks again!

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23366
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Fatal error: Allowed memory size of

Post by pe7er » Sun Jan 06, 2008 8:45 pm

Good to hear pitchick! Thanks for the follow-up with your information.
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
The best website: https://the-best-website.com

naturestemp
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Fri Mar 21, 2008 7:48 pm
Contact:

Re: Fatal error: Allowed memory size of

Post by naturestemp » Sun Apr 20, 2008 9:53 pm

It seems I don't have access to php.ini.

I don't have a .htacess I have a htacess.txt

Does the creation of a 'blank' .htaccess interfere with the htacess.txt?

Does blank literally mean that the only thing, literally nothing else, on the page should be: php_value memory_limit 32M

My problem is it is rare that I can install a module without a timeout. I have no problem doing the same thing via WAMP so I'm assuming it's a memory issue and I'm trying to deal with it without balling up the rest. Hence the overemphasis on detail in this post. Sorry about that.

John Wade
http://www.johnwade.ca
John Wade the Dog Trainer
http://www.johnwade.ca

trebso
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Fri Sep 02, 2005 12:17 pm

Re: Fatal error: Allowed memory size of

Post by trebso » Wed Apr 23, 2008 1:39 pm

pe7er wrote:Could you increase PHP's memory limit from 16 Mb to 32 Mb?

Do you have access to php.ini ?
If so, search for memory_limit and change the value to 32M

If not, do you have a .htaccess file in your Joomla website root folder?
If so, add the following line:
php_value memory_limit 32M
Having same problem - tried adding that line to .htaccess file, but made no difference. I just pasted it in at the end of the file - is that right?

cheers

Osbert

Alibaba77
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Jan 25, 2008 11:44 am

Re: Fatal error: Allowed memory size of

Post by Alibaba77 » Fri May 16, 2008 9:00 am

trebso wrote:
pe7er wrote:Could you increase PHP's memory limit from 16 Mb to 32 Mb?

Do you have access to php.ini ?
If so, search for memory_limit and change the value to 32M

If not, do you have a .htaccess file in your Joomla website root folder?
If so, add the following line:
php_value memory_limit 32M
Having same problem - tried adding that line to .htaccess file, but made no difference. I just pasted it in at the end of the file - is that right?

cheers

Osbert
same to me
I have no access to the php.ini but have a .htaccess.
I added the mention line but nothing changed. Are there additional things to do to make this change working?

thx
Alibaba77

bichuoi
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Dec 28, 2007 8:32 pm

Re: Fatal error: Allowed memory size of

Post by bichuoi » Tue Aug 05, 2008 11:53 am

The same problem
when jos_content with 39000 records and Size more than 50Mb it Have an error.

"Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 64 bytes) in /home/thienmin/public_html/timkiemdiachi/libraries/joomla/database/database/mysql.php on line 455"

http://timkiemdiachi.com/

It run when I delete Some Records (21,501 Table Size 32.8MB)

If I split all content are 2 parts (in other new Category) then It running with no error.
e.g:

http://timkiemdiachi.com/index.php?opti ... Itemid=102

http://timkiemdiachi.com/index.php?opti ... Itemid=102

But have error when I chose menu list Section

I try fix:
php_value_memory_limit 32M
I also Up to 128MB memory in php.ini but have error on my host.
I try my site with the same Data Base at localhost No error with all records.

This is big problem with me, my site will have 200.000 Items or more in the future.
Help me please!

Please help me. what is solution this this case?
Thanks.
http://www.e4sales.com <== the best hosting for Joomla & some free template 1.5
http://www.geosoftvn.com

User avatar
ghog
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 214
Joined: Sat Nov 03, 2007 11:56 am

Re: Fatal error: Allowed memory size of

Post by ghog » Wed Aug 13, 2008 2:13 pm

My memory limt is set to 64mg and also I am getting this error -

Code: Select all

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 254561 bytes) in /home/wwwmydj/public_html/components/com_sh404sef/shPageRewrite.php on line 244
Where to from here, any ideas?

circsoc
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Tue Feb 19, 2008 2:53 am

Re: Fatal error: Allowed memory size of

Post by circsoc » Mon Sep 01, 2008 4:04 pm

There is also a third option that doesn't seem to have been mentioned here. Using the last post as an example, his error is

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 254561 bytes) in /home/wwwmydj/public_html/components/com_sh404sef/shPageRewrite.php on line 244

So ftp to the file shPageRewrite.php in the specified location and edit it as follows.

Near the top there should be a line that looks like this

define("XXXXXXXX", dirname(__FILE__));

Simply add the following line below it with the memory limit you want.

ini_set("memory_limit","16M");

This solved a problem I was having uploading large files to RSGallery2, and should work for you too.

ivanichi
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Aug 22, 2008 3:40 pm

Re: Fatal error: Allowed memory size of

Post by ivanichi » Sat Sep 06, 2008 5:44 am

i have install com_jms_0.8.6pre1.zip on my joomla, and i get Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4864 bytes) in /opt/lampp/htdocs/site/administrator/includes/menubar.html.php on line 602

anybody help me, please..

in line 602 : function divider() {
603 : $image = mosAdminMenus::ImageCheckAdmin( 'menu_divider.png', '/administrator/images/' );
?>
<td>
<?php echo $image; ?>
</td>
<?php
}

ivanichi
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Aug 22, 2008 3:40 pm

Re: Fatal error: Allowed memory size of

Post by ivanichi » Sat Sep 06, 2008 6:48 am

this scrren php.ini in : /opt/lampp/etc

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30 ; Maximum execution time of each script, in seconds
memory_limit = 16M ; Maximum amount of memory a script may consume (16MB)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

i have try memory limit with 32M, and then try 128 this message on my screen
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4864 bytes) in /opt/lampp/htdocs/site/administrator/includes/menubar.html.php on line 648

?? anybody help me??

ivanichi
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Aug 22, 2008 3:40 pm

Re: Fatal error: Allowed memory size of

Post by ivanichi » Sat Sep 06, 2008 7:10 am

ups... i can
i have remove this component

Code: Select all

/opt/lampp/htdocs/site/administrator/components# sudo rm -fr com_jms/
hehehehehe :D :D :D

phatrick
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Fri Dec 14, 2007 10:38 am

Re: Fatal error: Allowed memory size of

Post by phatrick » Wed Oct 01, 2008 9:33 am

Sorry most of you are probably more savvy than me but I thought initially my shared host didn't allow access to my php.ini file (some don't) however if you have cpanel go to "php configuration" in here you can create a local php.ini file (initially called php.ini.default rename this to php.ini) either for single directories or recursively into sub-dirs. Create one, edit the memory_limit to e.g. 64M this should solve the problem.

fj_marcin
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 158
Joined: Wed Jan 03, 2007 10:27 am
Contact:

Re: Fatal error: Allowed memory size of

Post by fj_marcin » Wed Oct 01, 2008 10:34 am

hi,
it looks like you have the same problem like at http://forum.joomla.org/viewtopic.php?f ... &p=1426301
I posted an answer on what you should change.
if you don't have php.ini then just create it in folder where your file is located which causes the problem.

Best regards,
Marcin K.
Joomla World Support Center at http://www.mamboassistance.com
Services: Consulting, Design, Development, Training, Support and Outsourcing

tehnz
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 108
Joined: Mon Oct 20, 2008 10:36 am

Re: Fatal error: Allowed memory size of

Post by tehnz » Wed Oct 22, 2008 7:35 am

@bichuoi posted 29 Dec 2007.

I had the same fatal error message against mysql.php

I am operating from localhost.
I had tried increasing the memory limit to 64M (following the forum above, etc). Successful in increasing the memory as I checked in System Info: PHP Information, but unsuccessful in solving my problem as I still had the fatal error.

However, with the information you supplied in your original query, I decided to try the following to see what would happen if I split my articles into various Categories. At the moment, I had about 7800 published articles in the one Category.
Hence I split them to three Categories, containing about 3600, 3200, and 1000 published articles respectively.
YIPPEE, no more fatal error. My problem solved.

I tried to search in the forum and documentation as to whether there is a memory limit per category but to no avail.

I have posted this cos I think the fatal error message that others get (against different filenames) refers to the limits set for different 'things' and not to the overall limited memory in the site/system/server. Any comments?

wegngis
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Mar 04, 2008 12:21 am

Re: Fatal error: Allowed memory size of

Post by wegngis » Tue Jan 06, 2009 10:52 pm

I added the following to my php.ini and it solved the problem:

Code: Select all

memory_limit = 32M
I don't have access to the main server php.ini, I simply put a custom php.ini in the root and /administrator folders.

Cheers, and thanks! :)

mowahhed
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Sep 13, 2008 9:19 pm

Re: Fatal error: Allowed memory size of

Post by mowahhed » Mon Feb 09, 2009 8:18 pm

;)
Thanks For You All
This Was Very Smart And Help Full
My Problem Has Been Solved .... :D

User avatar
Swaino
Joomla! Intern
Joomla! Intern
Posts: 55
Joined: Fri Mar 20, 2009 9:51 am
Location: Warwickshire, UK
Contact:

Re: Fatal error: Allowed memory size of

Post by Swaino » Fri Jun 12, 2009 1:16 pm

Hello All

I am in the process of building a site here http://designtech.shivatechnology.net

It was fine yesterday morning, I was able to access the back door of the site and the front end. Towards the end of the day though I could load the back end but the front end wouldn’t appear? Now today I cannot access either, when I tried earlier i got the error Database Error: Unable to connect to the database:Could not connect to MySQL in the browser window

I have spoken with my host company and they corrected the problem so the backend appears (it seemed MySQL had stopped running because of a memory shortage) but were unable to correct the front end and passed along the following error message

Fri Jun 12 11:10:05 2009] [error] [client 84.45.186.74] PHP Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 40961 bytes) in /home/sites/designtech/public_html/libraries/joomla/application/module/helper.php on line 172
*** glibc detected *** /usr/sbin/httpd: double free or corruption (!prev): 0x0b480860 ***
[Fri Jun 12 11:10:40 2009] [error] [client 66.249.71.226] PHP Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 40961 bytes) in /home/sites/designtech/public_html/libraries/joomla/application/module/helper.php on line 172
*** glibc detected *** /usr/sbin/httpd: double free or corruption (!prev): 0x0b484710 ***



I have tried over writing the helper.php file with a fresh one from J!.5.11 zip but with no problems and not being a php programmer am stumped. I have also tried the things listed above, i dont have access to php.ini but i have tried the htaccess idea without luck. The hosts have tried changing the max memory from 16 to 32 but then the error occurs in line 173 as opposed to 172.

Has any body experienced this and corrected it? Im not sure if its the 1.5.11 upgrade but i really cant think of anything else that may have caused this???

Thanks for reading this far! ;)
Swain
Swaino
The Design and Technology Association
http://www.data.org.uk

cwk
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Wed Jun 28, 2006 2:27 pm

Re: Fatal error: Allowed memory size of

Post by cwk » Sun Jun 21, 2009 11:21 pm

I had the same issue and raised it with my ISP. They recommended I modify the PHP.ini which on my system is located at /conf/php.ini. I had been poking around in /etc/php.ini, but that's the wrong place, at least for me. In the /conf/php.ini file I found an entry for memory_limit and doubled it from 8388608 to 16777216. So far, so good. No White Screen of Death.

Thanks the Modwest team (my ISP) for a quick response. Nice to be able to recommend an ISP.

User avatar
dsmflash
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 160
Joined: Sat Nov 15, 2008 5:24 am

Re: Fatal error: Allowed memory size of

Post by dsmflash » Sat Nov 21, 2009 8:55 pm

pe7er wrote:
fashion24 wrote:Or is it possible to add a .htaccess file in the root folder? If yes, what should be in it?
I would create an empty .htaccess file and put
php_value memory_limit 32M
in it...
this will not work, at least on an Apache server. You will have to look for the location of your php.ini file in your php info, and change the php.ini file via SSH. Restart server, then check again. you cannot override the php memory with an .htaccess or placing a php.ini file in root. Apache does not look for it there, so it will do nothing. Just check your php info, you'll see.

Glad i could clear that up. :D

Antradienis
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Oct 27, 2009 8:33 am

Re: Fatal error: Allowed memory size of

Post by Antradienis » Tue Nov 24, 2009 9:34 am

When I insert "php_value memory_limit 32M" in my .htaccess file i got html error 500...

cwk
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Wed Jun 28, 2006 2:27 pm

Re: Fatal error: Allowed memory size of

Post by cwk » Tue Nov 24, 2009 2:26 pm

You might check with your ISP. In my environment I have a directory /conf where I was able to copy my own php.ini. I edited that and it took effect.

User avatar
dsmflash
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 160
Joined: Sat Nov 15, 2008 5:24 am

Re: Fatal error: Allowed memory size of

Post by dsmflash » Tue Nov 24, 2009 2:51 pm

i have my own server. i was under the impression that it was the php.ini in the root, but its in /usr/lib/. i used ssh and it worked like a charm.

also, one more major consideration is max_execution time. i would definitely increase this . i bumped it up to like 200 and my php memory is now 128mb

pr_chicago
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Jun 10, 2009 5:44 pm

Re: Fatal error: Allowed memory size of

Post by pr_chicago » Sun Jan 10, 2010 7:31 am

Mistakenly placed this post in 1.0... needs to be in 1.5... don't see an option for deletion....

hi2rashid
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Fri Jul 16, 2010 3:56 pm

Re: Fatal error: Allowed memory size of

Post by hi2rashid » Sat Jul 17, 2010 12:52 pm

i have joomla 1.5.x
and i have the problem in www.thengapattanam.net

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 3 bytes) in D:\HostingSpaces\thengapa\thengapattanam.net\wwwroot\libraries\joomla\error\exception.php on line 117


how to resolve this.

i contacted my host...they told my PHP memory is 32 MB

i tried creating a php.ini and .htaccess file with php_value memory_limit 32M

but no use...
tell me how to solve it??
Complete Joomla tutorials in Flash to learn quickly.Solution to all Problems
http://[spam].com/joomla_cms_how_to.html

jags0001
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sat Jul 17, 2010 6:54 am

Re: Fatal error: Allowed memory size of

Post by jags0001 » Sat Jul 24, 2010 4:21 am

We have the same problem...

I am also using Joomla 1.5...

And I got this error..

Notice: Trying to get property of non-object in /home/www/sample.trubank.com/libraries/joomla/application/application.php on line 133

Fatal error: Out of memory (allocated 239075328) (tried to allocate 62 bytes) in /home/www/sample.trubank.com/libraries/joomla/error/exception.php on line 117

Can anyone help us to solve this problem?...

vymn
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Jun 19, 2010 4:36 pm

Re: Fatal error: Allowed memory size of

Post by vymn » Mon Aug 16, 2010 9:27 pm

circsoc thank you very much you r right i fixed problem with your idea.


Locked

Return to “General Questions - 1.0.x”