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: Upload problems  (Read 4643 times)

0 Members and 1 Guest are viewing this topic.

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Upload problems
« on: November 03, 2010, 06:48:05 pm »

Dear all,

I am running into problems with the upload dialogue. I am using cpg1.5.8, have a memory limit of 40MB on my server and my "userpics" folder and all subfolders are set to 755. When testing for this problem I had all plugins uninstalled. Using theme "curve".

As far as I can judge it there are two different kind of problems:

1. Error messages, presumably not caused by mem-limits
a) Logged in as admin -- see Upload error No 01.jpg
When uploading smaller files (which surely don't scratch my servers mem limit while resizing, in my case these are files up to ~3000 pixels on the long side, using 3:2 format pictures) via the "upload file" dialogue for standard users, I receive the attached error message No. 1. The pop-up is generated for every single file. After all files have been uploaded, there's no "edit files" dialogue. However, all those files find their way safely onto the database and are integrated in the target album. Thumbs and normal_filename have been generated, they can be accessed and viewed normally.

b) Logged in as User --see Upload error No 02.jpg
Strangely enough, when logged in as a user, only files with an even lower resolution get integrated. Some larger files (that are not large enough yet to produce the mem-limit-error as outlined below, and those files are obviously not bigger than the specified limits set in the coppermine configuration -- in my cases these are files of about 2500pixels on the long edge, using 3:2 formats) result in a nondescript error message during upload. Those files are are NOT integrated in the album. However, the resizing for thumbs and normals has taken place on the server.

2. Errors due to (early) mem limit -- see Upload error No 03.jpg
Error number 3 seems to me to be caused by files that are too big for the servers mem limit (in my case >3000pixels on the long edge). However, I could upload files of this size and also way larger ones with cpg1.4.27's JUpload feature. Does cpg1.5.8 need dramatically more resources than 1.4.27 needed? Is there any way I can circumvent this? Unfortunately, my host does not allow me to raise the mem limit beyond 40MB.


Cheers, Peter
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Upload problems
« Reply #1 on: November 03, 2010, 06:59:13 pm »

1. a) This mostly happens if the ajax response is distorted. Maybe your hoster injects some content to the responses or some blank lines crept into the Coppermine files. Try to replace all files and double check your modifications and plugins if there are some.
1. b) I never saw that error, but maybe it's a similar issue as 1. a)
2. JUpload resizes your pictures if it's appropriately configured. JUpload is also available for cpg1.5.x, maybe it's a solution for you.
Logged

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Upload problems
« Reply #2 on: November 04, 2010, 02:44:59 pm »

ok, after upgrading to rev 7995 (and thereby replacing all files...) those errors are partly gone:

1a and b) files smaller than cpg's "Max width or height for uploaded pictures" (which at the same time represents about my servers mem limit) get uploaded withouth difficulties -- looks really smooth the way this new dialogue works! No difference between users an admin detectable

2) However, pictures larger than cpg's "Max width or height for uploaded pictures" behave strangely

a) Admin: gets the error "Fatal error:  Allowed memory size of 41943040 bytes exhausted (tried to allocate 2333 bytes) in .../include/picmgmt.inc.php on line 439"

This error obviously comes from my server, who tried to generate normals and thumbs, and couldn't do so due to mem limitations.

The file gets uploaded anyhow, only the normal/thumbs are not generated.

b) Users: get an undescript errror, looks like my Error No. 2 from the initial post. Files are uploaded as well. So probably the same thing is going on, only the error message is different.


Normally I would expect cpg to suppress uploading of these files in the first instance, as they are larger than the specified maxsize? Wouldn't it be possible for cpg to inspect the the pictures file header, in order to detect its pixel size and potentially refuse pictures larger than specified by the "Max width or height for uploaded pictures" setting BEFORE uploading?

Furthermore, this leaves me now with pictures uploaded to my server that never made it into the database. Is there any way I can identify those pictures in order to delete them?


@JUpload: Thanks a lot for the hint -- I wasn't aware that it has been ported to 1.5. I always used this page http://coppermine-gallery.net/plugins.php?cpg_version=both&sort=category&submit=#start to control for 1.5.x compatibility, where it is still (as well as addfav) falsely marked as only available for 1.4.x .

I like the touch and feel of the new upload dialogue a lot. For future development it would be great if this dialogue was able to downscale pictres that are to large for the servers mem-limits (i.e. offer the functionality JUpload is offering).


Thanks so much for your repeated help, André!!!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Upload problems
« Reply #3 on: November 05, 2010, 04:40:32 pm »

Normally I would expect cpg to suppress uploading of these files in the first instance, as they are larger than the specified maxsize? Wouldn't it be possible for cpg to inspect the the pictures file header, in order to detect its pixel size and potentially refuse pictures larger than specified by the "Max width or height for uploaded pictures" setting BEFORE uploading?
Disable 'Auto resize images that are larger than max width or height'.


Furthermore, this leaves me now with pictures uploaded to my server that never made it into the database. Is there any way I can identify those pictures in order to delete them?
Coppermine has no built-in mechanism to do that. You'll have to create a script that reads all files from your albums directory and compare it with the entries in the database.


I always used this page http://coppermine-gallery.net/plugins.php?cpg_version=both&sort=category&submit=#start to control for 1.5.x compatibility, where it is still (as well as addfav) falsely marked as only available for 1.4.x .
That page has to be updated manually. When searching for plugins I suggest to browse the cpg1.5 plugin contributions board.


I like the touch and feel of the new upload dialogue a lot. For future development it would be great if this dialogue was able to downscale pictres that are to large for the servers mem-limits (i.e. offer the functionality JUpload is offering).
I don't know if flash is capable to do that, as I'm not familiar with flash.
Logged

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Upload problems
« Reply #4 on: November 08, 2010, 12:17:52 pm »

Again: thanks!!
Logged

melodydaily

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Upload problems
« Reply #5 on: May 09, 2011, 10:18:19 am »

I have the 2nd problem with the mem limit and i don't understand whatcha say...
I have to upload something to solve the problem or doing something else ??
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Upload problems
« Reply #6 on: May 09, 2011, 10:20:14 am »

@melodydaily: please stop to hijack each thread that deals with the same problem. I already replied to 2 threads. Please read the docs before starting new or hijacking topics! Locking.
Logged
Pages: [1]   Go Up
 

Page created in 0.031 seconds with 20 queries.