Re: 1.4.3 Upload problems Re: 1.4.3 Upload problems
 

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]

Main Menu

Re: 1.4.3 Upload problems

Started by JasonR, January 27, 2006, 11:13:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JasonR

Ok, I'm having some problems and I asked the questions in an unrelated topic I started on another board. I was asked to ressurect an old thread and post my questions here, so that's what I'm doing. I'll try to bring you up to speed with what I've done so far....

I am having a problem with my new fresh 1.4 installation (not an upgrade)......

I am getting the common error of "Unable to create thumbnail or reduced size image". I have searched the boards and found that is a common problem. I found this thread...  http://forum.coppermine-gallery.net/index.php?topic=23342.0  and followed the instructions to add in picmgmt.inc.php

       
$fh=fopen($dest_file,'w');
fclose($fh);


above the line


imagejpeg($dst_img, $dest_file, $CONFIG['jpeg_qual']);


I found that line twice around ine 245 and 273. I changed both and the new code looks like this.....

          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;
    }


I uploaded this new edited file to the server and I got the exact same result; a broken link icon and when clicking on it, I get the same error of "unable to create thumbnail...."  Is there anything thing else I can do to try and fix this problem? Thanks for the help.

http://www.applebytexas.com/coppermine/

temp user
username: test
password: test


JasonR

Thank you. I followed the instructions for changing to the debug setting. The saw the debug info after trying to uploade a pic but I didn't see any error messages but then again I don't know what it all means. Should I post the debug info here?

Nibbler

I was able to upload a picture just fine.

JasonR

Ok, I just tried logging in and uploading a single file thru the "Upload File" button in the main menu, which I had no idea existed. It worked fine and the photo uploaded. I have been previously using the "Batch Add Files" option, which I thought was the only way to upload files. I am sorry, that is probably my fault for not stating that I was using the "Batch Add Files" option but I thought it was the only way. It is logically the best way to upload large quantities of files, which I'll be doing. It is what I did in the past with 1.3 and it worked great. Any idea on what could be causing the problem on with that option? Thanks again.

Joachim Müller

when batch-adding, what error message do you get (if any) when clicking on the thumb.

JasonR

Thanks for the help GauGau.

I hope this is what you are talking about. After attempting to upload the photos the page titled "Adding new files to the gallery" load and under the "Result" column, instead of the "Ok" symbol I get a broken file symbol. When I click it I am redirected to a new blank page with a message that says "Unable to create thumbnail or reduced size image."

Hope that info helps. If not please let me know what you else you need to know. Thanks

JasonR


Joachim Müller

This is not a hotline >:(! What files have you been trying to batch-add? Post deep links to the files that can't be added.

JasonR

Sorry, I certainly didn't mean to offend. I understand you don't get paid for this and I appreciate your help, but that doesn't mean I'm not willing to pay. Maybe a system like "Google Answers" would work out for users who are in a hurry or do not have the paitence to wait and hope for answers that might never come? I'd be more than willing to pay $10 thru PayPal right now for anyone who can give me a definate answer to this question in a timely manner or at least spend the time helping me figure it out as quick as reasonably possible. I've spend far more that $10 worth of my time scratching my head, searching the forums etc. Maybe a "hotline" would be a good idea.  Just a thought????

I'm afraid a deep link isn't going to help you because I have hotlinking to any images on my server pevented. If need be I can temporarily turn that back on but I have a problem with people hotlinking to many of my images on my server and using them on their MySpace websites and blogs. The link to 3 test files that can't be added via batch-add are ....

http://applebytexas.com/coppermine/albums/photography/portfolio/test/P3080124.jpg
http://applebytexas.com/coppermine/albums/photography/portfolio/test/P3090170.jpg
http://applebytexas.com/coppermine/albums/photography/portfolio/test/PixieOnPoint.jpg

If I need to re-enable hotlinking please let me know and I'll turn it back on. If this is not the info you need please let me know what it is you need and I'll be more than glad to get it for you. Thanks and sorry for the impaitence on my part.

kegobeer

This is what displays in the address bar when I click on any of your links:

http://www.applebytexas.com/home/appleby/public_html/jpg,jpeg,gif,png,bmp

Quote from: Your WebsiteNot Found
The requested URL /home/appleby/public_html/jpg,jpeg,gif,png,bmp was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.33 Server at www.applebytexas.com Port 80

If you disable hotlink protection, does your gallery work correctly?
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Tranz

There seems to be an error in the hotlink protection code in .htaccess.

JasonR

Ok, thanks. I've disabled hotlink protection temporarily so that we can try and clear the first issue up. I will then later figure out what the error is with hotlink protection. And for the record I am enabling/disabling the protection thru Cpanel. I am doing nothing manually.

But for now it is OFF and clicking those links will take you directly to the photos. However, I did try batch-adding files again with the protection off the result is the same with the broken image link and when clicked the same error of "Unable to create thumbnail or reduced size image."

Thanks for the help fellas!

JasonR

I sure don't want to be bumping this too early since I've read the "hotline" guidelines but it's been almost 2 weeks and I've been at a 100% standstill on building my website, so I figured I could ask again by now. If it can't be fixed, do I just need to find another photo album software or try reinstalling Coppermine again? Thanks for the help.

kegobeer

What are the permissions for your batch add directories?
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Audioslave

Hi!

I had the exact same problem as you. I could upload pictures normally, but the batch-add function didnt work. The solution was very simple though, I had just forgotten to change the permissions on the batch-add folder I was using. So like kegobeer suggested, check the permissions on your batch-add directories.

JasonR

BAM!!!!!!!!!!!!!  ;D   That was it!!!! I had the permissions at 755, which I thought was correct and I'd already checked that before I made my first post. In my ignorance I thought that was correct but I was obviously wrong. I changed them to 777 and tested it and it worked perfectly! Thanks guys, the help has been greatly appreciated and now I can start building my website again. Thanks!