Gary Tactic Posted April 17, 2006 Share Posted April 17, 2006 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 Quote Link to comment Share on other sites More sharing options...
obsidian Posted April 17, 2006 Share Posted April 17, 2006 what's the error? Quote Link to comment Share on other sites More sharing options...
Gary Tactic Posted April 17, 2006 Author Share Posted April 17, 2006 [!--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 2referring to:header("Content-type: image/jpeg"); Quote Link to comment Share on other sites More sharing options...
obsidian Posted April 17, 2006 Share Posted April 17, 2006 [!--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 2referring to:header("Content-type: image/jpeg");[/quote]you may just need to get rid of any white space above the header() call. Quote Link to comment Share on other sites More sharing options...
Gary Tactic Posted April 18, 2006 Author Share Posted April 18, 2006 [!--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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.