Jump to content
Updating IPB tonight Read more... ×

Archived

This topic is now archived and is closed to further replies.

Gary Tactic

gd help

Recommended Posts

Hello,

I have written the following simple script to test whether my gd library is working properly.

[code]
header("Content-type: image/jpeg");
$im = imagecreatefromjpeg("./test.jpg");
imagejpeg($im,'',20);
imagedestroy($im);
[/code]

This returns an error referring to the first line of code regardless of what the line is.

I am sure this means my gd library doesn't work, but webhostfreaks says the gd library is installed fine.

any ideas of how i can get round this?

Gary

Share this post


Link to post
Share on other sites
[!--quoteo(post=365688:date=Apr 17 2006, 10:18 PM:name=obsidian)--][div class=\'quotetop\']QUOTE(obsidian @ Apr 17 2006, 10:18 PM) [snapback]365688[/snapback][/div][div class=\'quotemain\'][!--quotec--]
what's the error?
[/quote]

Parse error: syntax error, unexpected T_STRING on line 2

referring to:

header("Content-type: image/jpeg");

Share this post


Link to post
Share on other sites
[!--quoteo(post=365697:date=Apr 17 2006, 05:32 PM:name=Gary Tactic)--][div class=\'quotetop\']QUOTE(Gary Tactic @ Apr 17 2006, 05:32 PM) [snapback]365697[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Parse error: syntax error, unexpected T_STRING on line 2

referring to:

header("Content-type: image/jpeg");
[/quote]

you may just need to get rid of any white space above the header() call.

Share this post


Link to post
Share on other sites
[!--quoteo(post=365707:date=Apr 17 2006, 10:55 PM:name=obsidian)--][div class=\'quotetop\']QUOTE(obsidian @ Apr 17 2006, 10:55 PM) [snapback]365707[/snapback][/div][div class=\'quotemain\'][!--quotec--]
you may just need to get rid of any white space above the header() call.
[/quote]

Wow, thank you very much, that error was driving me mad!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.