peterp Posted February 15 Share Posted February 15 Hi All, I have a few logos and product images which are stored in their appropriate images sub directories how ever when I create a new product or category or add a manufacturer all I get when I select images on the appropriate maintenance screen all I see is a spinning circle and the word loading and then it disappears and I'm left with blank image screen. All of the images are of the right size and are in their correct directories. I have attached a screen shot of the error log if this will help Any help is appreciated Best Regards, Peterp Date Message http://localhost/champcoclothingtestnew/admin_ElnMlN/skins/default/images/select_all.gif Check/Uncheck all With Selected: Today, 14:18 [<strong>Exception</strong>] C:xampphtdocschampcoclothingtestnewclassesgd.class.php:113 - Call to undefined function imagecreatefromjpeg() http://localhost/champcoclothingtestnew/admin_ZlX9zy.php?_g=xml&type=files&q=list&dir=%2F&group=1&product_id=3 Today, 14:17 [<strong>Exception</strong>] C:xampphtdocschampcoclothingtestnewclassesgd.class.php:113 - Call to undefined function imagecreatefromjpeg() http://localhost/champcoclothingtestnew/admin_ZlX9zy.php?_g=filemanager Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 15 Share Posted February 15 Looking at the comments in the PHP documentation for imagecreatefromjpeg(), it says: Quote If imagecreatefromjpeg() fails with "PHP Fatal error: Call to undefined function: imagecreatefromjpeg()", it does NOT necessarily mean that you don't have GD installed. If phpinfo() shows GD, but not JPEG support, then that's the problem. You would think that --with-gd would do the right thing since it does check for the existence of libjpeg (and finds it) and add that feature to GD, but it doesn't in v4.4.4 at least on RHEL v2.1, RHEL v3, CentOS v2.1 or CentOS v4.3. On those platforms, it's *important* that --with-jpeg-dir be *before* --with-gd. If it's not, GD won't build with jpeg support as if --with-jpeg-dir had never been specified... That comment is from 17 years ago, and it may be referring to PHP4. In admin, at the bottom of the Navigation pane, click PHP Info. Scroll to the GD table -- if it exists. Note whether JPEG Support is enabled. Quote Link to comment Share on other sites More sharing options...
peterp Posted February 21 Author Share Posted February 21 Hi Brian, Sorry about the delay in getting back to you I have been swamped with work, anyway I checked the php info and there is no GD table should there be a GD table? Best Regards, Peterp Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 21 Share Posted February 21 (edited) Yes. Please review whatever control panel you have to manage the stack - specifically the PHP version and the extensions enabled within it. Did you mention a XAMPP stack? The stack controller should have this functionality to enable PHP extensions. An Internet search suggests that XAMPP has a file editor. That editor is to be used to edit the PHP.INI file. In the PHP.INI file, find the statement in the [Extensions] block that has "extention=gd.dll" (or something like that) and delete the semicolon in front of it. Then restart the web server. Edited February 21 by bsmither Quote Link to comment Share on other sites More sharing options...
peterp Posted February 21 Author Share Posted February 21 Hi brian, I have used the editor to check that the extension for GD is not noted out This is what I found that was anywhere close to GD (see below) ; Windows Extensions ; Note that ODBC support is built in, so no dll is needed for it. ; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5) ; extension folders as well as the separate PECL DLL download (PHP 5). ; Be sure to appropriately set the extension_dir directive. ; extension=php_bz2.dll extension=php_curl.dll extension=php_fileinfo.dll extension=php_gd2.dll (should this read extension=php_gd.dll) extension=php_gettext.dll ;extension=php_gmp.dll ;extension=php_intl.dll I hope this helps this was the only reference to GD that I could find Regards, Peterp Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 21 Share Posted February 21 According to this: https://php.watch/versions/8.0/gd2-gd-windows the actual file has been renamed. So the question is: what actual version of PHP is in that environment? PHP4, PHP5, PHP7, PHP8? Find the actual folder where all the actual extensions are located, and verify the actual name of the GD library file. Make sure the filename is spelled in the PHP.INI file exactly as it appears in the directory listing. Quote Link to comment Share on other sites More sharing options...
peterp Posted February 21 Author Share Posted February 21 Hi Brian, The version of PHP is 8 I have followed the url address you supplied and it seems that by doing the following GD Extension: Windows DLL file name changed from php_gd2.dll to php_gd.dll If you were to copy php.ini a PHP 7 php.ini file to PHP 8, it now needs to use the GD extension with php_gd.dll, or in its extension-less format: - extension=gd2 + extension=gd it has fixed the problem and now the images are appearing correctly. thanks again for your help very much appreciated Best Regards, Peterp 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.