batch upload, no error message but no pics too! batch upload, no error message but no pics too!
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

batch upload, no error message but no pics too!

Started by torstenahren, January 06, 2006, 02:52:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

torstenahren

** My System Settings **
I'm running Coppermine 1.4.2 on a server provided by MediaTemple (I am using XP Pro)

I'm able to install, run, and configure Coppermine fine.

** The Problem **
I am having trouble loading photos into Coppermine via "Batch Add Files"

1)   In my albums directory, I uploaded a folder "test" containing one jpg through ftp voyager.
2)   I click the batch add files button and select the directory "test", I then click ok to confirm this selection.
3)  In the "list of new files" page the jpg is shown (with thumbnail) and automatically selected, I choose an album to put it in and click "insert selected files". All seems to work fine.
4) on the "adding new files to your directory" the jpg is coming up but in the result column to the right the only thing showing is an image placeholder (red cross) (i.e. no OK, no DP or PB or NA.
5) When I click on this image place holder a new window opens with this text only: "Unable to create thumbnail or reduced size image."
6) When I check the relevant album, it shows no files have been uploaded into it, nor into any other place.


Note:  I'm able to upload photos via the Coppermine http interface, but the XP publish to web function returns the same situation as that described above.
I tried this with an older version of Coppermine and experienced exactly the same problem. I have also tried on a different computer -- also the same problem.

Thank you for ur help!!


torstenahren

Thanks for reply. I have applied the code to both gd1 and gd1, checked and double checked. logged out and in to coppermine afterwards and still the same issue. Do I miss something?

Here is the code I have amended :

case "gd1" :
            if (!function_exists('imagecreatefromjpeg')) {
                cpg_die(CRITICAL_ERROR, 'PHP running on your server does not support the GD image library, check with your webhost if ImageMagick is installed', __FILE__, __LINE__);
            }
            if ($imginfo[2] == GIS_JPG)
                $src_img = imagecreatefromjpeg($src_file);
            else
                $src_img = imagecreatefrompng($src_file);
            if (!$src_img) {
                $ERROR = $lang_errors['invalid_image'];
                return false;
            }
            $dst_img = imagecreate($destWidth, $destHeight);
            imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, $destWidth, (int)$destHeight, $srcWidth, $srcHeight);
            $fh=fopen($dest_file,'w');
            fclose($fh);
            imagejpeg($dst_img, $dest_file, $CONFIG['jpeg_qual']);
            imagedestroy($src_img);
            imagedestroy($dst_img);
            break;

        case "gd2" :
            if (!function_exists('imagecreatefromjpeg')) {
                cpg_die(CRITICAL_ERROR, 'PHP running on your server does not support the GD image library, check with your webhost if ImageMagick is installed', __FILE__, __LINE__);
            }
            if (!function_exists('imagecreatetruecolor')) {
                cpg_die(CRITICAL_ERROR, 'PHP running on your server does not support GD version 2.x, please switch to GD version 1.x on the admin page', __FILE__, __LINE__);
            }
            if ($imginfo[2] == GIS_GIF && $CONFIG['GIF_support'] == 1)
                $src_img = imagecreatefromgif($src_file);
            elseif ($imginfo[2] == GIS_JPG)
                $src_img = imagecreatefromjpeg($src_file);
            else
                $src_img = imagecreatefrompng($src_file);
            if (!$src_img) {
                $ERROR = $lang_errors['invalid_image'];
                return false;
            }
            if ($imginfo[2] == GIS_GIF)
              $dst_img = imagecreate($destWidth, $destHeight);
            else
              $dst_img = imagecreatetruecolor($destWidth, $destHeight);
            imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $destWidth, (int)$destHeight, $srcWidth, $srcHeight);
            $fh=fopen($dest_file,'w');
            fclose($fh);
            imagejpeg($dst_img, $dest_file, $CONFIG['jpeg_qual']);
            imagedestroy($src_img);
            imagedestroy($dst_img);
            break;
    }