Error message when checking statistics.
|
carcass
Joined: 2005-07-25
Posts: 32 |
Posted: Tue, 2007-10-02 23:07
|
|
The following information is required to get an answer: I'm getting this error whenever I attempt to view my statistics. (Searching for comment spam) Does anyone have a solution? Thanks in advance. Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 16 bytes) in /home/speedsyn/public_html/Gallery/classes/Album.php on line 785 |
|
| Login or register to post comments |

Posts: 6740
FAQ: Why do I get the error Allowed memory size of Xxx bytes exhausted?
Posts: 32
Thank you very much. The only problem I have now is that I can't seem to find the files to edit.
When I open my .htaccess~ file in notepad, I see these 2 settings...
php_value post_max_size 20971520
php_value upload_max_filesize 20971520
php_value
Are these the 2 files that I'm supposed to modify? Also, I can't seem to find a master or local php.ini file to attempt to modify them. can you point me in the right direction please?
Thank you.
Q.
Posts: 6740
Hello,
~ files are backup files.
You say "2 files". Is there another .htaccess file?
If you cant find a php.ini file, please talk your hoster.
Describe the issue and they will tell you what can be done and how.
Jens
--
Last Gallery v1 Developer.
Tryout the TEST-Version of Gallery 1.6
Posts: 32
I have gone over the link you sent several times and have tried to make changes. The problems that I am having is that first of all I can't find the php.ini file anywhere as instructed in #1 instructions below. Can you please point me in the right direction?
Second, when I went to edit the .htaccess file, I didn't find anything that looked like what was written in the #2 instructions below.
#1 looks to be the wasiest to complete if I can just find the file. Any assistance will be greatly appreciated. FAQ instructions are posted below.....
(Why do I get the error Allowed memory size of Xxx bytes exhausted?
You are exhausting the available memory that PHP has access to. There are three work arounds:
1 - Edit the master php.ini - There is a config variable named memory_limit that by default is set to 8MB. Edit php.ini and increase it to a larger value (restart Apache afterwards).
2 - Edit .htaccess file - If you don't have access to php.ini then you can sometime edit / create a .htaccess file for your gallery directory. When adding that line to .htaccess, you must use a number, in bytes. For example, 8MB would be about 8000000 bytes. Sometimes you can't create a .htaccess file on a shared host and Apache will through an error message.
php_value memory_limit [new memory limit]
Sometimes you need to put:
<FilesMatch "\.(php|html?)$">
php_value memory_limit 20M
</FilesMatch>
3 - Edit the local php.ini - If you are on a shared host then sometimes you can't edit the master php.ini file. So you can can edit when the php code is parsed. To do this edit main.php and put the following at the start of the php.
ini_set ( "memory_limit", "20M");
Please note that method 3 hasn't been approved by the developers yet.
Posts: 32
Ok. With some help from a friend I was able to find all the files in question and I made all the recommended changes. Unfortunately i am still getting this error message when I check my statictics...
(Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 40 bytes) in /home/speedsyn/public_html/Gallery/classes/Album.php on line 785)
I'm still seeking help. Thanks alot.
Posts: 6740
Hello,
you increased the memory limit to 32MB. If Gallery is still not happy with it, try a higher value.
G1 really EATS memory at some places (like stats)
Jens
--
Last Gallery v1 Developer.
Tryout the TEST-Version of Gallery 1.6
Posts: 32
Actually, I increased the memory limit to 128MB and I'm still getting the same error message. Any other suggestions???
Q.
Posts: 6740
Well, when you get the SAME message, then something went wrong. As "33554432 bytes" is not 128MB
Jens
--
Last Gallery v1 Developer.
Tryout the TEST-Version of Gallery 1.6