The dreaded "Unable to create thumbnail or reduced size image" The dreaded "Unable to create thumbnail or reduced size image"
 

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

The dreaded "Unable to create thumbnail or reduced size image"

Started by Peter Laws, August 07, 2008, 04:37:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Peter Laws

Yes the folder perms (777) are correct album, edit & userpics dirs (as the files end up in the userpics), and using GD2.x

I turned on notices with the debug and got:

Quote/upload.php
    * Notice line 2191: Undefined index: user1
    * Notice line 2192: Undefined index: user2
    * Notice line 2193: Undefined index: user3
    * Notice line 2194: Undefined index: user4
/include/picmgmt.inc.php
    * Warning line 276: imagecreatetruecolor(): Invalid image dimensions
    * Warning line 277: imagecopyresampled(): supplied argument is not a valid Image resource
    * Warning line 281: imagejpeg(): supplied argument is not a valid Image resource
    * Warning line 283: imagedestroy(): supplied argument is not a valid Image resource
    * Warning line 289: getimagesize(): Read error!
So, looks like my issue is totally different to many other people's??

Any ideas?

Joachim Müller

No, in fact it looks the same as that of many similar postings, where people asked for support on upload issues and failed to read the corresponding section of the docs that clearly explains what you need to do when asking for support. In this aspect, your posting doesn't differ from 90% or all other postings on this sub-board: the first reply by a supporter is always the same: read the docs and do as suggested there. Guess why: there's a reason why we ask for the information you need to post (details: the section "asking for support on upload issues" yadda yadda). We're sick to be forced to repeat to every new thread starter what he needs to do to get support, so we wrote the corresponding section in the docs and put up a sticky thread on this sub-board that tells you just the same thing. Yet 90% of all thread starters don't read it and then are frustrated about the harsh reply they get by supporters (which usually is shorter than my rant here).
Please, do the both of us a favor: read the docs closely. If you already have, read the section I'm refering to again. Really - I mean it. Then do as suggested there.
This reply is not meant to boss you around or sound disrespectful - it's meant to sound sad and frustrated.

Joachim

Peter Laws

Sorry that 'got' your goat,.... but I did RTFM, as you quite nicely put it in your other posts........ and I also did what TFM told us to do!  Changed the php.ini.....and guess what... same error! :-\

phill104

What Joachim is asking is that you read the docs here

http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_trouble

and then do what is asked especially what is written in red once you have applied the settings suggested.

You have to understand that if 9 out of 10 people don't do this then that is a lot of time wasted by the support team asking you to do so. On a very busy board like this that adds up. The team do all this work for free and develop the software in their spare time for free. It is not a lot to ask that those who use it put some effort in themselves and read the docs thereby making life a lot easier for the devs.
It is a mistake to think you can solve any major problems just with potatoes.

Peter Laws

Quote from: phill104 on August 07, 2008, 07:35:18 PM
What Joachim is asking is that you read the docs here
http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_trouble
and then do what is asked especially what is written in red once you have applied the settings suggested.
Well I did all that in one go..... folders were 777 as always.....

Heres a test login if required:

http://www.reemicks.co.uk/copmine/index.php
both details are test

and fwiw:
Quote[php.ini]
file_uploads : On   On
max_input_time :  120  120
memory_limit: 32M  32M
upload_max_filesize   2M   2M
upload_tmp_dir   /tmp/   /tmp/

[permissions]
drwxrwxrwx 5 10013 2523 1024 Aug  7 18:43 albums

drwxrwxrwx 2 10013 2523 1024 Aug  7 18:43 edit
drwxrwxrwx 2 10013 2523 1024 Aug  7 14:34 images
drwxrwxrwx 2 10013 2523 5120 Aug  7 18:43 userpics

phill104

Did you read the bit about your settings?

   [num_file_upload] => 5
    [num_URI_upload] => 3

Setting these as suggested in the docs means there are more details about the error provided in the debug.

Well done on being up to date with your coppermine install though.
It is a mistake to think you can solve any major problems just with potatoes.

Peter Laws

it says URL = 0 and files = 1
Quote#
# Set the upload form configuration for all groups to "Single file uploads only"

   1. set File upload boxes to "1" (1)
   2. set URI upload boxes to "0" (2)
   3. set No. of boxes to "fixed" (3)


Peter Laws

Just a quick update......Just thought, it wouldnt be anything to do with the file permissions would it, as my server doesnt actually use the correct user:group for files created/uploaded via php (blame gay Plesk for not including suPHP)..... I see the script uses chmod on files, but it'll fail as the file isnt under the same user:group as the calling php file.....

?

Joachim Müller

It took 7 postings before you finally set up coppermine as suggested for upload troubleshooting and supporting purposes, which is quite too much in my opinion. Arguing with supporters about the need to do some things the way they need to be done is just very annoying for supporters.
When I went to your site and logged in with the test user account that it took so long to provide I realized that there was not album where the test user could upload to, so I had to create one for him first, which proves that you never bothered to even try for yourself and log in with the test user account and try uploading using that account. This is not what I would call thorough preparation of a support request.
Anyway, I created that album and went on to upload, finally with the needed settings in place (after 7! postings on this thread). On a first attempt I got
QuoteThe size of file you have uploaded is too large (maximum allowed is 400 x 400) !
when trying to test-upload with my "usual 640x480 pixel test file. On the second attempt, trying to upload a file with smaller resolutions than the low-spec dimensions you require I got
QuoteThe file 'albums/userpics/flower.jpg' can't be inserted in the album

Unable to create thumbnail or reduced size image.

File: /var/www/vhosts/reemicks.co.uk/httpdocs/copmine/db_input.php - Line: 402
, which usually indicates that there is something wrong permissions-wise on file system level. However, there are more things to check: 777 doesn't necessarilly have to be the correct setting that is needed on your webserver: some webservers fail to work with 777, but need 755. Please contact your webhost on this issue. Judging from your postings, you seem to know a lot about it (much more than the average user looking for support on this board), so you might be self-hosted as well or at least have shell access. If this is the case, review carefully for hardening patches. Usually, on many webservers you mustn't grant the world/nobody write access (which is for example the case on my webhosting account) - I have to chmod 755; if I chmod to 777, all I get are error messages. You should as well look into PHP'S temporary upload folder and make sure that it exists and that it has the needed permissions as well.
And yes: we're aware that the script can only perform PHP's chmod command if it has the priviledge to do so, which is hardly ever the case, so the chmod command issued by the script doesn't do anything particularly usefull in 99% of the times. However, it won't hurt and is beneficial for the small minority with exotic permissions setup, that's why it's there and has been added in the first place. Ignore it for now.

Joachim

Peter Laws

I've tried this script on a FRESH server (php5, mysql5, gd2)......and guess what........ same results....... ::)

Peter Laws

.....even fails when i change the folders user to apache:apache............. so..... er.... yeah.....  :'(


Hein Traag

Quote from: Peter Laws on August 12, 2008, 02:17:01 AM
Thank god

Your welcome.. son?   ;) Or could you perhaps elaborate on what it is that you are thankfull about?