Unable to upload/show images (WinXP SP1, Apache2, PHP 4.3.4)

Chadley

Joined: 2004-01-04
Posts: 9
Posted: Sun, 2004-01-04 03:25

I've been trying to fix this on my own too long, need help!

The system Gallery and Apache is installed on:
http://198.11.20.13/gallery/albums
WinXP SP1
PHP 4.3.4
Gallery 1.4.1
Browser: Mozilla Firebird .7 & IE 6
Disk Space: Gigs availiable.
ImageMagic downloaded and installed the 'Static' installer from here:
ftp://ftp.imagemagick.org/pub/ImageMagick/binaries/
-Note, should I have used the dll installer? No documentation makes this clear

Problem description:

After going though the config wizard, everthing seemed fine and image magick has a green success next to it. However when I try to upload images 2 windows pop up, as seen in this screenshot: http://rtt.colorado.edu/~bennetcm/galleryhelp/uploadproblem.jpg
Note that no progress bar is loaded in the smaller window and the nothing changes in the back window, no errors are reported. The systems seems to just hault with no updates to the brwoser (no confimration), etc.

Even though from the browser, it sees like it is not uploading or converting anything, the albums directory uploads the image and seems to create a thumbnail, as seen here (I uploaded sunset.jpg): http://rtt.colorado.edu/~bennetcm/galleryhelp/AlbumsDirectoryResults.jpg

Even though it appears these files are on the server, they don't appear in the album in gallery.

Also, an important note, when I ran the "check_imagemagick.php" the results got a red error saying: "Expected status: 0, but actually received status 1." when it checked identify.exe and convert.exe (a copy of the results can be found: http://rtt.colorado.edu/~bennetcm/galleryhelp/check_imagemagickResults.html )

Can someone please provide me step by step help? I also used the secure/preformance php.ini file that came with the php installation. A copy o of my php.ini file can be found here: http://rtt.colorado.edu/~bennetcm/galleryhelp/php.txt

I'm pretty computer savvy but not familiar with this stuff. Please help with clear instructions! Is it a PHP problem since the images are actually being manipulated, but then what about the check_imagemagick.php problem, etc?

I can give you Admin access to gallery and remote access to the server, if you need it!

Thanks all! P.S. I've reviewd the FAQ but didn't find anything to to help. I also don't know how to login to debug mode in gallery.

Give us your Gallery/webserver information to get a faster answer.
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful):
Gallery version:
Apache version:
PHP version (don't just say PHP 4, please):
Graphics Toolkit:
Operating system:
Web browser/version (if applicable):
----
Give us your Gallery/webserver information to get a faster answer.
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful):
Gallery version:
Apache version:
PHP version (don't just say PHP 4, please):
Graphics Toolkit:
Operating system:
Web browser/version (if applicable):

 
foffo
foffo's picture

Joined: 2003-03-06
Posts: 660
Posted: Sun, 2004-01-04 15:49

Well, if you suspect there is something wrong with your Imagemagick installation - why don't you try NetPBM. You can download NetPBM for win32 from here. :)

If you have verified that the images actually have been transferred to your albums directory, you could check out FAQ C.11

 
Chadley

Joined: 2004-01-04
Posts: 9
Posted: Sun, 2004-01-04 19:46

I was going to use netPBM but I can't seem to get that file to work. I download the file called "netpbm1.1-gallery1.0-win32.tgz" then unzip it. The resulted unzipped file is called: "netpbm1.1-gallery1.0-win32.tgz" which according to windows is another zipped file. However when I unzip that there is nothing in it.

can someone just post the actual files somewhere so I can simply just put them with out all this zip stuff? Also, I assume these are binaries, not source, right? I have no compiler.

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sun, 2004-01-04 19:56
 
Chadley

Joined: 2004-01-04
Posts: 9
Posted: Sun, 2004-01-04 20:09

Ok, I followed the instructions in c.2.5 and renamed the first unzip, so it has a .tar after the file name. However then when I open that file, which is now 3,320kb, winzip automatically opens the add file window because it cannot find anything inside. I don't know what's wrong, ive tried this on 3 PC's now. Could someone who can get it to work be kind enough to uncompress them all and recompress them in simple zip format and attach here in gallery or email me??

NEW:
If i just choose Extract from the contextual right mouse button Winzip opens and says it appears that this is not a valid archive. If you downloaded this file, try to download it again. I have done this-- same problems.

 
daver667

Joined: 2004-01-04
Posts: 3
Posted: Sun, 2004-01-04 20:11

Download and install 7zip (from sourceforge, amongst other places). It will open the netbpm tgz file just fine.

 
Chadley

Joined: 2004-01-04
Posts: 9
Posted: Sun, 2004-01-04 21:22

Awesome. Thanks. Winzip Sucks. (Yes, I know windows sucks too--but I do use Solaris at work ;))

I'll keep you posted if NetPBM solves this problem.

 
Chadley

Joined: 2004-01-04
Posts: 9
Posted: Mon, 2004-01-05 03:35

Ok: I installed netPBM and it checked out fine in the config and check_netpbm.php, though it took a little while.

When I upload an image (Small, webcam image) the same windows pop up. The progress bar is still blank and after a few minutes the other screen said this:

- Adding cap_014.jpg
Resizing/compressing original image
No resizing required

And that is all it did. Do I need to wait longer (longer than a few minutes for a small 55k image??) The machine is a 667 PIII. IS it a PHP problem? I monitored the Album folder and it does indeed upload and create the thumbnail, but that's it.

any help? See my origional post for details! Help!

 
daver667

Joined: 2004-01-04
Posts: 3
Posted: Mon, 2004-01-05 21:00

I'm having the exact same problem.

Configuration: Apache/2.0.48 (Win32) mod_ssl/2.0.48 OpenSSL/0.9.7c PHP/4.3.4 (Installation package courtesy of XAMPP 1.2 which was incredibly easy to install). Running on Windows XP SP1.

I turned on debug mode and got this:

----------------------------------------------------
- Adding 3VW9_004.jpg
Resizing/compressing original image
No resizing required
File C:/xampp/htdocs/albums/album01/3VW9_007.jpg type 2.

Executing:

C:\etc\netpbm\jpegtopnm C:\xampp\htdocs\albums\album01\3VW9_007.jpg | C:\etc\netpbm\pnmscale -xysize 150 150 | C:\etc\netpbm\ppmtojpeg --quality=90 > C:\xampp\htdocs\albums\album01\3VW9_007.thumb.jpg

Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\gallery\platform\fs_win32.php on line 169
----------------------------------------------------

Running the command from the command line works great though in less than a second. It returns this result:

----------------------------------------------------
jpegtopnm: WRITING PPM FILE
pnmscale: Scaling by 0.194444 horizontally to 98 columns.
pnmscale: Scaling by 0.195312 vertically to 150 rows.
pnmscale: 0.000000 of right column stretched due to arithmetic imprecision
----------------------------------------------------

Does anyone have any idea why it is timing out waiting for the results when called by Gallery?

Thanks, David

PS To Chadley: I'm glad you enjoyed 7zip. The latest version rocks!

 
Beggarstune

Joined: 2003-11-29
Posts: 3
Posted: Tue, 2004-01-06 02:27
daver667 wrote:
I turned on debug mode and got this:

...

Where does it put this information? I've seen the FAQ pointed out a zillion times but no one ever says where to find the debug output.

I, too, have the upload problem. I turn on debug and nothing is logged anywhere I can find, unless I'm looking in the wrong place.

 
IndyGreg

Joined: 2003-12-30
Posts: 6
Posted: Tue, 2004-01-06 05:42

I think I may have a solution to this problem. I too am running XP SP1 + Apache 2 + PHP 4.3.4 and have been experiencing this problem. It is indeed a painful headache. I started getting this error after my Sun Java client installed an update and requested a reboot, so going on a hunch, I started playing around with Java and Windows.

The following solution worked for me:

1) Uninstall all existing Java VM's. You can uninstall Sun's from the Add/Remove Control Panel. Uninstalling Microsoft's is a little more difficult (this probably isn't necessary, but instructions can be found on http://www.windows-help.net/WindowsXP/howto-21.html). Be sure to reboot after everything is removed.

2) Install Microsoft's Java VM. This can be downloaded from http://www.mvision.mpsnet.com/java.htm (requires IE). Reboot after installation.

3) Run Windows Update and download the Java update. This can also be obtained from links on http://java-virtual-machine.net/download.html. Reboot after installation.

4) Try uploading a photo. It worked for me! Does it work for you?

Please let me know if anyone else has success with this. If it doesn't work, the fact I fixed it on my computer by messing around with Java proves that Java is the culprit behind this nasty bug.

 
Chadley

Joined: 2004-01-04
Posts: 9
Posted: Tue, 2004-01-06 18:24

But does that solve the problem when you are not using the Java Based Gallery Remote? I didn't think Gallery itself used Java, just php? I'm really apprehensive about installing MS virtual machine instead of Sun's.

Indy: Can you confirm that you had this problem when using the manual upload directly through the gallery web interface and this corrected that problem? Thx.

 
daver667

Joined: 2004-01-04
Posts: 3
Posted: Tue, 2004-01-06 19:02
Beggarstune wrote:
daver667 wrote:
I turned on debug mode and got this:

...

Where does it put this information? I've seen the FAQ pointed out a zillion times but no one ever says where to find the debug output.

I, too, have the upload problem. I turn on debug and nothing is logged anywhere I can find, unless I'm looking in the wrong place.

The debug info is in the medium sized window that opens when trying to add a picture (nothing is written to disk that I can find). It only appeared after the small window started showing the progress indicator (which was after the attempted operation timed out).

I would rather not replace Sun's JVM with MS's; I don't think that Gallery uses Java in any case.

 
IndyGreg

Joined: 2003-12-30
Posts: 6
Posted: Tue, 2004-01-06 23:09

It worked for a while, but now it appears to be broken again. I think I will just reformat so I can track down specifically what causes this problem.

I am perplexed as to why "add photos" works but "add photo" does not. That itself points to Java not being the culprit, maybe.

 
Chadley

Joined: 2004-01-04
Posts: 9
Posted: Tue, 2004-01-06 23:28

Someone must know a fix for this problem...It seems to be a big issue.

Daver and Others: when you installed PHP, which of the php.ini templates did you use? The php-recomended or php-distribution (I think that is what they were named?). The recomended version apparently had setting adjusted for security and performance, so I chose it. maybe it's the wrong one? Has anybody tested this?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Wed, 2004-01-07 00:07

Hi!

I'm gonna set up a test environment using XP and the same versions of stuff you guys are using. I'll see if I'm able to reproduce this.

What troubles me is the fact that this seemed to work better in 1.4pl1 - and I don't think there has been any changes in the windows bits for these calls.

Hopefully I'll have some time available (at work :D ) tomorrow.

I don't really see how JAVA has anything to do with this, but I've been wrong before. :)

 
Chadley

Joined: 2004-01-04
Posts: 9
Posted: Thu, 2004-01-08 23:51

h0bbel: Any luck with this?
:(

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Thu, 2004-01-08 23:56

Chadly, sadly not yet. I haven't had the time to get on it yet. I will as soon as possible though!

 
Chadley

Joined: 2004-01-04
Posts: 9
Posted: Fri, 2004-01-16 07:38

Anyone have new info on this???

 
s-fu

Joined: 2002-07-15
Posts: 22
Posted: Sun, 2004-01-18 21:24
IndyGreg wrote:
I think I may have a solution to this problem. I too am running XP SP1 + Apache 2 + PHP 4.3.4 and have been experiencing this problem. It is indeed a painful headache. I started getting this error after my Sun Java client installed an update and requested a reboot, so going on a hunch, I started playing around with Java and Windows.

The following solution worked for me:

1) Uninstall all existing Java VM's. You can uninstall Sun's from the Add/Remove Control Panel. Uninstalling Microsoft's is a little more difficult (this probably isn't necessary, but instructions can be found on http://www.windows-help.net/WindowsXP/howto-21.html). Be sure to reboot after everything is removed.

2) Install Microsoft's Java VM. This can be downloaded from http://www.mvision.mpsnet.com/java.htm (requires IE). Reboot after installation.

3) Run Windows Update and download the Java update. This can also be obtained from links on http://java-virtual-machine.net/download.html. Reboot after installation.

4) Try uploading a photo. It worked for me! Does it work for you?

Please let me know if anyone else has success with this. If it doesn't work, the fact I fixed it on my computer by messing around with Java proves that Java is the culprit behind this nasty bug.

I will try this! Thanks in advance!

 
katchupoy

Joined: 2004-01-20
Posts: 7
Posted: Tue, 2004-01-20 17:52

Just tagging along... I also have the same problem...

Im using windows 2000 pro desktop.

 
cso

Joined: 2003-12-14
Posts: 5
Posted: Wed, 2004-01-21 00:36

Same problem on my server WinXP SP1, Apache. 1.3.29, PHP 4.3.4

But only when php is running as module (php4apache.dll).
Everything is Ok when php is loaded as cgi.

 
katchupoy

Joined: 2004-01-20
Posts: 7
Posted: Wed, 2004-01-21 03:19

Can you explain further?

what or how do you do cgi? This might be it...

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Wed, 2004-01-21 08:20

cso, what happens if you use PHP 4.3.3?? It seems like 4.3.4 might be the culprit here.

 
katchupoy

Joined: 2004-01-20
Posts: 7
Posted: Wed, 2004-01-21 08:31

Im using PHP 4.3.3... but still no go...

 
cso

Joined: 2003-12-14
Posts: 5
Posted: Wed, 2004-01-21 09:37
katchupoy wrote:
Can you explain further?
what or how do you do cgi? This might be it...

see http://ch.php.net/manual/en/install.apache.php#install.apache.windows under Installing PHP on Windows with Apache 1.3.x

Quote:
cso , what happens if you use PHP 4.3.3?? It seems like 4.3.4 might be the culprit here.

I was on 4.3.3 before, same problem... i think i have it since some updates from WindowsUpdate.microsoft.com ... but unfortunately i dont know the real reason :-( . It's not only gallery affected, also other php upload scripts (phpbb2 attach mod) are hanging.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Wed, 2004-01-21 09:58

cso, ok, now we are getting somewhere.... :)

I'm having a hard time seeing what changes to Gallery could cause these issues, especially since those bits of the code hasn't been changed much in the latest versions.

I've tried looking at http://news.php.net/group.php?group=php.windows to see if someone there had something to offer, but it seems not. :/

 
katchupoy

Joined: 2004-01-20
Posts: 7
Posted: Thu, 2004-01-22 01:16

Ok, I followed CSO suggestion. To be honest, I dont know what Im doing.
So I went to download the CGI.

What I did was, download and install the CGI version specifically says that it is for IIS. So why not... since I already have IIS. So I installed it and followed everything by the note.

Installed gallery. But on the configuration wizrd I had problems on the last part.... cannot find .htaccess and config.php

So I then installed EasyPHP. used this because it has everything in one download. PHP, Mysql, Apache, etc... But on this configuration it is running as module. Php4apache.dll... I did this just to create the htaccess, etc... and then turned it off again.

Now its workin... I dont know how... but it is working... something to do with php4apache.dll in which it should be php4ts.dll

hope this helps...

maybe somebody out there can help us create .htaccess and config.php so I dont need to install easyphp...

thanks

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Thu, 2004-01-22 18:02

katchupoy, and now it works? At the moment you are running it as a CGI, and not as a Module?

 
SDave

Joined: 2003-12-12
Posts: 6
Posted: Thu, 2004-01-22 22:44

I've also been commenting on this problem and I tried switching PHP to run as a CGI instead of a module and while I havn't been able to test it extensivly it seems to be working now.

 
-Lex-
-Lex-'s picture

Joined: 2004-01-19
Posts: 15
Posted: Fri, 2004-01-23 02:47

Started reading through this post awhile ago and it didn't look like it
fit my problem, after reading it again though it seems I was wrong.
Maybe one of the moderators could join the two topics? There might be
some info in the other that could help someone here find a solution.

I switched my php.ini from the recommended to the distro one and it
seems to be functioning longer, still freezes every now and then and then I have to restart Apache again. It's hard to tell if it's actually fixed though as it can be pretty far between when it crashes again.
It doesn't matter how many pictures I try to upload or what size they are, it never freezes in the middle of uploading a whole bunch of files, if it's going to freeze, it's always after adding the first picture:

Fetching Urls...
upload/001.jpg
upload/002.jpg
upload/003.jpg
upload/004.jpg
upload/005.jpg
Processing status...

- Adding 001.jpg
Resizing/compressing original image

I'm convinced it has something to do with php though so I'll switch back to the recommended ini so it crashes more and try to load php as CGI like suggested. I still have a few thousand photos to add so I'm sure I'll
crash more :D

----
Gallery version: 1.4.1
Apache version: 2.0.48
PHP version : 4.3.4
Graphics Toolkit: ImageMagick 5.5.7
Operating system: Windows 2003 Server
Web browser/version : InternetExplorer 6.0.3790.0

 
-Lex-
-Lex-'s picture

Joined: 2004-01-19
Posts: 15
Posted: Fri, 2004-01-23 15:37

Well that was it!
At first I tried the very latest PHP version as it mentioned some bugs being fixed that might relate to the problem. Unfortunately it crashed just as much with the newer version, so I loaded PHP as a CGI instead of a module and was able to add a bunch of albums and a few thousand photos without a single crash. Sometimes it would appear as if it crashed but I'd just wait and stuff eventually showed up, it seems PHP as CGI is just way slower at some things, but it definatly works!
By the way, when loading PHP as CGI I had to comment out the php_value and php_flag lines in .htaccess otherwise I'd get these server errors:

/.htaccess: Invalid command 'php_value', perhaps mis-spelled or defined by a module not included in the server configuration
.htaccess: Invalid command 'php_flag', perhaps mis-spelled or defined by a module not included in the server configuration

Feel free to look at my slow-as-sh*te site @ http://photos.redford.ca

----
Gallery version: 1.4.1
Apache version: 2.0.48
PHP version : 4.3.5RC1
Graphics Toolkit: ImageMagick 5.5.7
Operating system: Windows 2003 Server
Web browser/version : InternetExplorer 6.0.3790.0

 
moogleii

Joined: 2004-01-26
Posts: 20
Posted: Mon, 2004-01-26 11:58

Gonna try switching to cgi. If this is indeed the fix, they should sticky this, if that's possible on these forums.

Apache 2.0.48
PHP 4.3.2

 
moogleii

Joined: 2004-01-26
Posts: 20
Posted: Tue, 2004-01-27 01:47

Hey Lex,

I switched to CGI, and now i have no image uploading problems.

However, config keeps on saying that it doesn't have htaccess rights or something. I've added the directory directive as needed(it's the same one I used for PHP as a module), but there's no change. Did you have this problem? And how did you get around it?

 
SDave

Joined: 2003-12-12
Posts: 6
Posted: Wed, 2004-01-28 01:04

Also getting the htaccess error right now but I'm ignoring it since it doesn't interfere with my configuration.

BTW this is a bump as much as it is a reply. This topic should really be stickied or appended to one of the current support stickies. This upload problem was bugging me for ages and is still driving alot of people crazy and now it seems to be resolved.

 
adampaxton

Joined: 2004-01-26
Posts: 6
Posted: Wed, 2004-01-28 14:47

Good work,

Glad to hear switching to cgi mode works .... now for us dumb asses any chance someone can explain what switching to cgi means adn how you do it?

I take it you mean PHP, but isn't this seen as being unsafe for some reason?

cheers

 
JonRicoPa

Joined: 2004-01-27
Posts: 2
Posted: Wed, 2004-01-28 18:40

I have to say that switching to CGI mode did not solve the hanging problem for me. The solution presented http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=13318 in that thread did solve it for me, but only for ImageMagick, not NetPBM.

Jonathan

 
moogleii

Joined: 2004-01-26
Posts: 20
Posted: Thu, 2004-01-29 00:52

Posting movies no longer works for me. No thumbnail or link is generated, but it does show that something's been added when viewed from within the galler.
However when i browse to the album directory in explorer, the movie file is not present.

I have a feeling this may have something to do with the .htaccess problem, since movie uploads worked fine for me when i used Php as a module.

Also, the single image upload feature returns an error. It'll say "file not found." I was using the multiple images upload feature for the above scenario.

SDave, can you try uploading an avi and see if it works?

- Adding 101_0118.AVI
Resizing/compressing original image
Cannot resize/compress this filetype
PHP's getimagesize() unable to determine dimensions.

Executing:

"C:\Program Files\ImageMagick-5.5.7-Q8\identify" "C:\Program Files\Apache Group\Apache2\htdocs\albums\album01\101_0118.thumb.jpg"

Results:

none

Error messages::

Status: 1 (expected 0)
Unable to determine image dimensions!

PHP's getimagesize() unable to determine dimensions.

Executing:

"C:\Program Files\ImageMagick-5.5.7-Q8\identify" "C:\Program Files\Apache Group\Apache2\htdocs\albums\album01\101_0118.thumb.jpg"

Results:

none

Error messages::

Status: 1 (expected 0)
Unable to determine image dimensions!

Executing:

"C:\Program Files\Apache Group\Apache2\htdocs\gallery\jhead.exe"

Results:

none

Error messages::

Status: 1 (expected 0)IN UTIL ITEMCAPTUREDATE = 1969

Executing:

"C:\Program Files\Apache Group\Apache2\htdocs\gallery\jhead.exe" "C:\Program Files\Apache Group\Apache2\htdocs\albums\album01\101_0118.avi"

Results:

none

Error messages::

Status: 1 (expected 0)

Executing:

"C:\Program Files\Apache Group\Apache2\htdocs\gallery\jhead.exe" "C:\Program Files\Apache Group\Apache2\htdocs\albums\album01\101_0118.avi"

Results:

none

Error messages::

Status: 1 (expected 0)IN UTIL ITEMCAPTUREDATE = 1969

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Thu, 2004-01-29 02:28

Try moving jhead and imagemagick to a directory without a space (e.g. not "Program Files")

 
moogleii

Joined: 2004-01-26
Posts: 20
Posted: Thu, 2004-01-29 11:29

Yeah that had no effect. Not sure why that would have anyway though. The uploading of images works fine. Just for avi's it's not working correctly.

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Thu, 2004-01-29 12:39

moogleii, how big is the AVI?

 
rychan

Joined: 2004-01-29
Posts: 14
Posted: Fri, 2004-01-30 00:59

I seem to be having a lot of the symptons talked about here. Can someone explain clearly how to go to "cgi mode" and what piece of software you're even putting in "cgi mode"?

 
niftyken

Joined: 2004-08-26
Posts: 17
Posted: Thu, 2004-08-26 09:30

I now use the following at http://niftyken.stanford.edu/gallery :

-Windows XP Pro w/ SP1
-Internet Explorer 6.0.28
-Apache 2.0.50
-PHP 5.0.1
-Gallery 1.4.4 pl2
-NetPBM 1.4 pl2

I seem to be experiencing very similar problems. Here are some additional nuances I've noticed:

-When the upload process works correctly in the Forms method, I get debug output like this:

-------------------

Processing status...

- Adding grad_steph_black.JPG
Resizing/compressing original image
No resizing required
File D:/WWW/albums/upload/grad_steph_black.jpg type 2.

Executing:

D:\netpbm\jpegtopnm D:\WWW\albums\upload\grad_steph_black.jpg | D:\netpbm\pnmscale -xysize 200 200 | D:\netpbm\pnmtojpeg --quality=90 > D:\WWW\albums\upload\grad_steph_black.thumb.jpg

Results:
none

Debug messages::

Status: 0 (expected 0)
Executing:

D:\jhead\jhead.exe c:\tmp\gal58.tmp

Results:
File name : c:\tmp\gal58.tmp
File size : 783019 bytes
File date : 2004:08:26 01:27:30
Camera make : KYOCERA
Camera model : Finecam SL400R
Date/Time : 2004:06:13 14:11:27
Resolution : 1704 x 2272
Flash used : No
Focal length : 17.4mm
Exposure time: 0.011 s (1/90)
Aperture : f/2.8
ISO equiv. : 100
Metering Mode: matrix
Exposure : program (auto)
Jpeg process : Baseline

Debug messages::

Status: 0 (expected 0)
- Resizing grad_steph_black
Executing:

D:\netpbm\jpegtopnm D:\WWW\albums\upload\grad_steph_black.jpg | D:\netpbm\pnmscale -xysize 800 800 | D:\netpbm\pnmtojpeg --quality=90 > D:\WWW\albums\upload\grad_steph_black.sized.jpg

Results:
none

Debug messages::

Status: 0 (expected 0)
Executing:

D:\jhead\jhead.exe D:\WWW\albums\upload\grad_steph_black.jpg

Results:
File name : D:\WWW\albums\upload\grad_steph_black.jpg
File size : 783019 bytes
File date : 2004:08:26 01:27:30
Camera make : KYOCERA
Camera model : Finecam SL400R
Date/Time : 2004:06:13 14:11:27
Resolution : 1704 x 2272
Flash used : No
Focal length : 17.4mm
Exposure time: 0.011 s (1/90)
Aperture : f/2.8
ISO equiv. : 100
Metering Mode: matrix
Exposure : program (auto)
Jpeg process : Baseline

Debug messages::

Status: 0 (expected 0)

-----------

-The upload process works sporadically. Sometimes after a fresh reboot, I'll be able to upload a few photos in batches. The number doesn't seem to matter all that much. And then suddenly, the next batch will fail, and the first photo of that batch will never finish processing. This problem has sprung up frequently, using different upload methods: applet, form, or URL. I haven't been able to discern any pattern in this area.

-When the upload process fails, there are generally no "error messages". It just sits there and hangs in the Add Photos and Uploading Photos browser windows if you use the Form upload, or the "file transfer" animation if you're using the Java applet mode. So far, I have been resigned to closing all the windows and rebooting my (local) Windows server before uploads have a chance of working again.

-The Add Photos window reports the following debug messages and then just hangs endlessly:

-------------

Processing status...

-Adding image001.jpg
Resizing/compressing original image.

-------------

-After I close out all the windows, I see that the intended destination folder has two jpegs in place, image001.jpg and image001.thumb.jpg. But when you reload the album you never see image001.jpg if the upload process doesn't complete.

-All of the properly processed images have 3 corresponding jpegs: image002.jpg, image002.thumb.jpg, and image002.sized.jpg, since I configured it to have an intermediate 800-pixel version too. None of the incomplete uploads ever have the third "sized" jpg in the corresponding albums folder if I close all the windows after it hangs the system.

-After a session hangs, I see that jpegtopnm.exe, pnmscale.exe, and pnmtojpeg.exe are all still running under the Processes tab. They aren't taking any CPU cycles, but they linger around when the upload process runs incompletely. Manually ending the processes and trying to upload again without rebooting the server works sporadically, and generally fails under the same conditions.

-I decided to try an experiment. I started the upload process using the Forms method, picked one photo, and then when it got stuck in the "Processing status" area, I immediately went to Windows Task Manager and ended the jpegtopnm.exe process. To my excitement, the debug messages then continued and then hanged again. Again, I ended the jpegtopnm.exe process, and it actually completed the upload process, resulting in a photo in the album! The only thing that ended up being "wrong" was that the thumbnail was only 66% complete. The bottom third of the thumbnail jpeg was black. The following is the debug output, with markers of where I forcibly ended the jpegtopnm.exe process:

-------------

Processing status...

- Adding grad_steven_jea_steph.JPG
Resizing/compressing original image
No resizing required

[***End process jpegtopnm.exe***]

File D:/WWW/albums/upload/grad_steven_jea_steph.jpg type 2.

Executing:

D:\netpbm\jpegtopnm D:\WWW\albums\upload\grad_steven_jea_steph.jpg | D:\netpbm\pnmscale -xysize 200 200 | D:\netpbm\pnmtojpeg --quality=90 > D:\WWW\albums\upload\grad_steven_jea_steph.thumb.jpg

Results:
none

Debug messages::

Status: 1 (expected 0)
Executing:

D:\jhead\jhead.exe c:\tmp\gal6C.tmp

Results:
File name : c:\tmp\gal6C.tmp
File size : 914944 bytes
File date : 2004:08:26 01:31:18
Camera make : KYOCERA
Camera model : Finecam SL400R
Date/Time : 2004:06:13 13:17:26
Resolution : 2272 x 1704
Flash used : No
Focal length : 5.8mm
Exposure time: 0.011 s (1/90)
Aperture : f/7.5
ISO equiv. : 100
Metering Mode: matrix
Exposure : program (auto)
Jpeg process : Baseline

Debug messages::

Status: 0 (expected 0)
- Resizing grad_steven_jea_steph

[***End process jpegtopnm.exe again***]

Executing:

D:\netpbm\jpegtopnm D:\WWW\albums\upload\grad_steven_jea_steph.jpg | D:\netpbm\pnmscale -xysize 800 800 | D:\netpbm\pnmtojpeg --quality=90 > D:\WWW\albums\upload\grad_steven_jea_steph.sized.jpg

Results:
none

Debug messages::

Status: 1 (expected 0)
Executing:

D:\jhead\jhead.exe D:\WWW\albums\upload\grad_steven_jea_steph.jpg

Results:
File name : D:\WWW\albums\upload\grad_steven_jea_steph.jpg
File size : 914944 bytes
File date : 2004:08:26 01:31:18
Camera make : KYOCERA
Camera model : Finecam SL400R
Date/Time : 2004:06:13 13:17:26
Resolution : 2272 x 1704
Flash used : No
Focal length : 5.8mm
Exposure time: 0.011 s (1/90)
Aperture : f/7.5
ISO equiv. : 100
Metering Mode: matrix
Exposure : program (auto)
Jpeg process : Baseline

Debug messages::

Status: 0 (expected 0)

-------------

-Uploading images small enough to not require an "intermediate" sized.jpg version has never invoked a problem, though they also fail to upload if the session just basically stops responding altogether. (I can't even reload my gallery page manually after this kind of hanging. I have to close the browser first.)

-Eventually when I play with it long enough, other problems start to pop up, like libhttpd.dll crashing and Apache requiring a restart. (Memory leak?)

Well, I'm all out of ideas for now. It's obviously not feasible to continue to have to forcibly end jpegtopnm.exe to get the process to move forward. And remote clients don't have that luxury anyway.

The last clue is that the only thing the Apache error log reports when I pull the End Process trick is:

D:\netpbm\jpegtopnm: WRITING PPM FILE
D:\netpbm\pnmscale: EOF / read error reading a one-byte sample
D:\netpbm\pnmtojpeg: EOF / read error reading a one-byte sample

which kind of makes sense, considering that I cut off jpegtopnm while it was "in the middle of something".

You're welcome to go to http://niftyken.stanford.edu/gallery if you're inclined to try it for yourself (please only add to the "Add Your Pics!" album, though the most likely result is that you'll crash my server again and I'll have to reboot it... The best way to test it is to upload in "batches" of 1 or 2 photos at a time, since otherwise it just uploads all of the photos in a batch to my tmp directory and then hangs while processing the first photo.

User: test
Pass: 1234

If you can think of any other info that would be helpful to post here, please let me know. I'm getting pretty desperate for a solution. Unfortunately, I have a feeling I've come across a number of bugs, and it's been very hard to separate out what causes what. When I started with Gallery 1.4.4 on Apache 1.3.31 and PHP 4.3.8 last week, things seemed to be generally working. (I may have used even earlier builds but I don't remember anymore.) Eventually random problems started to recur (like the uploading problem) and now I long for yesterday. I've been upgrading pieces of software in hopes that something will stomp out the culprit, and at the very least hoping that some of you experiencing the same problem can try this out and find an elegant solution.

I now use the following at http://niftyken.stanford.edu/gallery :

-Windows XP Pro w/ SP1
-Internet Explorer 6.0.28
-Apache 2.0.50
-PHP 5.0.1
-Gallery 1.4.4 pl2
-NetPBM 1.4 pl2

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Thu, 2004-08-26 11:45

We know there are issues with PHP5 on IIS, there could very well be some on Apache as well. Does 4.3.8 yield better results?

 
niftyken

Joined: 2004-08-26
Posts: 17
Posted: Thu, 2004-08-26 16:11

No... I was using PHP4.3.8 when I first experienced the problem. PHP5 was definitely part of the "last ditch" effort. It was the last thing I upgraded, seeing as how the Gallery document barely lists any support for it, especially before Gallery 1.4.4. The main "benefit" I've gained so far in having PHP5 is that I seem to have left the php4ts.dll crashing problem behind.

See http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=17951&highlight=php4ts.dll

Other than that, the upload process seems just as flaky as before. I think I'll have to try the "run PHP as CGI" suggestion if nothing else comes up.

Part of the problem is I don't know where else to look as I try to trace the problem. Even with Gallery debug mode, the PHP dev mode, the syslog, and the Apache error log turned on, I can't catch the problem as it happens. I haven't found a specific error message that makes sense. Is there anywhere else to look?

 
niftyken

Joined: 2004-08-26
Posts: 17
Posted: Thu, 2004-08-26 20:11

I've now tried running PHP5 in CGI mode on Apache 2. Same problems as listed before on my WinXP box. The whole upload process hangs indefinitely if it's an image large enough (> 800 pixels tall or wide) that a "sized" version of the jpg needs to be created. Images smaller than 800x800 tend to go through without a hitch. The only way to continue in the case of larger images is to force the jpegtopnm.exe process to end through Windows Task Manager. I always have to kill it twice per photo because it gets stuck creating the "thumbnail" version as well as the "sized" version. Funny enough, the image that gets "done half way" is the thumbnail. The medium "sized" version looks fine once it's added to the album. You can see the unacceptable results of this lame hack at http://niftyken.stanford.edu/gallery/upload

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Thu, 2004-08-26 20:26

niftyken, no not really. :( No idea why this doesn't work for you....

 
niftyken

Joined: 2004-08-26
Posts: 17
Posted: Thu, 2004-08-26 21:58

What's your recommendation if I have to just give up and "start over"? Ideally, I'd like to keep all of my current albums, so I probably can't go back to version of Gallery before 1.4.4. But I can try starting over with Apache 1.3.31 and PHP 4.3.8. The bad thing is that I can't be sure that will even do anything...

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Thu, 2004-08-26 22:22

niftyken, you'll need to use 1.4.4 yes, or rebuild your entire Gallery. Galleryadd.pl would be helpfull in that case (http://galleryupdates.jpmullan.com)

 
niftyken

Joined: 2004-08-26
Posts: 17
Posted: Thu, 2004-08-26 23:07

Yeah, galleryadd.pl currently gets hung up at the same place that I've already reported. So sad... looks like I'm going to have to scrap this site and start over. I wonder if it's just one little stupid thing... =[

 
niftyken

Joined: 2004-08-26
Posts: 17
Posted: Fri, 2004-08-27 17:06

Hey, superfriends! Just wanted to report that before I decided to throw in the towel and start over from scratch, I decided to try one last thing (right... "one last thing) -- I removed NetPBM and tried ImageMagick instead. The upload hanging problem went away! (Well, it certainly couldn't hang on jpegtopnm.exe anymore. That's a NetPBM thing.) I've uploaded hundreds of photos to test, using galleryadd.pl, and it's been no problem at all running PHP as a CGI binary. I don't know what the realistic speed difference is between running PHP as a CGI binary vs. as an Apache module, but I think I'm going to re-upload all of my albums before I find out! Yes, yes, switching to ImageMagick was so painless, but sadly I didn't think to ever try it since I *assumed* the NetPBM had to be working correctly. Bad assumption, and a lesson learned. I have no idea why my server decided not to play nice with NetPBM. Anyone?

If you've been stuck with a similar problem and switching to ImageMagick did it for you, please chime in! (At least then I can regain some confidence that I'm not crazy.)

So the config that currently works for me:

-Windows XP Pro w/ SP1
-Internet Explorer 6.0.28
-Apache 2.0.50
-PHP 5.0.1 run as a CGI binary
-Gallery 1.4.4 pl2
-ImageMagick 6.0.62
(NetPBM was associated with at least one MAJOR problem.)