STAFF PLZ READ - In reguard to a past post...

Past Post:
http://www.zenphoto.org/support/topic.php?id=3829

Okay well, I dunno the problem, but I do believe new versions of zenphoto is taking up too much memory...some how, even modifying the php.ini file doesnt work (for me)...

I insisted that it did work in the past but not anymore.. :(

GO HERE:
http://luckyshotphotos.com/zenphoto2/test/IMG_3828.JPG.php

Download the file, upload it to the latest zenphoto and see if its too big for you... It wont work for my current version (nightly build) last night

I went down the nightly build list and downlaoded an older version (randomly picked) and it works...
So... I am keeping this version :)
zenphoto version 1.1.6 [1567]

Comments

  • acrylian Administrator, Developer
    That image seems to work on your site, at least I could see it normally. Also it does work on my localhost with 96MB, but not on my webspace with 32MB which is no surprise though.
  • I've been having the same problem on a site I'm developing. From looking at what code found, I tried reverting to an older version of i.php. This seemed to fix the problem. I then tried to narrow it down to what was different from version 1.1.7 to v1.2. I commented out the following code in i.php and this seemed to work, but don't ask me why:

    `// Set the memory limit higher just in case -- supress errors if user doesn't have control.

    /*if (ini_get('memory_limit') < '128M') {*/

    @ini_set('memory_limit','128M');

    /*}*/`
  • So this is why you should use the current nightly build which has corrected that line of code.
  • so which nightly build? I believe I used the one from last night until it didnt allow some thumbnails... I have always used the nightly build... I will try. What about functions.php? It also has that too
  • For me, using the latest build available to download as of now... It still doesnt work for me... I gtg tho ill bbl in a few hours..
  • I believe it is something else... Because it still doesnt work...
  • What does admin say your memoroy size is?
  • 1.1.6 doesnt have that... I will Look at current zenphoto to add the code to display the memory... So I can see...
  • 128M of memory...I currently dont use a php.ini file...
  • Right now im uploading my albums again to the /test/ directory of my site (nightly build) I had to modify the database to menually create an admin user since there is a bug... I am going to try and make identical sites except one version is older and works the newer doesnt... I am either confusing myself of you guys or both! I will try to get to the bottom of this... :S
  • Okay, two identical zenphoto setups...
    Admin Created, photos uploaded...nothing else changed except for one thing...

    http://luckyshotphotos.com/ 1.1.6 [1567]
    http://luckyshotphotos.com/test/ 1.2 [2398]

    I modified i.php and functions.php on the 1.2 version to modify the memory limit:

    // Set the memory limit higher just in case -- supress errors if user doesn't have control.
    @ini_set('memory_limit','128M');

    I did that, but as you can see from the sites, its still not working...

    Any ideas?
  • acrylian Administrator, Developer
    It seems that there indeed a bug sneaked in... I always resize images before uploading so I probably didn't notice...
  • I have *no* idea how much bug fixing/changing code you guys have done...
    I downloaded a program to compare files, I think the website here does the same but dunno how to work it :P

    I compared my two zenphoto galleries, and wow some files have huge differences, some look almost completly re-written (for the most part)

    I wouldn't even know where to look for a bug... :S
  • Oh btw, I been playing with themes...So...it might look a lil diff now... Lol
  • A Nice option would be, if it is or isnt a memory_limit problem, is to at least make an option in admin panel to input the memory instead of it being hard coded (basically) to 96MB
  • acrylian Administrator, Developer
    Well, I have no idea where to look, too, I did simply not work on those code parts. Actually the memory is not hardcoded, the lines tell Zenphoto to try to raise the memory limit if possible (it's not on my host so I get a warning). Actually I think this is something we should not do with Zenphoto at all since probably most people will be on shared hosts.
    I guess we have to wait what the other devs say..
  • Ya, well i mean the amount of memory it goes to is hard coded, if its lower
  • acrylian Administrator, Developer
    Ok, now I understand..
  • You have the option of changing it in your PHP.ini file which is the proper place to make the change. The code in zenphoto is there as a fallback. It will not work on all servers.

    The proper place to make this change is in the PHP.ini. We will not be making an option for it, partly because we don't necessarily want to add to the memory footprint to get the option handler into i.php so it can figure out how much memory to request.
  • Ya, I was just saying tho :P... I personally dont care... lol
  • I've done some work on the memory problem--results will be in tonight's build. Please give it a try and see if it helps.

    I did learn one thing, though, in the process. The value you place in the INI `memory_limit` (either in the zenphoto code or the PHI.ini file.) can at best be considered an advisement. For instance, I can set `memory_limit` to 768M, to 512M, or to 96M and PHP will parrot back this value to me. But the server never seems to be allocating more than around 64M no matter what the `memory_limit` was set to. (I guess it could be set smaller than 64M, but I did not try that.)

    So, take the `memory_limit` value with a grain of salt. Maybe you will get that much memory or maybe you will not. In the end, if you are getting allocation errors you will have to make smaller images to start with.
  • Interesting, thanks for the update. I will try the nightly build tonight.
  • Oh btw, I will be staying with zenphoto because I love this theme im using...
Sign In or Register to comment.