Need help troubleshooting problems uploading images to Galle

marvc

Joined: 2002-08-28
Posts: 31
Posted: Mon, 2002-09-09 23:28

I'm trying to figure out why I'm unable to upload any images to my Gallery. I'm running a w2k/apache web server and I downloaded Netpbm ver10.6. Following the steps outlined in FAQ4, I've done the following:
I located and ran the disgnostics.php file to check_netpbm and I get the following errors:
We are going to test each NetPBM binary individually. If you see errors, you should click here to see more details
Checking c:netpbmbingiftopnm.exe
Error! (Expected status: 0, but actually received status: 1)
Checking c:netpbmbinjpegtopnm.exe
Error! (Expected status: 0, but actually received status: 1)
Checking c:netpbmbinpngtopnm.exe
Error! (Expected status: 0, but actually received status: 1)
Checking c:netpbmbinpnmcut.exe
Error! (Expected status: 0, but actually received status: 1)
Checking c:netpbmbinpnmfile.exe
Error! (Expected status: 0, but actually received status: 1)
Checking c:netpbmbinpnmflip.exe
Error! (Expected status: 0, but actually received status: 1)
Checking c:netpbmbinpnmrotate.exe
Error! (Expected status: 0, but actually received status: 1)
Checking c:netpbmbinpnmscale.exe
Error! (Expected status: 0, but actually received status: 1)
Checking c:netpbmbinpnmtopng.exe
Error! (Expected status: 0, but actually received status: 1)
Checking c:netpbmbinppmquant.exe
Error! (Expected status: 0, but actually received status: 1)
Checking c:netpbmbinppmtogif.exe
Error! (Expected status: 0, but actually received status: 1)
Checking c:netpbmbinppmtojpeg.exe
Error! (File c:netpbmbinppmtojpeg.exe does not exist.)

I locate the ppmtojpeg.exe file and see that it doesn't appear to be associated in any way. Not sure about the other errors.
I next checked apache error log and noticed the following errors:
'c:netpbmbinppmtojpeg.exe' is not recognized as an internal or external command,
operable program or batch file.
'uname' is not recognized as an internal or external command,
operable program or batch file.
Access is denied.
Access is denied.
Access is denied.
Access is denied.
Access is denied.
Access is denied.
I am logged in to the album, but I'm not sure what the problem is or how to troubleshoot this file. I turn on debugging and attempt to upload again and get this error:
c:netpbmbinjpegtopnm "C:Program FilesPHP Home Edition 2wwwmodulesnuvisionzalbumsnuKidzDucks2.jpg" | c:netpbmbinpnmfile --allimages
Results:
none
Error messages:
Status: 255 (expected 0)
Error: Invalid image: Ducks2.jpg!

I'm trying to run this from the command line but it isn't working. I don't think I'm doing this write. Hoping to get some assistance on this.

 
marvc

Joined: 2002-08-28
Posts: 31
Posted: Mon, 2002-09-09 23:59

Also...I'm unable to locate an updated version of this ppmtojpeg file.

Yes I'm confused by this suggestion to run the command from the command line. This doesn't look right. For me it looks as though I'd have to do the following at the prompt:
First copy an image to the /temp directory where the album is.
Navigate to c:netpbmbin and run the following:
c:netpbmbinjpegtopbm.exe tempfaith1.jpg | c:netpbmbinpnmfile
I get the following error:
The dymanic link library libjpeg.dll could not be found in the specified path c:netpbmbin;c:winntsystem32;c:winntsystem;c:winntsystem32;c:winnt;c:winntsystem32wbem;c:program filesresource kit;c:program filesnmapwinbin.
I also get:
Error reading magic number from PBM file. Most often, this means your input file is empty.

I take it this means I need to locate this file and copy to the directories???

 
vallimar

Joined: 2002-08-15
Posts: 487
Posted: Tue, 2002-09-10 02:30

Hmm, are you sure you downloaded the correct binaries for
the windows platform? If you can't even execute them manually
then thats a pretty big problem. Try grabbing the binaries again
and be certain you get the correct ones.

 
marvc

Joined: 2002-08-28
Posts: 31
Posted: Tue, 2002-09-10 03:23

Binaries for w2k?? hmm...ok which ones ARE the correct ones?? I initially downloaded a version configured to work with phpPortal ver3.0. I don't see a version for Windows. I only see one version of Gallery, and that's a tar. I see Gallery Remote, and netpbm gallery ver1.1.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2002-09-10 03:51

Try these binaries: http://prdownloads.sourceforge.net/gallery/netpbm1.1-gallery1.0-win32.tgz?download

(from the Gallery download page on SourceForge)

 
marvc

Joined: 2002-08-28
Posts: 31
Posted: Tue, 2002-09-10 11:47

I download the binaries and copy the .dll's to my winntsystem32 directory. I also copy the remaining files to my existing netpbm folder, replacing the ones already there.
I download the libjpeg binaries and copy the .dll's to my winntsystem32 directory and create C:libjpeg. So I now have C:netpbm & C:libjpeg.
Attempt to upload a pic and get the same error.
Again the download page for Gallery only shows
gallery-1.3.1.tar.gz
InstallGalleryRemote.Win32.NoVM.exe
InstallGalleryRemote.Win32.VM.exe
gallery_remote-0.3-win32-VM.exe
gallery_remote-0.3-win32-noVM.exe
netpbm1.1-gallery1.0-win32.tgz

This is all I see for the Windows platform. Am I missing something???

 
marvc

Joined: 2002-08-28
Posts: 31
Posted: Tue, 2002-09-10 11:58

duh! I download and extract the .tar. I then copy it into my modules directory, replacing the existing files. Run the setup script, enter the gallery, and attempt to upload a pic and get the same error.
Lemme remove everything, reboot, and try again with a fresh install.

 
marvc

Joined: 2002-08-28
Posts: 31
Posted: Tue, 2002-09-10 12:31

ok...I start anew by:
1. Removing all files from system.
2. Upload all files and folders in Gallery folder. These are from gallery-1.3.1.tar.gz.
3. Open DOS prompt and navigate to gallery folder and type configure.bat
4. Open browser and navigate to setup script.
5. Enter password
6. Enter paths --> see doc posted at http://www.nubiint.com/galleryinstall.htm
7. Create albums directory or folder.
8. Turn on debugging.
9. Save config.
10. Go back to DOS prompt and type secure.bat
11. Go back to browser to Enter the Gallery.
12. Login to Gallery.
13. Create a new album and attempt to add a photo to the album and get the following:
Processing status...
- Adding Australia.jpg
Executing:
c:netpbmbinjpegtopnm "C:Program FilesPHP Home Edition 2wwwmodulesnuvisionzalbumsalbum01Australia.jpg" | c:netpbmbinpnmfile --allimages
Results:
none
Error messages:
Status: 255 (expected 0)
Error: Invalid image: Australia.jpg!
Need help? Look in the Gallery FAQ

:mad: ...runs screaming head first out of the window... :mad:

What IS the Deal??? How do I troubleshoot this jpegtopnm file?
Attempting to open this up in vbPortal is giving me all kinds of errors from mysql.
ok... :evil: ...relax, relate, release...:sad:

Is there a doctor in the house?!?!?!?!

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2002-09-10 17:51
Quote:
- Adding Australia.jpg
Executing:
c:netpbmbinjpegtopnm "C:Program FilesPHP Home Edition 2wwwmodulesnuvisionzalbumsalbum01Australia.jpg" | c:netpbmbinpnmfile --allimages
Results:
none
Error messages:
Status: 255 (expected 0)
Error: Invalid image: Australia.jpg!
Need help? Look in the Gallery FAQ

Quote:

Ok. So now that you've shuffled your NetPBM binaries around considerably, what happens when you try to run the above command by hand (provide your own input image from your own location)? Does it work?

 
marvc

Joined: 2002-08-28
Posts: 31
Posted: Tue, 2002-09-10 18:25

I type in this:
c:netpbmbin>jpegtopnm.exe /temp/faith1.jpg | c:netpbmbinpnmfile

I get, but I'm thinking this may not be correct:
Can't open /temp/faith1.jpg. Errno=No such file or directory(2). pnmfile: EOF / read error reading magic number stdin:

If I try it like this:
c:netpbmbin>jpegtopnm.exe c:program filesphp home edition 2wwwmodulesnuvisionztempfaith1.jpg | c:netpbmbinpnmfile

I get this:
Too many arguments. The only argument accepted is the input file specification pnmfile: EOF /read error reading magic number stdin:

I have magic quotes turned off.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2002-09-10 18:36
Quote:
I type in this:
c:netpbmbin>jpegtopnm.exe /temp/faith1.jpg | c:netpbmbinpnmfile

I get, but I'm thinking this may not be correct:
Can't open /temp/faith1.jpg. Errno=No such file or directory(2). pnmfile: EOF / read error reading magic number stdin:

If I try it like this:
c:netpbmbin>jpegtopnm.exe c:program filesphp home edition 2wwwmodulesnuvisionztempfaith1.jpg | c:netpbmbinpnmfile

I get this:
Too many arguments. The only argument accepted is the input file specification pnmfile: EOF /read error reading magic number stdin:

I have magic quotes turned off.

You should wrap the path with "'s, or else netpbm will get confused as to what is a path and what is a command.

Try this:

c:netpbmbin>jpegtopnm.exe "c:program filesphp home edition 2wwwmodulesnuvisionztempfaith1.jpg" | c:netpbmbinpnmfile

 
marvc

Joined: 2002-08-28
Posts: 31
Posted: Tue, 2002-09-10 19:07

I try that:
c:netpbmbin>jpegtopnm.exe "c:program filesphp home edition 2wwwmodulesnuvisionztempfaith1.jpg" | c:netpbmbinpnmfile

and I get the following error:

jpegtopnm.exe: WRITING PPM FILE
stdin: PPM raw, 896 by 600 maxval255

Not sure what this means, but it doesn't return a invalid error.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2002-09-11 03:10

Ok, this is progress. Now we know that you have the right binaries. Delete your Apache error_log, restart Apache, try the upload again and let us know what errors appear in the log.

 
marvc

Joined: 2002-08-28
Posts: 31
Posted: Wed, 2002-09-11 13:39

Deleted error log in Apache.
Stopped & Started the Apache server.
Attempted to upload file again and got the same error:
Processing status...
- Adding faith1.jpg
Executing:
c:netpbmbinjpegtopnm "C:Program FilesPHP Home Edition 2wwwmodulesnuvisionzalbumsalbum01faith1.jpg" | c:netpbmbinpnmfile --allimages
Results:
none
Error messages:
Status: 255 (expected 0)
Error: Invalid image: faith1.jpg!
Need help? Look in the Gallery FAQ

Apache error log shows the following:
[Wed Sep 11 09:32:11 2002] [notice] Parent: Created child process 1052
[Wed Sep 11 09:32:12 2002] [notice] Child 1052: Child process is running
[Wed Sep 11 09:32:12 2002] [notice] Child 1052: Acquired the start mutex.
[Wed Sep 11 09:32:12 2002] [notice] Child 1052: Starting 250 worker threads.
Access is denied.
I am logged in to the gallery.
According to FAQ B.3 &amp; phpinfo.php, this server isn't running in safe mode. I'm not sure on the CGI part, but here's my<!-- BBCode Start --><A HREF="http://www.nubiint.com/modules/nuvisionz/setup/phpinfo.php" TARGET="_blank">phpinfo file</A><!-- BBCode End -->.

 
marvc

Joined: 2002-08-28
Posts: 31
Posted: Wed, 2002-09-11 16:29

How do I configure Apache to ensure that it has permissions to execute these binaries?

Is this correct:
<Directory "C:Program FilesPHP Home Edition 2wwwnuvisionz">
AllowOverride All FileInfo
</Directory>

<Directory "C:Netpbmbin">
AllowOverride All FileInfo
</Directory>

Or am I going about this wrong and should be looking elsewhere?

 
marvc

Joined: 2002-08-28
Posts: 31
Posted: Wed, 2002-09-11 18:36

OK...After messing around in httpd.conf I'm now able to get setup to see my .htaccess file. I get the following:
Success
PHP v4.2.2-dev is OK

Success
safe mode is off

Success
I can read your .htaccess file

Success
magic quotes are off

Warning!
Either mod_rewrite is not installed or your .htaccess file is not enabled (see above). Either way, we'll have to use longer URLs in the Gallery. If you want to turn it on I'd suggest that you make sure that your .htaccess file works and then if it still doesn't work you may need to reconfigure and rebuild Apache with this flag:
--enable-module=rewrite

Success
All 12 NetPBM binaries located

Warning!
I can't find jhead. <--I've jhead located in c:netpbmjhead.exe
<--I've got Netpbm located in c:netpbmbin

I think this warning is bogus because I have the file loaded where it needs to be.
I'm still unable to upload any images. Seeking any help...

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Wed, 2002-09-11 18:42

Hi!

Just a stab in the dark, but can this be the same trouble that <!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&amp;name=phpBB_14&amp;file=index&amp;action=viewtopic&amp;topic=528" TARGET="_blank">this thread</A><!-- BBCode End --> discusses? Eg, the session path for php/32 in php.ini?

 
marvc

Joined: 2002-08-28
Posts: 31
Posted: Wed, 2002-09-11 19:35

I've resolved this issue. Turns out I hadn't checked to ensure that the Netpbm folder had full control for the Everygroup. Oversight on my part.
Currently now able to upload pics fine. Thanks looking to become a contributing member in a day or so.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2002-09-14 03:50

Argh! You never mentioned that you're running Apache 2.0!

PHP is still experimental on Apache 2.0, which is why you're having all these problems :sad: