Unexpected error occurred while uploading file

Ladegro

Active member
Just upgraded to ZFMG 1.0.6 but still I'm getting the following error while trying to upload image file into a category:

upload_2015-7-5_9-56-14.webp

I also happens if I try just one file (I need to upload a total of 1,2GB at the end). I'm not seeing any error-logs in the admin panel and do now know where to look further for more info, but as we need this album to be live for an event, this timing is - as most times with errors :) - terrific...

Does anyone have a clue?

B.t.w. it's not because of limitations:upload_2015-7-5_9-59-40.webp

I have unlimited server storage.

Edit:

After resizing images to less than 1MB each, I can succesfully upload them indeed.
But now I'm getting the following error when I try to hit the Save button:
upload_2015-7-5_11-32-9.webp

I'd kindly chmod the right directory to fix this but I'm not sure where to look?
 

Attachments

  • upload_2015-7-5_9-59-37.webp
    upload_2015-7-5_9-59-37.webp
    6.6 KB · Views: 4
Last edited:
I believe it is failing this check:

PHP:
if ($file->isImage()
   && XenForo_Image_Abstract::canResize($file->getImageInfoField('width'), $file->getImageInfoField('height'))
)

Assuming that it is a valid image file being uploaded, it must be failing on the 'canResize' check.

XenForo has a config setting named maxImageResizePixelCount. It defaults to 20,000,000.

First, check if you have changed that in your config.php file. If you haven't then it suggests that the images you're uploading are pretty huge - over 20 megapixels.

As long as your server has sufficient resources and limits to be able to handle large images, the simple thing to do would be to add something like this to config.php:

PHP:
$config['maxImageResizePixelCount'] = 30000000;

That would allow you to support uploading and resizing images over 30 megapixels.
 
Where can I find the config.php file?
After I resized the images to normal sizes, the initial upload goes ok, but then it hangs on the second error (see the edit). The smaller version I'm uploading are definately smaller than 20mpix...
 
After resizing images to less than 1MB each, I can succesfully upload them indeed.
But now I'm getting the following error when I try to hit the Save button:
upload_2015-7-5_11-32-9-png.110421


I'd kindly chmod the right directory to fix this but I'm not sure where to look?
That isn't a directory permissions error, I don't think.

The only directories you need to ensure are fully writable along with their sub directories and files are data and internal_data (same as XenForo). Make sure these are writable in the first instance.
 
Indeed, the apache error log shows the following:
Sun Jul 05 11:17:57 2015] [error] [client 83.128.125.171] ModSecurity: Access denied with code 403 (phase 2). Match of "rx ((?:/(?:imaclean|massdelete)/)|^/cgi-bin/dada/mail\\\\.cgi$|^/index\\\\.php/mageworx/customoptions_options|^/za/)" against "REQUEST_FILENAME" required. [file "/etc/httpd/conf/extra/modsecurity.d/10_asl_rules.conf"] [line "114"] [id "390707"] [rev "6"] [msg "Atomicorp.com WAF Rules: Too many arguments in request (max set to 1000, increase as necessary for your system)"] [severity "WARNING"] [hostname "kroew.nl"] [uri "/media/save-media"] [unique_id "VZj2RcPTSSsAAMVNKrgAAAAW"]

Do you have a suggestion what to do about this?
 
Top Bottom