I'm trying to put together a program to make thumbnails for all files in a directory. Along the way, I'm running the function imagecreatefromjpeg to try to open up the jpeg so that I can do stuff with it, but it when I try to run imagecreatefromjpeg, the program just quits. Why?
BTW: At first, when I tried to run imagecreatefromjpeg, I was getting an error message that the function did not exist.
Then, after examining php.net a bit more, I added an @ in front of imagecreatefromjpeg, and now I'm not getting an error message, but, as I said, the program quits when I try to run the function.
imagecreatefromjpeg quitting out on me
Moderator: General Moderators
My guess is that you do not have GD installed on your server. Go here for more info:
http://www.boutell.com/gd/
http://www.boutell.com/gd/faq.html
http://www.boutell.com/gd/
http://www.boutell.com/gd/faq.html
Adding a @ in front of a function just supresses any error-messages it might give. So if you are missing an install of GD (as DuFF mentioned) you wouldn't know of it.
Supressing function-errors it's like giving headache pills to someone with meningitis. You take away the pain temporarily, but you don't cure it.
Never count on it to solve any problems...
Supressing function-errors it's like giving headache pills to someone with meningitis. You take away the pain temporarily, but you don't cure it.
Never count on it to solve any problems...
Last edited by JAM on Sun Jan 04, 2004 11:11 am, edited 1 time in total.
Ah!
JAM - Thank you, I did not know that's what @ did. I just did it because the script on php.net seemed to have it like that for some reason.
DuFF - Thank you to yourself as well. There *was* GD installed, but it was 1.6.2, and thusly, horribly outdated... once GD was updated, things worked *MUCH* better. That was the problem.
DuFF - Thank you to yourself as well. There *was* GD installed, but it was 1.6.2, and thusly, horribly outdated... once GD was updated, things worked *MUCH* better. That was the problem.