scooterfd

Joined: 2003-08-08
Posts: 6
Posted: Fri, 2003-08-08 00:34

I have the same problem and its driving me nuts. gallery was working fine for months until Today when I tried to upload some more images. I started off using Remote and got some vague error about invalid image, so I tried the html upload and it generates these errors with debug on:-

Processing status...
- Adding Dsc00356.jpg
Error: Invalid image: Dsc00356.jpg!
Need help? Look in the Gallery FAQ
- Adding Dsc00356.jpg
Executing:

/usr/bin/jpegtopnm /var/www/html/albums/album01/Dsc00356.jpg | /usr/bin/pnmscale -xysize 150 150 | /usr/bin/pnmtojpeg --quality=95 > /var/www/html/albums/album01/Dsc00356.thumb.jpg

Results:
none

Error messages:
Corrupt JPEG data: 2918 extraneous bytes before marker 0xd9
JPEG datastream contains no image
pnmscale: EOF / read error reading magic number
pnmtojpeg: EOF / read error reading magic number

Status: 1 (expected 0)
Error: Unable to make thumbnail (0)!
Need help? Look in the Gallery FAQ

So - I downloaded the latest Gallery, deleted the old one completely, backed up my albums directory and removed it, then recreated it. The config wizard lunches the config.php in exactly the same way as yours - creating duplicate sections and corrupting some lines. I cleaned this up manually, restored and successfully upgraded my albums but the original problem is still there. Taking a look in the album directory we see this:-

[root@liberator album21]# ls -l
total 2876
-rw-r--r-- 1 apache apache 1252 Aug 8 00:37 album.dat
-rw-r--r-- 1 apache apache 1252 Aug 8 00:37 album.dat.bak
-rw-rw-rw- 1 apache apache 0 Feb 23 22:43 album.dat.lock
-rw-rw-rw- 1 apache apache 833672 Feb 23 22:44 DSC00236.jpg
-rwxrwxrwx 1 apache apache 96891 Feb 23 22:44 DSC00236.sized.jpg
-rwxrwxrwx 1 apache apache 9216 Feb 23 22:44 DSC00236.thumb.jpg
-rw-rw-rw- 1 apache apache 15780 Feb 23 22:44 DSC00237.highlight.jpg
-rw-rw-rw- 1 apache apache 871870 Feb 23 22:44 DSC00237.jpg
-rwxrwxrwx 1 apache apache 111680 Feb 23 22:44 DSC00237.sized.jpg
-rwxrwxrwx 1 apache apache 10238 Feb 23 22:44 DSC00237.thumb.jpg
-rw-rw-rw- 1 apache apache 817274 Feb 23 22:44 DSC00238.jpg
-rwxrwxrwx 1 apache apache 104706 Feb 23 22:44 DSC00238.sized.jpg
-rwxrwxrwx 1 apache apache 9841 Feb 23 22:44 DSC00238.thumb.jpg
-rw-rw-rw- 1 apache apache 0 Aug 8 00:37 DSC00356.thumb.jpg
-rw-r--r-- 1 apache apache 0 Aug 7 23:54 DSC00357.thumb.jpg
-rw-rw-rw- 1 apache apache 0 Aug 8 00:31 DSC00358.thumb.jpg
-rw-rw-rw- 1 apache apache 0 Aug 8 00:37 DSC00360.thumb.jpg
-rw-r--r-- 1 apache apache 0 Aug 7 23:53 DSC00362.thumb.jpg
-rw-r--r-- 1 apache apache 3577 Aug 8 00:37 photos.dat
-rw-r--r-- 1 apache apache 3577 Aug 8 00:37 photos.dat.bak
-rw-rw-rw- 1 apache apache 0 Feb 23 22:43 photos.dat.lock
-rw-r--r-- 1 apache apache 5 Aug 8 00:37 serial.31.dat

Notice that the NetPBM utilities have successfully created the thumb images but they are 0 bytes. The reason they are 0 bytes (and the reasons for the errors from pnmscale et al) is beacuse the input file never exists. Now the fact that it can create the thumb means permissions to write a file are fine. There is plenty of disk space and the tmp directory checks out fine for permissions and space also. So why does the image file not make it to wherever they land?

I can only come to the same conclusion as Bjorn - I didn't touch Gallery and somehow it has ceased to work, so soemthing else must have chnaged but I cannot imagine what. Since I last saw image uploading working, I have not changed or upgraded either PHP, apache, the OS (Redhat 8.0). Unless Redhat is off grabbing updates on it's own...

Checking the PHP info, uploading is on, the max file size is 2Mb which is large enough and I have no limitbodysize set. The files are about 0.9Mb

Any light anyone can shed on this greatly appreciated - as I really like Gallery and am making quite extensive use of it..

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Fri, 2003-08-08 00:55

Split, this isn't the same problem at all...

 
scooterfd

Joined: 2003-08-08
Posts: 6
Posted: Fri, 2003-08-08 01:18

erm it seems to be - same error messages as Bjorn had, and the same config.php corruption. I think the messages about corrupt jpeg data is a red herring - pnmscale doesn't get any data at all and probably tries to process the "file not found" error that jpegtopnm outputs as an image or something.

I just tried 1.3.5-cvs-b083 with the same results - lots of corruption in the generated config.php - fairly easy to fix, and the same problem uploading images.

Can anyone tell me where it puts them when they first get uploaded? I am assuming the tmp directory specified in the config.php is the place.

Right time for bed. I'll work some more on this tomorrow.

Cheers.

 
scooterfd

Joined: 2003-08-08
Posts: 6
Posted: Fri, 2003-08-08 01:40

Just one more thing :-/ Images are successfully added if I use the "Submit URL or directory" option (although it adds each one about 4 times) so the files are not corrupt (and I coudl view them locally anyway..) Definitely points to something to do with te upload function.

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Fri, 2003-08-08 01:53

Please give us your platform, PHP version, and Apache version. Also, if you're using Linux, what distro and version?

 
scooterfd

Joined: 2003-08-08
Posts: 6
Posted: Fri, 2003-08-08 02:10

NP:-

Linux liberator 2.4.18-14smp #1 SMP Wed Sep 4 12:34:47 EDT 2002 i686 i686 i386 GNU/Linux (Redhat 8.0)

PHP version is 4.2.2
Apache version 2.0.40

Gallery ran fine under this setup for several months.

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Fri, 2003-08-08 05:58
 
scooterfd

Joined: 2003-08-08
Posts: 6
Posted: Fri, 2003-08-08 09:15
joan wrote:
FAQ c.21

Thanks Joan - I will certainly try updating the PHP installation but remember - this has been working faultlessly for some months on the very same setup. I'll let you know what happens!