Jump to content

gd help


Gary Tactic

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
Link to comment
https://forums.phpfreaks.com/topic/7640-gd-help/
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");
Link to comment
https://forums.phpfreaks.com/topic/7640-gd-help/#findComment-27859
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.
Link to comment
https://forums.phpfreaks.com/topic/7640-gd-help/#findComment-27869
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!
Link to comment
https://forums.phpfreaks.com/topic/7640-gd-help/#findComment-28117
Share on other sites

Archived

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

×
×
  • Create New...

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.