I've searched through the forum and have seen a number of issues with uploading product images. In my case, I have to resize images down to 20KB or less, and even then, sometimes the images don't upload, giving the dreaded:
Fatal error: Call to undefined function: imagecreatefromjpeg() in /var/www/html/tgr/quickcart/libraries/FotoJobs.php on line 264
Has anyone found a foolproof fix for this? I have the folder called products, it's chmod'ed to 777, and the files are actually uploading to the folder, but they aren't linked because of the error.
Out of two files I've uploaded, one worked perfectly, the other generated the error and didn't work though the file did upload.
Sorry, the images always upload, but don't necessarily process in quick.cart and aren't usable.
wizzud
2005-09-21 10:18
Quick test for level of GD support: Create a small PHP file, eg. gdsupportinfo.php, and put these lines in it ...
<?php if(function_exists('gd_info')) {var_dump(gd_info());} else {echo "No GD support";} ?>
Upload it and run it from your browser. If GD is enabled, it has simple boolean flags telling you what picture formats are supported (GIF, JPG, PNG, WBMP, etc).
ttyR2
2005-09-21 16:14
"No GD support" is the reply. In searching Google.com, I haven't seen a howto specifically for enabling GD2 with php 4.3.11. Everything I have found relates to Windows implementation of GD/PHP.
ttyR2
2005-09-21 16:37
Okay...it turns out I didn't have the php-gd module installed. PHP and GD2 were installed seperately, but didn't have the necessary php-gd module. Using Fedora Core 3 (other distros will be similar) I did a [yum install php-gd] and yum did it's thing, downloading the correct version. Then a [service httpd restart] and the gdsupportinfo.php returned:
Image uploads look like they're working now. It might be helpful in the about.txt file to specifically list php-gd as a requirement as it may well not install by default under linux.
does that imply that I new a newer version of GD library ....
adam
ttyR2
2005-09-21 18:31
What distro are you using? Should be a way to query for the actual version of the GD package you have installed. I'm not a programmer or much of a linux person for that matter, so can't say why running the script in your case returns "2.0 or higher" instead of the actual version on mine. Mine was installed bundled with php4 when I installed the OS initially.
well I am not sure, all I know is that I have PHP Version 4.3.1 and GD support enabled for GD Support enabled GD Version 2.0 or higher PNG Support enabled WBMP Support enabled
how do you get the bundled version ?
adam
ttyR2
2005-09-24 06:01
bundled meant it came with php in the default Fedora install, as opposed to installing php after the fact.