Where to begin...
To make a long story short I've written a script for a client that does an image resize and thumbnail operation. This works on my localhost, but not on the actual server. I've traced the problem to the imagecreatefromjpeg() function. The image path is an URL, and from what I have read in the PHP manual you need to use fopen() first. I really don't know how to go about this. I did the following:
$handle = fopen($img_path, "r");
$img_content = fread($handle, filesize($img_path));
fclose($handle);
$im = imagecreatefromjpeg($img_content);
if(!$im){
print "Image not created";
}
When I run the script I get my error message. First I'd love for someone to point out if I am approaching this wrong, and second, are there any PHP settings that would affect this function? I'd been able to view the phpinfo of the server I'm working on before, but now all I get is a blank page with no info... Can a host shut off access to phpinfo? Quite frustrating.
Much appreciated,
Jamie