Argonust Posted September 10, 2018 Share Posted September 10, 2018 Hi I have a function $images = $access->getImages(); foreach($files as $file) { $save = 'thumbs/'.$file; create_thumbs($file, "$save" ,150,150); } Here is what it calls function create_thumbs($path,$save,$height,$width){ $info=getimagesize($path); //print_r($info); $size=array($info[0], $info[1]); if($info['mime'] == 'image/jpeg'){ $src=imagecreatefromjpeg($path); }else{ return false; } This code works for me in OpenSuse, however when I move the file to my web server that is CentOS 7 it does not work I get : Fatal error: Call to undefined function imagecreatefromjpeg() Both have php 5 Any help would be greatly appreciated Thank you Quote Link to comment Share on other sites More sharing options...
requinix Posted September 10, 2018 Share Posted September 10, 2018 You need to install the the GD extension. And you also need to upgrade to PHP 7. Quote Link to comment Share on other sites More sharing options...
Argonust Posted September 11, 2018 Author Share Posted September 11, 2018 Thank you, requinix Installing the GD extention worked Thank you 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.