[Solved]: Problem uploading only some PNGs [Solved]: Problem uploading only some PNGs
 

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

[Solved]: Problem uploading only some PNGs

Started by Mr. Rogers, May 27, 2008, 06:00:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mr. Rogers

I was given about 20 PNG files to add to our gallery and out of the 20, three refuse to upload whether I try in batch mode or via the upload link. When I try in batch mode, the result shows as "click for details or to reload" and if I click the link, my browser prompts me to download the file addpic.php. If I try to upload any of these three images via the standard upload link, it says the upload was successful yet when I click the continue button, my browser prompts me to download upload.php. The other 17 PNG files work just fine. These three problem files aren't any larger in filesize or dimensions than any of the files that work fine. Any idea what the issue is?

Riox

CPG Version and link to one of the trouble PNGs please ^^

Mr. Rogers

Sorry, it's an internal only site.

Here's some more weirdness. My PHP upload settings are 45M and my coppermine file upload settings are the same. In my coppermine config, my "max width or height for uploaded pictures" is set to 4096. All of the PNGs are smaller than 2M and none of the files have a width or height greater than 2500px. I took one of the problematic PNGs and shrank it down just a bit and it uploaded fine. What I don't understand is why the problem occurs the way the original file is. This one example is a 51K PNG, 2485 pixels wide x 1539 pixels tall.

Riox

oh my...

QuoteMy PHP upload settings are 45M
We are talking /etc/php.ini here not .htaccess ?

you need to fix post_max_size and memory_limit to

QuoteThis one example is a 51K PNG,

If its a .PNG and not a .png file I'd say you have a multilayer file ... possible with some Adobe Fireworks or Photoshop Extension. I don't think GD or ImageMagic can handle these files (not tested)

Mr. Rogers

oh my?? I don't understand, what's wrong with the upload settings? I have a 45 MB upload limit and the image was 51 KB.

As for the multilayer PNG issue I'll see if I can open it up and test. For some reason my version of Photoshop chokes on PNG files.

Mr. Rogers

Again today I received another PNG that gave me the same error. I opened it in Illustrator and exported it as a PNG with high resolution (300ppi) and it still choked coppermine. If I exported it as a PNG with medium resolution (150ppi) coppermine happily imports it. I'm stuck as to why the higher res PNG chokes coppermine when my settings allow for very large files with width and height dimensions larger than anything I'm giving it.

Mr. Rogers

Problem solved  :) Apparently PHP takes up far more resources when processing PNG files so I needed to bump my memory limit up pretty far for it to hanlde the large PNG files. After that, coppermine handles them without a problem.