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:
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful): www.speedsyndicate.net/Gallery
Gallery version: Gallery v1.5-RC2
Apache version: Apache 2.0 Handler
PHP version (don't just say PHP 4, please): PHP v5.1.4
Graphics Toolkit: ???
Operating system: XP
Web browser/version (if applicable): IE and Firefox

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

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Thu, 2007-10-04 12:06
 
carcass

Joined: 2005-07-25
Posts: 32
Posted: Fri, 2007-10-05 14:59

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.

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Wed, 2007-10-10 08:49

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

 
carcass

Joined: 2005-07-25
Posts: 32
Posted: Tue, 2007-10-23 18:54

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. :)

 
carcass

Joined: 2005-07-25
Posts: 32
Posted: Sat, 2007-10-27 03:21

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.

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Sun, 2007-10-28 12:26

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

 
carcass

Joined: 2005-07-25
Posts: 32
Posted: Mon, 2007-10-29 03:17
Tim_j wrote:
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

Actually, I increased the memory limit to 128MB and I'm still getting the same error message. Any other suggestions???

Q.

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Mon, 2007-10-29 10:39

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