coderage Posted April 16, 2007 Share Posted April 16, 2007 Graphics with php is driving me crazy now. plz help im new to this . When i try to execute the following code or any other graphics code i get "Undefined function " error message, i have php_exif.dll, php_gd2.dll , php_imagick.dll in my php extensions folder <? Header("Content-type: image/jpeg"); $im = imagecreatefromjpeg("./test.jpg"); Imagejpeg($im,'',20); ImageDestroy($im); ?> <br /> <b>Fatal error</b>: Call to undefined function imagecreatefromjpeg() in <b>D:\www\jpgimage.php</b> on line <b>3</b><br /> Using Win Xp, iis 5.1, PHP 5.2.1 Link to comment https://forums.phpfreaks.com/topic/47217-solved-going-crazy-help-graphics-problem/ Share on other sites More sharing options...
Barand Posted April 16, 2007 Share Posted April 16, 2007 Check your php.ini file (phpinfo() will give location of the on it is using) and make sure extensions folder is defined as expected (ie c:/php/extensions) and that the ; has been removed from the line ;extension=php_gd2.dll Link to comment https://forums.phpfreaks.com/topic/47217-solved-going-crazy-help-graphics-problem/#findComment-230285 Share on other sites More sharing options...
coderage Posted April 17, 2007 Author Share Posted April 17, 2007 This problem is solved, thanks to Barnard and all the folks who helped me, The problem was 1- The php installation needed a Repair. 2- My stupidity, i was using "jpg" instead of "jpeg" in function names, it makes the whole difference. 3- You need to have two image variables one to allocate a free canvas ex $img1=imagecreate ($height,$width) and $img2. Where $img2 gets the image from func: imagecopy(parameters). Plz correct if this is wrong. Link to comment https://forums.phpfreaks.com/topic/47217-solved-going-crazy-help-graphics-problem/#findComment-231062 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.