Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image::Size problem

Status
Not open for further replies.

WintersMystic

Programmer
Aug 8, 2001
39
0
0
US
below is my code. this is straight off the docs for Image::Size. and it is installed on my webhost. but i get nothing but a blank screen when i test it. any ideas why?

Code:
#!/usr/bin/perl -w

use CGI::Carp qw(fatalsToBrowser);

BEGIN{
use CGI::Carp qw(carpout);
open(LOG, ">mycgi-log") or die"Cant open log: $!";
carpout(LOG);
}

use Image::Size;
($globe_x, $globe_y) = imgsize("IMAGE URL HERE");

print "Content-type: text/html\n\n";
print "$globe_x $globe_y";
 
what do you get if you run it from the command line? Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
how do you mean? can that be done when working on a webhost?
 
ok, i just tried this on my script..

Code:
use Image::Size;
($one, $two) = imgsize("url to image");

if($one eq ""){
$one = "NOPE";
}
if($two eq ""){
$two = "NOPE 2";
}

print "Content-type: text/html\n\n";
print &quot;$one <p>$two&quot;;

and i got nope and nope2. which leads me to believe that my webhost doesnt have Image::Size properly installed. or something. all i know is they say its there and that its installed apropriately. SO, how would i go about extracting Size.pm from the Image::Size package and place it in the directory my script is at and using it from there?

any help is greatly aprecaiated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top