Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: batch upload, no error message but no pics too!  (Read 2972 times)

0 Members and 1 Guest are viewing this topic.

torstenahren

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
batch upload, no error message but no pics too!
« on: January 06, 2006, 02:52:53 pm »

** 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!!
Logged

torstenahren

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: batch upload, no error message but no pics too!
« Reply #2 on: January 06, 2006, 03:57:53 pm »

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;
    }
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 19 queries.