Every time I attempt to upload a photo/image to the gallery I get the following message...
Resizing/compressing original image
No resizing required
Error: Unable to make thumbnail (0)
I have netpbm installed (and seen in the configuration) as well as everything else working. I'm open to suggestions on what to do to fix this...
Additional configuration information...
I'm hosting this on my own Linux server with dyndns.org providing the url that gets forwarded to the server. I'm still learning Linux/Unix so things that might be obvious to others, I might need pointed out. The main reason I'm doing this on my own box is I have (so far) almost 2GB worth of digital images. That would cost no small sum to have hosted outside. I also have a 2Mbps pipe for the upload (15Mbps download) so I'm not too concerned about that aspect.
-- update --
I ran the netpbm check and got the following results... any ideas on fixing it???
Checking: '/var/www/html/netpbm/giftopnm' Expected status: 0, but actually received status 132.
Checking: '/var/www/html/netpbm/jpegtopnm' Expected status: 0, but actually received status 132.
Checking: '/var/www/html/netpbm/pngtopnm' Expected status: 0, but actually received status 132.
Checking: '/var/www/html/netpbm/pnmcut' Expected status: 0, but actually received status 132.
Checking: '/var/www/html/netpbm/pnmfile' Expected status: 0, but actually received status 132.
Checking: '/var/www/html/netpbm/pnmflip' Expected status: 0, but actually received status 132.
Checking: '/var/www/html/netpbm/pnmrotate' OK! Version: netpbm
Checking: '/var/www/html/netpbm/pnmscale' OK! Version: netpbm
Checking: '/var/www/html/netpbm/pnmtopng' Expected status: 0, but actually received status 132.
Checking: '/var/www/html/netpbm/ppmquant' Expected status: 0, but actually received status 132.
Checking: '/var/www/html/netpbm/ppmtogif' Expected status: 0, but actually received status 132.
Checking: '/var/www/html/netpbm/pnmtojpeg' Expected status: 0, but actually received status 132.
Checking: '/var/www/html/netpbm/pnmcomp' Expected status: 0, but actually received status 132.
** debug info **
Processing status...
******Adding IMG_0005.JPG*****
Doing the naming
Image Preprocessing
Resizing/compressing original image
Resizing Image: /var/www/html/albums/Winterphotographs/IMG_0005.jpg
Getting Dimension of file: /var/www/html/albums/Winterphotographs/IMG_0005.jpg
No resizing required
Adding Photo to the photo list
File /var/www/html/albums/Winterphotographs/IMG_0005.jpg type 2.
Getting Dimension of file: /var/www/html/albums/Winterphotographs/IMG_0005.jpg
Generating thumbnail.
Resizing Image: /var/www/html/albums/Winterphotographs/IMG_0005.jpg
Getting Dimension of file: /var/www/html/albums/Winterphotographs/IMG_0005.jpg
Executing:
'/var/www/html/netpbm/jpegtopnm' '/var/www/html/albums/Winterphotographs/IMG_0005.jpg' | '/var/www/html/netpbm/pnmscale' -xysize 150 150 | '/var/www/html/netpbm/pnmtojpeg' --quality=75 > '/var/www/html/albums/Winterphotographs/IMG_0005.thumb.jpg'
Results:
none
Debug messages:
pnmscale: Error reading magic number from Netpbm image stream. Most often, this means your input file is empty.
sh: line 1: 3243 Illegal instruction '/var/www/html/netpbm/jpegtopnm' '/var/www/html/albums/Winterphotographs/IMG_0005.jpg'
3244 Done(1) | '/var/www/html/netpbm/pnmscale' -xysize 150 150
3245 | '/var/www/html/netpbm/pnmtojpeg' --quality=75 >'/var/www/html/albums/Winterphotographs/IMG_0005.thumb.jpg'
Status: 132 (expected 0)
Error: Unable to make thumbnail (0)
Someone PLEASE help me...
----
The following information is required to get an answer:
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful): http://agoldberg.webhop.net/
Gallery version: 1.5
Apache version: 2
PHP version (don't just say PHP 4, please): 4.3.9
Graphics Toolkit:
Operating system: CentOS 4.1
Web browser/version (if applicable): Safari 2 (OS X 10.4.2 system connecting to web server).
Posts: 3233
Since its your own server, I would suggest grabbing the IM and/or NetPBM packages for your distribution of linux instead of the ones from here. I'm not sure what CentOS uses though.
Posts: 11
It's essentially Red Hat Enterprise 4.1 just repackaged. I grabbed the version from the link listed during the install and used those. Otherwise, what's the point of having them listed with the rest of the downloads?
Posts: 3233
For people who don't run their own server, mainly.
Its always better to use the package system for your distro if you can, since the binaries were compiled with it in mind. IM is also a wee bit faster than netpbm, incidentally.
Posts: 11
Well, my distro doesn't have netpbm specific for it. If there's no way to get the provided download to work, I'll have to go with a different package. If this software runs this poorly with my distro, I'd imagine it would run equally poorly with RHE, which is the same as CentOS... The host I have for my first site uses that, so I'm not even going to bother having him try the software.
Posts: 3233
You are welcome to go with any gallery type software you like. We don't lose anything by losing you. I do find it odd that you don't know your own linux distro though, since after only about 10 minutes of digging I found http://www.gtlib.gatech.edu/pub/centos/4.1/apt/i386/RPMS.os/netpbm-10.25-2.i386.rpm on their own site's mirror list. Oddly enough, they also have http://www.gtlib.gatech.edu/pub/centos/4.1/apt/i386/RPMS.os/ImageMagick-6.0.7.1-12.i386.rpm that you can use too. So maybe you ought to take the 5 minutes it would have taken you to verify that your distro actually has its own netpbm and im package.
That all said, the binaries on the gallery site are actually more likely to work on any linux distro, so obviously something isn't working right on your server. Can you try running one or two of the netpbm commands on the command line to see if it works there? What is really odd is that 2 of the binaries work fine and the rest don't. Are you sure they are all executable? Is the dir they are in also executable?
One of the reasons I suggested the IM / NetPBM package for your distro is that it should setup the binaries properly for your system, executable and all. That and they are 100% sure to work. Don't forget, IM is faster!
Posts: 11
First off I didn't appreciate the comment "We don't lose anything by losing you." That's really uncalled for... I mentioned in the opening post that I'm still learning about linux and such... What might be obvious to others might not be to me.
Secondly, using the rpm you 'found' buggered my system. It even locked up HARD on reboot. I'm in the middle of the boot process running a fily system integrity check which I HOPE will restore it to working order. The system was fine until I used the rpm you linked to. I'll be royally pissed if I have to rebuild this system because of this. Especially with the ftp server I'm running and such.
Oh, and everything was working just fine on the server... I suspect that there's something buggered with the gallery software, not the OS that's running on the box.
Posts: 3233
I was all roses and perfume until you pulled out the "If this software runs this poorly with my distro, I'd imagine it would run equally poorly with RHE, which is the same as CentOS" card. If you insult the software I use, support and help develop (a little), I am surely going to take offense and point out your complete nonsense.
Well, those RPMs I linked you to are from *YOUR* distro... so if they did anything to your system (which they really really 99% can't), you'll need to take it up with them. You might also consider popping in your CD and looking on them which are bound to contain both the netpbm and IM rpm packages. I'm sorry that you don't have much experience with linux, but I do. At least enough to know that gallery hasn't caused any of your problems no matter how much you think it has.
I do wish you luck with your system and suggest perhaps looking at any changes you made that would only take effect on the next reboot such as kernel upgrades or possibly changes to config files that are only read at boot (like grub.conf or perhaps fstab or something). Another thing to look at may be your hardware, if you are getting hard locks it can frequently be tracked down to memory issues (memtest86+ is a good memory tester) or an over heating cpu. Of course, using the rpm command shouldn't really cause these problems to appear, they are mainly seen when doing cpu/mem intensive things like compiling.
Its always easier to blame the software over the user/operator, eh? ;)
Posts: 11
Alright, so I was being a noob over the weekend... Don't tell me that's never happened to you...
Still, I FINALLY managed to get the parts of the OS installed, and setup the gallery... Only to find out that outside my local network, you can't see ANY images... I probably need to start a new thread for this issue...
Posts: 3233
It happens
Did you check out FAQ Gallery:c.22 yet? Basically, I think the best way to fix it (assuming you have port forwarding setup and working) is to make your albums and gallery URL into "/albums" and "/gallery" instead of "http://domain.com/gallery" or "http://domain.com/albums". You can also solve it using internal DNS if you know how to muck about with it. I personally do a combination of the two.
Posts: 11
I tried that already... no dice... At least, not with the full url in the field... I'll try shortening the path to the albums directory, but the gallery software is in the main HTML directory (such as /var/www/html)...
I'm open to other suggestions... I've been setting the owner of the directories to apache (in group and user) to see if that helps, which it hasn't...
Posts: 11
Using '/albums' fails since gallery can't find that directory without the full path...
I get:
// Error: Directory albums does not exist. Please create it.
// Error: Directory temp does not exist. Please create it.
at step 4 of the configuration wizard...
As for the url to the gallery, all I have in the html directory IS gallery... So /var/www/html is the direct path to the gallery directory... I even tried adding a '/' after the path (in the config wizard) but it still fails to find the images... I have NO graphics, at all, showing from outside my LAN. Inside the LAN, from my Mac (which I used to put the photo's up since that's what they are on) I see things properly. ANYONE else see's crap... Look for yourself to see what I'm talking about... http://agoldberg.webhop.net
Posts: 11
Looks like I might have it fixed... I put in the true url, not the one that people can use (without the port forwarding) in the configuration... I'll test it out from a few different places to make sure it works... If it does, at least other people will be able to view things... I just hope I can log in remotely (from work) so that I can add images that I want, if I have them there.
Posts: 1535
Note you should put /albums and /gallery in as the URLs, not the directories. I think you'll need to go into the config.php by hand to make that change, though. Unless 1.5 allows it now. It may. It also may not. I'm too lazy to go check.
Posts: 11
Too lazy to see the last post I made?? The albums and such needed to remain as the directory path/structure or it would fail (as I mentioned). I had to put in the 'raw' url in order for anyone outside my LAN to see the pages properly. It was a royal pain to figure that out, since there was nothing in the documentation to deal with people using either dynamic dns type services, or having to use port forwarding. I really think it should be added for those that will be using the gallery on servers they own, and run out of their homes. Granted, it's probably those of us that don't want to spend hundreds of dollars a month in hosting when our gallery grows in size.
Posts: 3233
FAQ Gallery:c.22
Posts: 1535
Relax, champ. I was just responding to the fact that fryfrog was refering to URLs and your posts were referencing directories. If you're happy with the hack you worked in, then you're happy and feel free to ignore the difference.
Incidently (for anyone else with a similar problem who winds up stumbing on this thread), 1.5 does allow for the relative URL structure without going into config.php, for what it's worth.
Posts: 7
The Centos netbpm rpm listed above does not have the tools in it at all, it's just libraries and man pages. In order to get the pnmcomp command you have to
yum install netpbm-progs
I couldn't find jhead on the default repositories but it can be found here.
http://centos.karan.org/el4/extras/stable/i386/RPMS/jhead-2.4-2.el4.kb.i386.rpm
Grant