View Full Version : upload error

July 4th, 2012, 06:28 PM

I hope I am posting in the right area. Apologies if I'm not and I hope someone will move this if so.

I have a Photopost gallery integrated with a phpbb3 forum. It is version 7.1. (I have not updated because I thought I would have to purchase the update and I also wasn't sure how to do it.)

Anyway, I have a problem when I upload multiple files, or if I upload a single very large file. I get this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20572 bytes) in /home/poultrym/public_html/photopost/image-inc.php on line 116

It also happens when I try to upload a photo from a url. This used to work as well.

The mysql database is part of the forum database and is being hosting on a Crazydomains server.

I have tried changing the size restrictions on the various user groups.

Stats given in the gallery.


The forum is at Poultry Matters Forum (http://www.poultrymatters.com) and the gallery is Gallery (http://www.poultrymatters.com/photopost/)

I'm hoping someone can point me in the right direction to solve this problem. It was working perfectly and then began giving this error without any changes being made. Is there any other information I should give?

A username?
Username: Demo
Password: password
That is a normal registered user - no admin access.

Does anybody know why I would be getting that error?

Chuck S
July 4th, 2012, 06:35 PM
There are many threads on this here is your using GD2 which does not handle large files well.

The best thing to do is install and use Imagemagick if you can.

Under phpinfo in admin what is the memory limit?

also you want to make sure your max image settings are no more than 1500

July 4th, 2012, 07:35 PM
Hi Chuck,

Thank you for the reply.

Yes, I'm using GD2. When initially installing Photopost I tried for a long time to get Imagemgick to work but couldn't. Using GD2 worked at the time when nothing else would. Should I try switching it back? Isn't the install something that the host server has control of, not me?

Memory Limit under phpinfo in admin is 128M for both local and master values.

I'm not sure what you mean by image settings? Do you mean file size? This is what I had. I just changed the maximum file size to 1500 but it still didn't work. Details below.


When I changed the max file size from 5120 to 1500, and tried to upload two photos (each less than 200kb) I received this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20572 bytes) in /home/poultrym/public_html/photopost/image-inc.php on line 116

The file size had been at 200kb for quite a while, then I increased it to allow for some audio files to be uploaded that were bigger.

Chuck S
July 4th, 2012, 08:22 PM
I am talking about the lines with 2500 maybe try using 1500

You can also empty out any numeric directories under your uploads directory in ftp under your gallery.

July 4th, 2012, 09:02 PM
I changed the 2500 to 1500 then tried to upload two pics again. This error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20572 bytes) in /home/poultrym/public_html/photopost/image-inc.php on line 116

With regard to the uploads directory, do I delete the folders with the numbers on them completely? There's quite a lot. Or do you mean I should empty out the individual folders and leave them there? I will empty them for the moment and try that. A lot of them are already empty.

Thanks for the assistance.

July 4th, 2012, 09:14 PM
Chuck, you are a champion!

It's working. I just deleted the files within the numeric folders and that seemed to solve all problems. I can now upload both images and multimedia files. Thank you!

Is it appropriate for me to ask about the upgrades that are available here? Would you advise me changing. (I would need some help.) Or should I just leave things alone as they are now working?

Chuck S
July 4th, 2012, 10:39 PM
PhotoPost 8 is awesome if you ask me but its up to you if you want to upgrade. You have access to do so. You can upgrade yourself or if you want us to upgrade you then you would purchase the upgrade service.

July 4th, 2012, 11:35 PM
What features does version 8 have that are better?

I'm happy to pay for the upgrade service if it's worth doing.

I have another question about my current setup? Am I allowed to discuss a second problem in the same thread?

When I try to do a backup via the Admin panel I get this. Any idea why? Do I need to change the permissions on the server files?


Actually, I'm wondering if I have a problem with the setup and the server passwords on the config.

Can you explain the difference between the Photopost database and the User Database in the config screen?

Chuck S
July 5th, 2012, 10:11 AM
Well safe mode must be off for proper operation of the script. Second for proper backup all paths to mysqldump and backup path must be correct with 777 permissions.

You can read the different PP8 release announcements as we are at 8.1 now.

PhotoPost Announcements - PhotoPost Community (http://www.photopost.com/forum/photopost-announcements/)

July 5th, 2012, 05:41 PM
Thank you. I will look into it.

With regard to the password issues, if I change the pathways in the config screen and they are wrong, and I then can't get into the site to change it back, how would I correct that on the server? Do you have some general instructions on here? I know each server will be slightly different but a general guide would be helpful. I am reluctant to mess with it if I'm going to lock myself out. I probably need to reset my server passwords and change it all.

Chuck S
July 5th, 2012, 06:09 PM
You can edit the config files via ftp.

July 5th, 2012, 07:28 PM
Ok. Thanks.

Chuck S
July 5th, 2012, 09:01 PM
Not a problem glad to help

July 5th, 2012, 11:07 PM
Sorry to be a further pain, Chuck. Just another question.

Firstly, I have changed passwords and all went well. I know these are now correct.

Can you tell me where I should turn safe mode off?

I think the pathways are correct. Which files in particular need the 777 permissions and how do I check them. Are you talking about the db itself? I'm not sure where to check that although I can see that permissions on the other files. Do I attempt a backup, get the error reports and change the files that come up there? Do I start with adm-misc.php?

Is there any risk in leaving this file at 777 all the time?


Edit: update - I changed the permissions on adm-misc.php and after I did I lost access to the Admin panel in PP. I changed it back again and I have access again.

Chuck S
July 6th, 2012, 08:44 AM
I was referring to the 2 config files of photopost need 666 permissions. You do not change any of the core php files to 777 permissions. You can read the install instructions under the support tab in our header for more specific information.

You can change your servers php through your php.ini file but you may need to ask your host.

I am merely saying to do a backup you need the proper path to mysqldump and the proper path to a directory you made that has 777 permissions to backup to.

You really shoulud update soon. I am getting read to put out another update.

July 6th, 2012, 09:42 AM
Thanks, I will ensure the two config files are 666.

So, are you saying that in order to be able to run a backup I need to edit the config file after I create a mysqldump file? How do I do that? Can you direct me to instructions for doing it? I have obviously overlooked this.

I will go searching for instructions but if you can provide me with a link that would be very helpful.

I am also looking for instructions on how to do the upgrade. I see the installation manual in the members area but that appears to be for doing a new installation. Where would I read about doing the upgrade?

Chuck S
July 6th, 2012, 11:49 AM
Upgrade instructions for installing PhotoPost 8 are included in the documentations folder of the downloaded code.

No what I am saying is to do a mysql backup which may not be supported on all servers you would fill out the proper information on the path to mysqldump and the path to a backup directory you have created on the server with 777 permissions then if your server supports you using mysqldump it will backup your database tables to the backup directory you specify.

You should always upgrade also to fully support the newer features of PHP and keep up to date which is why I suggested upgrading.

Safe Mode right on our details portion of the product under hardware software requirements this is where we state safe mode must be off. With safe mode on it does not allow the script to perform the actions needed to work properly.

July 9th, 2012, 12:44 PM
l got the same error

Chuck S
July 9th, 2012, 04:17 PM
What are you referring to there are several issues in this thread.