View Full Version : Weird Behavior in Uploads
jaypie77
30th of December 2004 (Thu), 15:57
I thought I had everything working properly, but sometimes strange things happen. Here is the situation:
1. Edit and resize a picture to be about 100k on my computer
2. Upload to database in EE - "send to server"
3. Select photo, select size and path, select exhibition, "Upload"
4. Everything works
Repeat 1, 2, 3
4B. Microthumb and picture work, but thumb does not.
4C. None work.
When I try doing the same thing with two pictures, sometimes one works and the other doesn't. Checking the messages at the bottom hasn't yielded any clues. Anybody have any idea what's going on here?
jaypie77
30th of December 2004 (Thu), 16:01
Ok, another observation:
I ftp'd into my isp and checked out the files. The actual files in the thumbs are messed up sometimes. Is this a problem with my ISP, EE, or what?
Pekka
30th of December 2004 (Thu), 17:44
You do not get any error messages in "ftp messages"? If not then it sounds like PHP is running out of allowed memory, you can increase that in php.ini or by htaccess.
If you use Imagemagick try the latest version. I noticed for example that Red Hat Enterprise's latest RPM version of IM (still older than current version) was messed up in memory handling area.
Also, is there a difference if you use PHP ftp module or EE's internal ftp module (choose in ftp setup page)?
jaypie77
30th of December 2004 (Thu), 18:02
Also, is there a difference if you use PHP ftp module or EE's internal ftp module (choose in ftp setup page)?
No.
Also, this has nothign to do with IM.
I'm going to try to figure out how to change the php.ini or htaccess, but I don't know how to yet. As for error messages, none on the upload. Only in the deletion... so I guess you've got it right with the size thing, I just don't know how to change that. Any help? (I'm using FTP to get into my 1and1 space.)
Pekka
30th of December 2004 (Thu), 18:24
Try adding lines
$exectime = "1800";
$memorylimit = "256M";
ini_set ("max_execution_time",$exectime);
@set_time_limit ($exectime);
ini_set ("memory_limit",$memorylimit);
after line
include ("SCRIPT_get_first_e.php");
(in about line 20 of) in EDITOR_upload.php
Pekka
30th of December 2004 (Thu), 18:26
Also, is the problem ONLY with thumbs?
jaypie77
30th of December 2004 (Thu), 19:21
So far, I've seen the problem with all three sizes, but predominantly with thumbs and microthumbs.
I've just made the edit you told me to make and still a black thumb. I simply c&p the code you wrote in. When looking at the thumb in the exhibition browser, I can see the name of the photo and some exif data when hovering the cursor over it, but it is still a blank picture.
Also, when I try reuploading and reuploading over and over, the filenames change in the upload window. Just occurred to me that that might hold some clues, or not.
jaypie77
30th of December 2004 (Thu), 19:34
I just checked on previous file sizes that have worked without problems and they include files much bigger than the file that is causing trouble.
Pekka
30th of December 2004 (Thu), 19:36
The filename change is normal as EE does not accept duplicate filenames - it renames when there is a conflict.
What is not clear to me yet, do you use Imagemagick or GD1 or GD2 for resizes? Black images seems like a GD1 bug.
If it is Imagemagick you use, does resize method editor PREVIEW work all the time or not?
Sorry for all these questions but it is very hard to debug these things if there are no errors messages anywhere....
Pekka
30th of December 2004 (Thu), 19:37
I just checked on previous file sizes that have worked without problems and they include files much bigger than the file that is causing trouble.
"file" - does that mean the trouble is with one specific file?
jaypie77
30th of December 2004 (Thu), 21:03
Firstly - I am using GD2, so maybe that is the problem.
Secondly - the problem happens to be with one file right now, but it has happened with others as well.
Pekka
31st of December 2004 (Fri), 09:29
Firstly - I am using GD2, so maybe that is the problem.
GD2 is inbuilt in PHP and it should give clean error messages in case the functions fail. I'll have to see if there is any more checks I can do there.
Secondly - the problem happens to be with one file right now, but it has happened with others as well.
Can you please give me URL to one (original) problem file? That would help me a lot. PM me the address (click my name tag on left and choose "send private message" from menu).
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.