Fatal error message: out of memory

I just updated from v. 1.4.3 to 1.4.5.8. When I try to add a new image I get the following message:

Fatal error: Out of memory (allocated 11796480) (tried to allocate 40006 bytes) in /home/oneclicks_10384/photos.bluelioninstruments.com/zp-core/admin.php on line 511

I tried uploading a 80k image and got the same message.

I uploaded all three upload plugins and have the same problem with all of them.

The site is hosted by Dreamhost. I checked forums and thought it might be the PHP version, (it is running on 5.3). PHP 5.5 is not available for zenphoto from this host and I can't change hosts.

If the problem is the PHP version, then how do I get back to version 1.4.3 which worked fine.

URL: http://www.bluelioninstruments.com/custom_inlay.htm
«1

Comments

  • acrylian Administrator, Developer
    PHP 5.2+ is actually fine. We don't test on 5.5 yet specifially but 5.4.

    The file size does not matter, the file dimensions do. Please read here about the common issues with images:
    http://www.zenphoto.org/news/problems-with-albums-and-images
    It could very well be corrupted meta data.
  • Thanks for the reply. The test image I tried has the dimensions of 144 x 122. The gallery does not have a huge number of images and I've been successfully uploading photos for the past two years. I've never had this issue before.

    In addition, now the default template is no longer working, so photos show on white page, single column.

    If it is corrupted meta data, how do I fix that? (Sorry, I'm not a beginner but I'm certainly far from being an expert.)

    Would error logs help?

    Is there any way to revert to the 1.4.3 version? It worked fine.
  • acrylian Administrator, Developer
    We really cannot recommend reverting, not only because of security issues fixed since then but alaso because we will not be able to help with such older versions.

    To fix corrupt meta data try open the image in an image editor like photoshop and resave it as a new file.
  • I really appreciate your quick response. I will try the metadata fix and I'll stick with the latest version. If it still doesn't work I'll see if I can get you more information.

    Thanks again for your help.
  • I am sorry to be here again and thank you in advance for your patience. It's definitely gone from bad to worse.

    I reinstalled the 1/4/5/8 version to make sure everything was installed correctly and to perhaps deal with the metadata issue.

    Now, when I go try to view the gallery, I get basically a blank page with the heading: Index of /

    Name Last modified Size Description

    I'm totally lost at this point. I have no idea what has happened to my site or what I've done wrong. According to the Admin page, 1.4.5.8 is loaded; php v. 5.4.20; MySQli v. 5.1.56.

    I've disabled the gallery link on my website because clicking on it generates a 404 not found page.

    Please don't give up on me yet...I'm hoping you can help or at least get me pointed in the right direction.

    Thank you SO much for any help and advice.
  • acrylian Administrator, Developer
    Please report all errors you find in your server error log.
  • Additional info which may be helpful (or not!):

    In the ftp window, it shows the following hierarchy:
    default
    logs
    photos.bluelioninstruments.com
    themes
    zp-core

    When I did the upgrade, it said to only upload the themes foler, index.php and zp-core folder from the zip file.
  • acrylian Administrator, Developer
    Upgrading means of course uploading and overwriting the old existing folder/files with the new one.
  • fretzl Administrator, Developer
    Did you perhaps use a one-click installer script (or whatever it's called) to install Zenphoto?
    I ask because what you see in your FTP window looks far from good.
  • Thank you both for the replies. The original zenphoto (v. 1.4.3) was a oneclick install. It worked great except for the search function. (That's what I went to fix when the meltdown began!).

    When I uploaded the new version yesterday, I selected overwrite the older files option.

    Should I just start from scratch? I'm thinking my gallery is no longer linked to the website; it was set up as a subdomain and does not show up when I check the remote site files for www.bluelioninstruments.com. HOWEVER--it never showed up before (maybe that's the sub domain part?).

    I am way in over my head, I can tell, and as you can see, it's just getting worse. I'm willing to start from scratch if that's the best thing to do; if so, how do I uninstall it? Just delete all the files via ftp?

    Thanks again for you help--please don't think I take it for granted!
  • fretzl Administrator, Developer
    I hope you have backups of your albums/images and possibly a custom theme because it doesn't look they are still present.
    (not sure what is in your themes folder)

    I suggest you start from scratch and use FTP to upload the necessary files/folders. Do not use the one-click installer!
    Please read these instructions carefully:
    http://www.zenphoto.org/news/installation-and-upgrading
  • Thanks Fretzl--I was quickly coming to the same conclusion. I am/was using the default template. Can you allow me two more questions?

    1. I assume I delete all the files on the current messed-up site? Should I start with a new folder name as if the former site never existed?

    2. I downloaded the albums folder to my local site on Dreamweaver for backup. Do I just upload the album files after the new install and will they automatically replace the empty album file, or do I have to do something else?

    Thanks SO much.
  • If you first completely remove the files/folders from the old installation it will not matter if you re-use the folder name.

    And yes, just re-upload the albums you backed up to the albums folder.
  • Thanks for you help. I'll do the re-install tomorrow and hope to report back with success!
  • I'm resending this post a third time as it's not showing up in the forum and I'm not sure why. (I apologize in advance if I'm doing something wrong!)

    I did a completely new install of 1.4.5. Finally got the setup php to run. Initially, it showed warnings and errors, and helped me set up the MySQL database info. It appeared that there were files missing from the upload, so I tried reloading. When I went through the setup again, I got a very different error and warning page and it looks as though so much is wrong I don't even know where to begin.

    For example, I don't have a clue how to change the php display error from enable to disable. There is nothing on my webhost's site that gives me that option, so I'm thinking it must be in the zenphoto files somewhere, but where?

    I know it's frustrating to work with someone who apparently knows so little, but I had no problems with 1.4.3. I should never have tried to upgrade! I'm copying the error/warnings in a separate post and hope that this time, the posts will go through.

    Thanks for your incredible patience.
  • I figured out that I can't copy and paste the error/warnings and have the post go through.

    I don't know how to get them to you. Can I copy and paste the link to the page?

    Here's a few sample errors:

    Setup was not able to create this file. You will need to copy the zp-core/zenphoto_cfg.txt file to zp-data/zenphoto.cfg.php then edit it as indicated in the file's comments.

    Warning: filemtime(): stat failed for /home/bluelion/bluelioninstruments.com/inlay gallery/zp-data/zenphoto.cfg.php in /home/bluelion/bluelioninstruments.com/inlay gallery/zp-core/setup/index.php on line 105

    Warning: fopen(/home/bluelion/bluelioninstruments.com/inlay gallery/zp-data/setup.log): failed to open stream: Permission denied in /home/bluelion/bluelioninstruments.com/inlay gallery/zp-core/setup/setup-functions.php on line 405

    Warning: chdir(): Permission denied (errno 13) in /home/bluelion/bluelioninstruments.com/inlay gallery/zp-core/setup/index.php on line 571
  • You should use the code escape character, the "peck mark" (Which naturally cannot be reproduced here) to enclose these error messages. Of course, if you tried to copy a whole error log that was probably too big a post and considered spam.

    Your error messages indicate that there is a problem with the permissions settings on of your install vs. your server. There is no straight forward answer to this problem as it is most likely a server configuration issue.

    But suffice it to say, Zenphoto needs to be able to read its files and folders and will need to be able to write to some of them.
  • Thanks for the quick reply. I guess the best way to deal with this is one thing at a time. I do know how to change permissions via FileZilla, but don't know what to change them to. The only reference I've found is permission zp-data folder should be set to 0600. I've done that.

    Is there a "default" number to set all the permissions to?

    Here are the settings for the folders:
    zp-data (0600)
    albums, cache, cache_html, doc_files, plugins, themes, uploaded, zp-core [all are (0755)]

    .htaccess (0444)
    CHANGELOG.md, index.php, robots.txt are all (0644)
  • But suffice it to say, Zenphoto needs to be able to read its files and folders and will need to be able to write to some of them.
    What will work depends on how you have things configured. Can't help much more than the above repeated quote. The settings you show will work on properly configured servers. That they do not work on yours indicates you need to do some research.
  • Found forum input and user guide for Permissions. I'm giving it a try, although it looks like everything was already correct.
  • I've gotten much further (hope that's a small consolation for all the work I'm causing you--I'm learning!). I believe the install is now okay--I'm down to two warnings:

    1.
    php display errors [is enabled]
    This setting may result in PHP error messages being displayed on WEB pages. These displays may contain sensitive information about your site.

    I have searched web and forum and cannot find where to change this file to disable. Can you please help?

    2.Perhaps there was a problem with the upload. You should check the following files...
    The setup then shows a long list of files. In reading posts in the forum, it appears that this may because these files were reinstalled? I looked at the first one, index.php and found nothing obvious. I also ran across a post (several days ago) which said something about having a space before <?php at the top of the file.

    I'm not changing anything until I get confirmation that I should.

    Bottom line: with the exception of these two issues (and not having MySQL 5.5.0 available--my host has 5.1.x--it looks like I've gotten everything else fixed. BUT, when I click GO, I get:

    The requested URL /zp-core/setup/index.php was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    Now what? (And is the end anywhere in sight?)

    As ever and always, thank you for your admirable patience. Amazing support!
  • acrylian Administrator, Developer
    #1: You need to do this server side via htaccess or PHP.

    #2 Those are warnings if file time are different. This can happen either if you upload files an hour later than the rest of the package. This can be harmless but also a sign of a hacked file theoretically. ZP also warns about files within its core that should not be there.

    MySQL 5.5 is not required, it is recommended.

    The requested URL /zp-core/setup/index.php was not found on this server.
    Are the files there?

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Is that the full error message?
  • Thanks for the quick reply.

    I'll work on #1. I'm not at all sure how to do this but I'll research it and hope for an answer.

    And YES, that's the full error message. I checked and index.php file is installed and shows up in the site directory. It is current as of this morning.
  • Still working to disable PHP error display messages. Via FileZilla I have gone through the site looking for the php file which contains this option, and so far can't find it.

    Being new at this it's likely I don't really know what to look for. (Are you chuckling? :>) I'm more than willing to do the work, but almost an hour later I'm getting nowhere.

    Is the file I need located in the files I uploaded from Zenphoto, or is it something I need to contact Dreamhost to change? (There is, as far as I can tell, no place in the domain management section of Dreamhost that allows for access to changing php.)

    IF (by the grace of the zenphoto crew) this is a file I uploaded from Zenphoto--please tell me what it's called and what I change (i.e.: got to index.php in the zp-core folder, find PHP display_error [enable] and change to disable.)

    I hope you're not ready to give up on me yet...I know I'm taking a lot of time and energy but I want to be able to do this!

    Thanks again.
  • #1 is something you change in your PHP.ini file.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    This is a server configuration issue, but not a serious one. That just says that the server's 404 processing is setup to use some file that is not present.

    There are two possibilities with `The requested URL /zp-core/setup/index.php was not found on this server.`

    One: the file permissions may prevent the file from being "found" by the browser request.

    Two: at the point this happened the setup files may have been "protected" so the file did not actually exist. If you use the link `.../zp-core/setup.php` instead it will restore the files before executing them.
  • acrylian Administrator, Developer
    #1 is something you change in your PHP.ini file.
    Given the host allows access to the main server `php.ini`. Unless you have your own selfmanaged server not likely. Common are individual `php.ini` files per directory.

    For instance, on my host I have to do tha via individual `.user.ini` files per directory (php 5.4) and/or via `htaccess` (php5.2/5.3).

    So only the host can answer what you can do on your webspace.
  • Thanks for all of the above info.

    I have a support ticket in with my webhost. I don't have my own server. There are no php files in my website directory (other than those in zenphoto), and a search for hidden files yields no further results. But your reply to #1 is very helpful. Thanks!

    re #2. I reran the set up php with .../zp-core/setup.php
    I also reset permission for zp-core/setup/index to 755. I get the exact same error message.
  • Does the setup program run? You seem to indicate that from the statement that you were getting warnings that come from setup. If it runs I have no clue as to why you would get the #2 message.
  • Yes, it appears that the setup program runs. It's only when I click on the "GO" button at the bottom of setup page that I get the #2 message.

    I just tried it again: www.mydomain.com/inlaygallery/zp-core/setup.php and it ran. Clicking Go gives me #2 message. I went back through FileZilla and changed a permission in the zp-data and that change showed up as a warning (I've changed it back to the recommended 600 for the debug log. Clicked Go--get same message.
  • So, after clicking on "GO" does the next page of setup show up? The one where it says it is updating the database, etc?

    If not then the main difference is that the link is done by a form posting.
Sign In or Register to comment.