semi-new Gallery Install woes

merana
merana's picture

Joined: 2002-10-12
Posts: 12
Posted: Sat, 2002-10-12 21:59

This is a long tale of Woes so please bear with me.

I started off trying to install the current stable version of Gallery (gallery-1.3.1.tar) and after long and not so happy battles trying to get netpbm stable I gave up on this build. Through the course of this build attempt I learned a lot about netpbm and freetype so it wasn't a total loss. This effort stopped with having netpbm-10.10.tgz getting installed and still having lib errors when trying to process locally.

So being intrepid I decided to go after the latest build (Gallery v1.3.2-cvs-b10)... I've gotten this 'semi-functional' here: <!-- BBCode Start --><A HREF="http://eo.dyndns.info/gallery" TARGET="_blank">A geeks Gallery</A><!-- BBCode End -->

semi-functional can be defined as:

I can place images in a local server directory and then use the add photos menu action to add these photos... PS. Nice add to this build to recognize local paths!!! Caught that while going through the code! :grin:

While this is functional I cannot upload to the server as it times out and does not show any errors in the Apache logs. Also to alleviate all of the netpbm issues I was having I am running this particular version with ImageMagik. Seems to work quite well.

Another anomaly is that when I add more that one image from the directory, every image after the first is posted twice. I am trying to trace the code to see if I can find what is doing that but it's going slow as this is my first look at the code and I am still unclear on all of the variable conventions.

I am not sure if I have issues with the httpd.conf file (I am running Apache 2) and I am also running the latest PHP 4.0 engine... It's stable with everything else and seems quite benign. I run a few other apps on the server for log analysis and counter provision.

The gallery is the best I have seen so far but I would love to start to resolve these issues. I am going to try the latest remote application after supper but I thought I would post this so maybe I might get some help before I dive back in.

Thanks for the replies in advance!

Regards,

Michael
http://eo.dyndns.info/mt-meblog
http://eo.dyndns.info/gallery

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sat, 2002-10-12 22:06

Try using the NetPBM binaries at the Gallery download page

http://sourceforge.net/project/showfiles.php?group_id=7130

 
merana
merana's picture

Joined: 2002-10-12
Posts: 12
Posted: Sat, 2002-10-12 22:49

Thanks for the response... but with all due respect...

I think this particular issue is a little beyond the NETPBM bins. As I stated earlier the images will render when ftp/ssh'd local to the web server. The issues are when you try to use a remote posting tool such as remote or even the Web Interface that comes with it.

I am almost to the point of suspecting that the POST method is not working at all...

Also the duplication of the posting within a gallery when more than a few images are posted sound symptomatic of a recursive loop not clearing properly... It's got to be something in my php config.... I should check that next... :eek:

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sat, 2002-10-12 23:26

Sorry, I didn't read the whole thing. Are you sure you can't get a stable release of gallery working? This could be problem with a CVS release...

 
merana
merana's picture

Joined: 2002-10-12
Posts: 12
Posted: Sat, 2002-10-12 23:34

Actually this is the same symptom as the current release... I am getting closer to something... I have been trying to upload various sizes of files to the gallery and I've had some success with small image sizes... Typically anything under 100k will make it to the server and then when convert goes to work on it it pukes...

ie:

/usr/local/bin/convert: Corrupt JPEG data: premature end of data segment (/usr/WebPages/htdocs/albums/album06/step.jpg).
/usr/local/bin/convert: Corrupt JPEG data: premature end of data segment (/usr/WebPages/htdocs/albums/album06/step.jpg).
/usr/local/bin/convert: Corrupt JPEG data: premature end of data segment (/usr/WebPages/htdocs/albums/album06/step.jpg).
/usr/local/bin/convert: Corrupt JPEG data: premature end of data segment (/usr/WebPages/htdocs/albums/album06/step.jpg).
/usr/local/bin/convert: Corrupt JPEG data: 72428 extraneous bytes before marker 0xd9 (/usr/WebPages/htdocs/albums/album06/step_001.jpg).
/usr/local/bin/convert: Corrupt JPEG data: 72428 extraneous bytes before marker 0xd9 (/usr/WebPages/htdocs/albums/album06/step_001.jpg).
/usr/local/bin/convert: Corrupt JPEG data: 72428 extraneous bytes before marker 0xd9 (/usr/WebPages/htdocs/albums/album06/step_001.jpg).
/usr/local/bin/convert: Corrupt JPEG data: 72428 extraneous bytes before marker 0xd9 (/usr/WebPages/htdocs/albums/album06/step_001.jpg).

This is the log results from a single file upload to the site. I would suspect that the issue with the duplication of posts is still occuring since there are four of each line for what should only be a single error occurance.

So now I am unsure of where the corruption of the uploaded file is happening.... I am connected to the webserver via LAN so I can't imagine it would be a comms bug. Is there an Apacche2 directive for uploaded file size? or maybe php?

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sun, 2002-10-13 00:45

Yes, the default max upload size is 2 megabytes. If you are uploading files bigger than this, they will either not work or be truncated. You can change this is php.ini (hopefully you have access to this) by specifing the upload_max_filesize = ...

 
merana
merana's picture

Joined: 2002-10-12
Posts: 12
Posted: Sun, 2002-10-13 12:31

I thought that would be it but it's not... I'll check the php.ini just to be safe but the largest images I have tried have only been about 300K or so... :cry:

I've changed that line now to:

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
upload_max_filesize = 4M

 
merana
merana's picture

Joined: 2002-10-12
Posts: 12
Posted: Sun, 2002-10-13 22:26

In an effort to keep all of the trouble shooting for this issue in one thread I will post some of the testing results here as well...

So far I've turned debug mode on and I've also done some more imports by uploading to the web server first and then using the integrated http addition method from the gallery application.

This is a result of importing FOUR photos into this gallery:

http://eo.dyndns.info/gallery/view_album.php?set_albumName=Projects

* Note * this did work but produced two photos for pictures two through four. Still not sure why it's doing this...

Fetching Urls...
/usr/WebPages/htdocs/tempGallery/PICT0001.JPG
/usr/WebPages/htdocs/tempGallery/PICT0002.JPG
/usr/WebPages/htdocs/tempGallery/PICT0003.JPG
/usr/WebPages/htdocs/tempGallery/PICT0004.JPG
/usr/WebPages/htdocs/tempGallery/PICT0002.JPG
/usr/WebPages/htdocs/tempGallery/PICT0003.JPG
/usr/WebPages/htdocs/tempGallery/PICT0004.JPG
Processing status...

- Adding PICT0001.JPG
Executing:

/usr/local/bin/convert -quality 95 -size 150x150 /usr/WebPages/htdocs/albums/album07/PICT0001.jpg -geometry 150x150 +profile "*" /usr/WebPages/htdocs/albums/album07/PICT0001.thumb.jpg

Results:
none

Error messages:

Status: 0 (expected 0)
Executing:

/usr/local/netpbm/bin/jhead /tmp/photo.PICT0001.JPG

Results:
File name : /tmp/photo.PICT0001.JPG
File size : 907836 bytes
File date : 2002:10:13 14:18:17
Camera make : Minolta Co., Ltd.
Camera model : DiMAGE 7
Date/Time : 2002:10:14 07:13:04
Resolution : 1600 x 1200
Flash used : Yes
Focal length : 7.4mm
Exposure time: 0.022 s (1/45)
Aperture : f/2.8
ISO equiv. : 200
Metering Mode: matrix
Exposure : program (auto)
Jpeg process : Baseline

Error messages:

Status: 0 (expected 0)IN UTIL ITEMCAPTUREDATE = 2002

Executing:

/usr/local/bin/convert -quality 95 -size 200x200 /usr/WebPages/htdocs/albums/album07/PICT0001.jpg -geometry 200x200 +profile "*" /usr/WebPages/htdocs/albums/album07/PICT0001.highlight.jpg

Results:
none

Error messages:

Status: 0 (expected 0)
- Resizing PICT0001.JPG
Executing:

/usr/local/bin/convert -quality 95 -size 640x640 /usr/WebPages/htdocs/albums/album07/PICT0001.jpg -geometry 640x640 +profile "*" /usr/WebPages/htdocs/albums/album07/PICT0001.sized.jpg

Results:
none

Error messages:

Status: 0 (expected 0)
- Adding PICT0002.JPG
Executing:

/usr/local/bin/convert -quality 95 -size 150x150 /usr/WebPages/htdocs/albums/album07/PICT0002.jpg -geometry 150x150 +profile "*" /usr/WebPages/htdocs/albums/album07/PICT0002.thumb.jpg

Results:
none

Error messages:

Status: 0 (expected 0)
Executing:

/usr/local/netpbm/bin/jhead /tmp/photo.PICT0002.JPG

Results:
File name : /tmp/photo.PICT0002.JPG
File size : 909364 bytes
File date : 2002:10:13 14:18:18
Camera make : Minolta Co., Ltd.
Camera model : DiMAGE 7
Date/Time : 2002:10:14 07:13:26
Resolution : 1600 x 1200
Flash used : Yes
Focal length : 8.6mm
Exposure time: 0.022 s (1/45)
Aperture : f/2.8
ISO equiv. : 200
Metering Mode: matrix
Exposure : program (auto)
Jpeg process : Baseline

Error messages:

Status: 0 (expected 0)IN UTIL ITEMCAPTUREDATE = 2002

- Resizing PICT0002.JPG
Executing:

/usr/local/bin/convert -quality 95 -size 640x640 /usr/WebPages/htdocs/albums/album07/PICT0002.jpg -geometry 640x640 +profile "*" /usr/WebPages/htdocs/albums/album07/PICT0002.sized.jpg

Results:
none

Error messages:

Status: 0 (expected 0)
- Adding PICT0003.JPG
Executing:

/usr/local/bin/convert -quality 95 -size 150x150 /usr/WebPages/htdocs/albums/album07/PICT0003.jpg -geometry 150x150 +profile "*" /usr/WebPages/htdocs/albums/album07/PICT0003.thumb.jpg

Results:
none

Error messages:

Status: 0 (expected 0)
Executing:

/usr/local/netpbm/bin/jhead /tmp/photo.PICT0003.JPG

Results:
File name : /tmp/photo.PICT0003.JPG
File size : 881828 bytes
File date : 2002:10:13 14:18:18
Camera make : Minolta Co., Ltd.
Camera model : DiMAGE 7
Date/Time : 2002:10:14 07:13:50
Resolution : 1600 x 1200
Flash used : Yes
Focal length : 8.6mm
Exposure time: 0.022 s (1/45)
Aperture : f/2.8
ISO equiv. : 200
Metering Mode: matrix
Exposure : program (auto)
Jpeg process : Baseline

Error messages:

Status: 0 (expected 0)IN UTIL ITEMCAPTUREDATE = 2002

- Resizing PICT0003.JPG
Executing:

/usr/local/bin/convert -quality 95 -size 640x640 /usr/WebPages/htdocs/albums/album07/PICT0003.jpg -geometry 640x640 +profile "*" /usr/WebPages/htdocs/albums/album07/PICT0003.sized.jpg

Results:
none

Error messages:

Status: 0 (expected 0)
- Adding PICT0004.JPG
Executing:

/usr/local/bin/convert -quality 95 -size 150x150 /usr/WebPages/htdocs/albums/album07/PICT0004.jpg -geometry 150x150 +profile "*" /usr/WebPages/htdocs/albums/album07/PICT0004.thumb.jpg

Results:
none

Error messages:

Status: 0 (expected 0)
Executing:

/usr/local/netpbm/bin/jhead /tmp/photo.PICT0004.JPG

Results:
File name : /tmp/photo.PICT0004.JPG
File size : 845744 bytes
File date : 2002:10:13 14:18:19
Camera make : Minolta Co., Ltd.
Camera model : DiMAGE 7
Date/Time : 2002:10:14 07:14:03
Resolution : 1600 x 1200
Flash used : Yes
Focal length : 8.6mm
Exposure time: 0.022 s (1/45)
Aperture : f/2.8
ISO equiv. : 200
Metering Mode: matrix
Exposure : program (auto)
Jpeg process : Baseline

Error messages:

Status: 0 (expected 0)IN UTIL ITEMCAPTUREDATE = 2002

- Resizing PICT0004.JPG
Executing:

/usr/local/bin/convert -quality 95 -size 640x640 /usr/WebPages/htdocs/albums/album07/PICT0004.jpg -geometry 640x640 +profile "*" /usr/WebPages/htdocs/albums/album07/PICT0004.sized.jpg

Results:
none

Error messages:

Status: 0 (expected 0)
- Adding PICT0002.JPG
Executing:

/usr/local/bin/convert -quality 95 -size 150x150 /usr/WebPages/htdocs/albums/album07/PICT0002_001.jpg -geometry 150x150 +profile "*" /usr/WebPages/htdocs/albums/album07/PICT0002_001.thumb.jpg

Results:
none

Error messages:

Status: 0 (expected 0)
Executing:

/usr/local/netpbm/bin/jhead /tmp/photo.PICT0002.JPG

Results:
File name : /tmp/photo.PICT0002.JPG
File size : 909364 bytes
File date : 2002:10:13 14:18:18
Camera make : Minolta Co., Ltd.
Camera model : DiMAGE 7
Date/Time : 2002:10:14 07:13:26
Resolution : 1600 x 1200
Flash used : Yes
Focal length : 8.6mm
Exposure time: 0.022 s (1/45)
Aperture : f/2.8
ISO equiv. : 200
Metering Mode: matrix
Exposure : program (auto)
Jpeg process : Baseline

Error messages:

Status: 0 (expected 0)IN UTIL ITEMCAPTUREDATE = 2002

- Resizing PICT0002.JPG
Executing:

/usr/local/bin/convert -quality 95 -size 640x640 /usr/WebPages/htdocs/albums/album07/PICT0002_001.jpg -geometry 640x640 +profile "*" /usr/WebPages/htdocs/albums/album07/PICT0002_001.sized.jpg

Results:
none

Error messages:

Status: 0 (expected 0)
- Adding PICT0003.JPG
Executing:

/usr/local/bin/convert -quality 95 -size 150x150 /usr/WebPages/htdocs/albums/album07/PICT0003_001.jpg -geometry 150x150 +profile "*" /usr/WebPages/htdocs/albums/album07/PICT0003_001.thumb.jpg

Results:
none

Error messages:

Status: 0 (expected 0)
Executing:

/usr/local/netpbm/bin/jhead /tmp/photo.PICT0003.JPG

Results:
File name : /tmp/photo.PICT0003.JPG
File size : 881828 bytes
File date : 2002:10:13 14:18:18
Camera make : Minolta Co., Ltd.
Camera model : DiMAGE 7
Date/Time : 2002:10:14 07:13:50
Resolution : 1600 x 1200
Flash used : Yes
Focal length : 8.6mm
Exposure time: 0.022 s (1/45)
Aperture : f/2.8
ISO equiv. : 200
Metering Mode: matrix
Exposure : program (auto)
Jpeg process : Baseline

Error messages:

Status: 0 (expected 0)IN UTIL ITEMCAPTUREDATE = 2002

- Resizing PICT0003.JPG
Executing:

/usr/local/bin/convert -quality 95 -size 640x640 /usr/WebPages/htdocs/albums/album07/PICT0003_001.jpg -geometry 640x640 +profile "*" /usr/WebPages/htdocs/albums/album07/PICT0003_001.sized.jpg

Results:
none

Error messages:

Status: 0 (expected 0)
- Adding PICT0004.JPG
Executing:

/usr/local/bin/convert -quality 95 -size 150x150 /usr/WebPages/htdocs/albums/album07/PICT0004_001.jpg -geometry 150x150 +profile "*" /usr/WebPages/htdocs/albums/album07/PICT0004_001.thumb.jpg

Results:
none

Error messages:

Status: 0 (expected 0)
Executing:

/usr/local/netpbm/bin/jhead /tmp/photo.PICT0004.JPG

Results:
File name : /tmp/photo.PICT0004.JPG
File size : 845744 bytes
File date : 2002:10:13 14:18:19
Camera make : Minolta Co., Ltd.
Camera model : DiMAGE 7
Date/Time : 2002:10:14 07:14:03
Resolution : 1600 x 1200
Flash used : Yes
Focal length : 8.6mm
Exposure time: 0.022 s (1/45)
Aperture : f/2.8
ISO equiv. : 200
Metering Mode: matrix
Exposure : program (auto)
Jpeg process : Baseline

Error messages:

Status: 0 (expected 0)IN UTIL ITEMCAPTUREDATE = 2002

- Resizing PICT0004.JPG
Executing:

/usr/local/bin/convert -quality 95 -size 640x640 /usr/WebPages/htdocs/albums/album07/PICT0004_001.jpg -geometry 640x640 +profile "*" /usr/WebPages/htdocs/albums/album07/PICT0004_001.sized.jpg

Results:
none

Error messages:

Status: 0 (expected 0)

 
merana
merana's picture

Joined: 2002-10-12
Posts: 12
Posted: Mon, 2002-10-14 23:14

More testing and trouble shooting notes.. This is from trying to send a 450K file from a local workstation to the Gallery. You can see the actual results in my Test Gallery at <!-- BBCode Start --><A HREF="http://eo.dyndns.info/gallery" TARGET="_blank">Test Gallery</A><!-- BBCode End -->.

Results follow (warning Long)

This is uploading from the web browser to the Gallery....

Processing status...
- Adding Random.jpg
Executing:

/usr/local/bin/convert -quality 95 -size 150x150 /usr/WebPages/htdocs/albums/album06/Random.jpg -geometry 150x150 +profile "*" /usr/WebPages/htdocs/albums/album06/Random.thumb.jpg

Results:
none

Error messages:
/usr/local/bin/convert: Corrupt JPEG data: premature end of data segment (/usr/WebPages/htdocs/albums/album06/Random.jpg).
/usr/local/bin/convert: Corrupt JPEG data: premature end of data segment (/usr/WebPages/htdocs/albums/album06/Random.jpg).

Status: 1 (expected 0)
Executing:

/usr/local/netpbm/bin/jhead /tmp/galleryQgpYmg

Results:
File name : /tmp/galleryQgpYmg
File size : 2694 bytes
File date : 2002:10:14 15:08:47
Resolution : 1663 x 1117
Jpeg process : Baseline

Error messages:

Status: 0 (expected 0)IN UTIL ITEMCAPTUREDATE = 2002

- Resizing Random.jpg
Executing:

/usr/local/bin/convert -quality 95 -size 640x640 /usr/WebPages/htdocs/albums/album06/Random.jpg -geometry 640x640 +profile "*" /usr/WebPages/htdocs/albums/album06/Random.sized.jpg

Results:
none

Error messages:
/usr/local/bin/convert: Corrupt JPEG data: premature end of data segment (/usr/WebPages/htdocs/albums/album06/Random.jpg).
/usr/local/bin/convert: Corrupt JPEG data: premature end of data segment (/usr/WebPages/htdocs/albums/album06/Random.jpg).

Status: 1 (expected 0)
- Adding Random.jpg
Executing:

/usr/local/bin/convert -quality 95 -size 150x150 /usr/WebPages/htdocs/albums/album06/Random_001.jpg -geometry 150x150 +profile "*" /usr/WebPages/htdocs/albums/album06/Random_001.thumb.jpg

Results:
none

Error messages:
/usr/local/bin/convert: Corrupt JPEG data: 490747 extraneous bytes before marker 0xd9 (/usr/WebPages/htdocs/albums/album06/Random_001.jpg).
/usr/local/bin/convert: Corrupt JPEG data: 490747 extraneous bytes before marker 0xd9 (/usr/WebPages/htdocs/albums/album06/Random_001.jpg).

Status: 1 (expected 0)
Executing:

/usr/local/netpbm/bin/jhead /tmp/gallerynlaH91

Results:
File name : /tmp/gallerynlaH91
File size : 1021022 bytes
File date : 2002:10:14 15:08:47
Resolution : 1663 x 1117
Jpeg process : Baseline

Error messages:

Status: 0 (expected 0)IN UTIL ITEMCAPTUREDATE = 2002

- Resizing Random.jpg
Executing:

/usr/local/bin/convert -quality 95 -size 640x640 /usr/WebPages/htdocs/albums/album06/Random_001.jpg -geometry 640x640 +profile "*" /usr/WebPages/htdocs/albums/album06/Random_001.sized.jpg

Results:
none

Error messages:
/usr/local/bin/convert: Corrupt JPEG data: 490747 extraneous bytes before marker 0xd9 (/usr/WebPages/htdocs/albums/album06/Random_001.jpg).
/usr/local/bin/convert: Corrupt JPEG data: 490747 extraneous bytes before marker 0xd9 (/usr/WebPages/htdocs/albums/album06/Random_001.jpg).

Status: 1 (expected 0)

This is after uploading it to the server and importing from there...

Fetching Urls...
/usr/WebPages/htdocs/tempGallery/Random.jpg
Processing status...

- Adding Random.jpg
Executing:

/usr/local/bin/convert -quality 95 -size 150x150 /usr/WebPages/htdocs/albums/album06/Random_002.jpg -geometry 150x150 +profile "*" /usr/WebPages/htdocs/albums/album06/Random_002.thumb.jpg

Results:
none

Error messages:

Status: 0 (expected 0)
Executing:

/usr/local/netpbm/bin/jhead /tmp/photo.Random.jpg

Results:
File name : /tmp/photo.Random.jpg
File size : 513118 bytes
File date : 2002:10:14 15:11:57
Resolution : 1663 x 1117
Jpeg process : Baseline

Error messages:

Status: 0 (expected 0)IN UTIL ITEMCAPTUREDATE = 2002

- Resizing Random.jpg
Executing:

/usr/local/bin/convert -quality 95 -size 640x640 /usr/WebPages/htdocs/albums/album06/Random_002.jpg -geometry 640x640 +profile "*" /usr/WebPages/htdocs/albums/album06/Random_002.sized.jpg

Results:
none

Error messages:

Status: 0 (expected 0)

So it's GOT to be something in the transfer part of the scripts... I need to trace from the page that you select the file to the steps it does after the upload button is selected...

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7985
Posted: Tue, 2002-10-15 05:09

I'd be curious to see what the JPEG file looks like when Gallery receives it. Unfortunately, Gallery deletes the file if it fails. If you uncomment the delete line in Album.php around line 542 it says:

if ($err) {
if (fs_file_exists("$dir/$name.$tag")) {
fs_unlink("$dir/$name.$tag");
}
return $err;

change that to:

if ($err) {
if (fs_file_exists("$dir/$name.$tag")) {
// fs_unlink("$dir/$name.$tag");
}
return $err;

Then it will leave the photo in your album and we can check it out to see what it looks like.

 
merana
merana's picture

Joined: 2002-10-12
Posts: 12
Posted: Wed, 2002-10-16 21:52

Sorry I haven't gotten back to this yet...

I searched for these lines but could not find them in albums.php. I am using one of the newer cvs versions... Has it been moved to util?

:???:

Nope... I am trying to find the equivalent line in the current version I am running now...

Second Edit:

Oh I and I still have debug on so I noticed this little line at the very bottom of the main gallery page:

Warning: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn. in Unknown on line 0

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7985
Posted: Sun, 2002-10-20 02:19
Quote:
Sorry I haven't gotten back to this yet...

I searched for these lines but could not find them in albums.php. I am using one of the newer cvs versions... Has it been moved to util?

Nope, they're exactly where I said in my last post (in the latest Gallery CVS code). What version of Gallery do you have?

Quote:
Oh I and I still have debug on so I noticed this little line at the very bottom of the main gallery page:

Warning: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn. in Unknown on line 0

You're using PHP 4.4.0-dev which is an untested, unsupported development release of PHP. You may experience all kinds of weird issues with that release. I haven't seen this problem on PHP 4.2.3 or earlier.