Welcome to Geeklog Tuesday, July 23 2019 @ 08:06 pm EDT

Geeklog Forums

Inmemoriam bug report


Status: offline

charon79m

Forum User
Newbie
Registered: 04/09/05
Posts: 7

Got the suggestions. Thanks, but...



Quote by machinari:
*Increase the max_execution_time using ini_set() if you have safe mode off
*or reduce the number of images that are being processed.

to reduce the number of images that are being processed per run, do this:
find the function inm_generateStatic() in admin/index.php.
then find the following lines near the end of the function (line 882ish):
PHP Formatted Code
            if ($t >= 300){
                break 2;
            }
            if ($i >= 200){
                break 2;
            }


 

change the 300 to 99 (33 images made into 99 thumbs) and change the 200 to 100 (100 scaled images) depending on which is giving you the trouble. mess around with the numbers.

Well, I gave this a shot... I took the settings down incrementally till I got to 3 and 2. No joy.


Quote by machinari:
hmm.. you could probably put set_time_limit(n)


I tried this, but I didn't know exactly what I was doing... well, actually I hadn't a clue. I tossed this right under the "global" line where it is pulling in variables (i'm guessing). I did know enough to change the "n" to a value; I chose 60 for the fun of it. Have I mentioned I know no programming and little about web design.

Anyway, no good there either. It still takes 30 seconds and then ends out.

Update on the machine on which this is running. It's not quite as bad as I thought. PIII 733 256MB PC133 memory. Running Ubuntu Linux, no X.

When I click on the generate buttons, the processor utilization jumps to >90%, but I never use up all my memory.

Any other suggestions? I'll let the process run all night if I have to... I just want to get this to generate the thumbs. Let me know if I can post anything else. It's a vanilla install on a clean Linux install too...

Yes, I know they will still need to populate on the page, but it'll be a heck of a lot faster than what I'm seeing now, I'm sure.

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
after you get the "execution timeout" error, go to your directory and see if any images were actually processed. If there have been no thumbnails, and/or no scaled images created at all, then the issue probably isn't with the script, but more likely with the graphics library or with the images themselves. But I would need more info before I could say that conclusively.

What I can say is this: it doesn't take 30 seconds to resize one image.
What is the average size of your images? ...and does everything else seem to work ok?

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
WoW, just had a look at some of you pics and I have to say, you do definitely need to use the static image generator--at least for the thumbs.

hopefully you can get me a bit more info (version numbers, etc.) and i'll see what I can do.

darwoodius

Anonymous
I was having the same issue (it seems) as Trinity and Dustin are having. I finally found that although it seemed that GD was installed, it wasn't. Yum'ing php-gd took care of the problem. Good luck guys.

Status: offline

charon79m

Forum User
Newbie
Registered: 04/09/05
Posts: 7
The directories in question would be:

geeklog/plugins/inmemoriam/scaled/
&
geeklog/plugins/inmemoriam/thumbnails/

I have directories called "1" at both of those locations. Both of the "1" directories do have files populated in them, they are quite small in size, so it looks like things are working.

I moved the data out of those directories and tried again to populate the thumbs. It generated 16 files, 5 sets of three and it looked like it started to loop through for a sixth image before it timed out.

Here is the pertinent part of geeklog/plugins/inmemoriam/admin/index.php (I think) to show it should only be looping once.

PHP Formatted Code

            }
            if ($t >= 3){
                break 2;
            }
            if ($i >= 2){
                break 2;

 


Version info follows:

Geeklog: 1.3.11sr1
Inmemoriam : Inmemoriam v 0.8.5 plug-in for Geeklog
PHP4-GD: 4.3.10-1
PHP4-imagick was not installed... it is now (0.9.7-1.3)

Need any other versions, let me know.

Thanks!

MrKnisely

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
lower your numbers as follows:
PHP Formatted Code
            if ($t >= 1){
                break 2;
            }
            if ($i >= 1){
                break 2;
            }

 
The script should not continue looping thru images after the first one has been processed.

Rob

Anonymous
Quote by darwoodius: I was having the same issue (it seems) as Trinity and Dustin are having. I finally found that although it seemed that GD was installed, it wasn't. Yum'ing php-gd took care of the problem. Good luck guys.


Define "Yum'ing"

Thanks,
-Rob

Status: offline

charon79m

Forum User
Newbie
Registered: 04/09/05
Posts: 7
Yum is the redhat equivalent to apt-get or dpkg.

It's not bad... but it's no apt.

MrKnisely

Status: offline

charon79m

Forum User
Newbie
Registered: 04/09/05
Posts: 7
I set the loop counters both to one and I still time out.

Hmmm...

Any other suggestions?


mach

Anonymous
is that one image at least being processed? anymore than that? If more than one is being process then your script is messed up somehow. If not, then you'll have to get me your GDlib version so that I can check the appropriate save() function. However you probably have 2.x bundled with your PHP 4.3 and so there shouldn't be a problem with that.

If you would rather use ImageMagick, you'll have to wait for my next release as it is not complete in the release you are using.

Status: offline

charon79m

Forum User
Newbie
Registered: 04/09/05
Posts: 7
Yes, it does loop through multiple images until it times out.

I'd be happy to post my index.php... but it's not been edited other than as requested by you here.

Let me ask you this, if it times out does that matter? I mean, if I let it time out and then run it again... over and over again until all the files are done, will it work as it is supposed to?

Point me to a method to get a version of GDlib and it's yours.

Regarding using imagemagick, I wouldn't know the difference if it were staring me in the face. I just want it to work... what's under the hood only matters when the car isn't runnin'.

MrKnisely

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
yup, it will still work. the processing will begin with the first image it finds that has not yet been processed. so whether it times out or not, the process goes on.

I'm boggled why the loop wouldn't break as it should. I'll have to take a closer look at that function to see where it may have a issue. If I find anything I'll let you know. At least we know that it isn't the image class--that would suck.

Status: offline

mrcraig52

Forum User
Newbie
Registered: 09/09/05
Posts: 3
Ok, I have a user who is trying to edit an album he created and he keeps getting an SQL error. I checked my error.log and this is what I found:

Fri Sep 30 18:58:07 2005 - 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id='12' LIMIT 1' at line 1. SQL in question: UPDATE gl_inm_albums SET name='StringPics', description='This, that and the other', frame='', theme='0', thumbsize='2', thumbs_perpage='24', maxw='2000', maxh='2000', dispfullimg='1', limitfullimg='1', enable_rating='', enable_comments='', orderby='1', group_id='2', owner_id='6', allow_submit='1', queue='1', WHERE id='12' LIMIT 1


I know next to nothing about SQL, so I have no idea what this means, any ideas?

mach

Anonymous
Quote by mrcraig52:
I know next to nothing about SQL, so I have no idea what this means, any ideas?
there's a comma there that shouldn't be.. gimme a couple secs to look for it.

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
mrcraig52, and the rest of you who are using 0.8.5, you will all have this same problem so click here to get a new albums.php to be placed in your public_html dir.

mrcraig52, let me know if that fixes your problem. I'm on the wrong machine this weekend to test anything myself.

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
if you just picked up that file, try it again, the cache didn't refresh when I put up the working file. it's up now though.

Josh

Anonymous
Quote by machinari:
Quote by Josh: When attempting to edit an album, I receive the following error:
An input validation error has occurred. Please go back and review your entries.
...
Is this a file or folder security problem?
No, this error has only to do with the values passed by $_POST.
a required value is missing, or, more likely, a hidden or required album ID has been edited or removed.

Is there any part of the album editing process that works for you? and is this error only returned when you try to set the album as featured?


If you use the Auto: Scan and Apply button on the Directory Administration page, the folder names that your media is in is used as the album name and ID.

However, if you create a new album yourself, it looks like the ID defaults to the serial number for now()

The reason I was not able to edit my albums was because I used the auto function to create all the albums and the folder names my media was in contained hyphens, which appear to be illegal characters for the ID field.

I would suggest using the serial number for now() rather than the folder names for the album id in the Auto: Scan and Apply function.

Additionally, is there not a way to sort albums in descending order rather than ascending? My album names are dates and I would prefer newer media to appear at the top of the page.

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
Quote by Josh:
I would suggest using the serial number for now() rather than the folder names for the album id in the Auto: Scan and Apply function.
The auto scan doesn't create the album's ID as that simply is a reflection of your directory name. I don't recall having any trouble with hyphens to date, but I will put it on my list and check into it. thanks.
Quote by Josh:
Additionally, is there not a way to sort albums in descending order rather than ascending? My album names are dates and I would prefer newer media to appear at the top of the page.
by default, albums summaries on the index page are sorted by date descending, i.e., the date created (not by directory or album names though those names may be in the form of dates). Media thumbs on the browse page are also sorted by date descending, by default. If you've uploaded all your albums via FTP, the script accesses them in the order that they are stored by the filesystem. That order is not controlled by the script..

Hope that helps

Josh

Anonymous
Quote by machinari: If you've uploaded all your albums via FTP, the script accesses them in the order that they are stored by the filesystem. That order is not controlled by the script..

Hope that helps


That does help. I always work with the media folders in descending order, so I uploaded them to the server in descending order, so that explains it. Thanks for your help. I really appreciate your time.

Status: offline

Scooter_KC

Forum User
Newbie
Registered: 08/10/05
Posts: 1
Location:Toronto
working
First off let Me say I LOVE this plugin. Installation went smooth following the docs but I have run into a wall involving the creation of albums/uploading of media.

If I use the interface to create albums, they are created no problem but they are owned by 'apache'. If I then try to upload images to them (still via the interface) the uploads always fail with the following message:

Add Results

Process complete: 1 error(s) occured and 0 file(s) uploaded successfully. Add more...

The following files encountered errors:

* ab_cartoon3.jpg: file could not be uploaded.


The file size is not an issue but I'm betting that permissions are what's hangin me.

When I use the FTP method of creating and uploading albums/media and then use the scan functions to pull them into the database, everything is golden.

Could this be a SAFE mode issue?

Some stats FYI:

PHP version: 4.3.10
Apache version: Apache/2.0.53
(and sadly) SAFE mode: ON

Any insight/suggestions hugely appreciated.

K
It was working... I SWEAR!

All times are EDT. The time is now 08:06 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content