Support Forum

Every time that you post a problem, PLEASE add the Joomla and the extension's versions and revisions (for example: Joomla 3.3.6, Contact Enhanced 3.3.5), PHP version and Server's Operating System. If you only manage only one site it is easier if you edit your profile and just add that information to your signature. Don't forget to add a detailed description of the problem. If possible, write down all steps to simulate the problem.

Before submitting a new post, PLEASE make sure you are running the latest version, test in different browsers (IE, FF, Chrome,..) and clear Joomla and browser's cache after every change you make.

Also, most questions are already answered in our FAQ and in iFAQ and Contact Enhanced documentation pages.

× Contact Enhanced is a contact component manager created to replace Joomla! core contacts component and add lots of advantages and new features (see Features ) and it offers many plugins and modules for several different purposes,
Product page | Documentation Page

Upload field in a form will not accept attachment

1 year 3 months ago #26741 by jestick
CE Version 4.3.7
Joomla Version 4.2.3

The problem: When I try to attach a file to a contact form message the form displays the error:
Error: The uploaded file exceeds the upload_max_filesize directive in php.ini

I have checked that Joomla sees the correct value which is 64M see attached screenshot.
The form limit is set to 8M see screenshot
The form attempts the upload and generates the error message See attached screenshot.



Attachments:

Please Log in or Create an account to join the conversation.

1 year 3 months ago #26742 by jestick
I have further insight into this problem. The text on the page says the field limit is 8MB But when I inspect the source code in firefox the input tag shows 2MB. I don't know where this number comes from.

See below. The Max upload is set to 64MB in PHP, 8MB in the Contact enhanced field, but displays as 2MB in the <input> this is not set anywhere.

<span class="visually-hidden"><input type="file" name="upload_files[]" id="upload_files" accept="image/jpeg,image/pjpeg,image/jpeg,image/pjpeg,image/gif,image/png,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/mspowerpoint,application/powerpoint,application/vnd.ms-powerpoint,application/x-mspowerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/pdf,application/x-compressed,application/x-zip-compressed,application/zip,multipart/x-zip" class="form-control ajaxfileupload" multiple="" data-max="3" data-files-max="3" data-file-validator="#upload_files_validator" data-file-alias="#upload_files" data-autoupload="true" data-url="/contact-us.html?task=formfield.ajax&id=5&random=1462050382" data-max-chunk-size="7000000" data-files-container="#ce-ff-container-upload_files .ff_fileupload_uploads" data-files-left-container="#upload_files_files_left" data-accept-file-types="/(\.|\/)(jpg|jpeg|gif|png|doc|docx|ppt|pptx|xls|xlsx|pdf|zip)$/i" data-max-file-size="8388608" data-max-number-of-files="3" data-limit-multi-file-uploads="3">
<input type="hidden" name="MAX_FILE_SIZE" value="2.00 MB">
<div>
Maximum upload size: <strong>2.00 MB</strong> </div>
</span>

Please Log in or Create an account to join the conversation.

1 year 3 months ago #26743 by jestick
No help with this problem for two days. The upload size is fixed at 2MB no matter what value I set. The display text changes but the input field stats the same when I inspect the source.. This feature is needed so the client can upload quality photographs.

Please Log in or Create an account to join the conversation.

1 year 3 months ago #26744 by support
Dear jestick,

Thank you for the information provided. We don't usually work during the weekend. We're currently investigating this problem and I'll get back to you as soon as possible.

Best regards,

Please Log in or Create an account to join the conversation.

1 year 3 months ago #26745 by jestick
OK I understand it is Monday here but of course you are in Brazil. I will wait for your response.

Please Log in or Create an account to join the conversation.

1 year 3 months ago #26746 by support
Dear jestick,

Thank you for understanding.

I couldn't reproduce this error locally. However, I have just checked and Contact Enhanced used the Joomla framework to get the Maximum Upload size for your server. It gets the information from the following directives:
ini_get('post_max_size')
ini_get('upload_max_filesize')

Also, when uploading the server is returning with the error UPLOAD_ERR_INI_SIZE, which is triggered before MAX_FILE_SIZE.
www.php.net/manual/en/features.file-upload.errors.php

Do you have any user .ini file that might be overriding the global setting?

It seems the PHP core function ini_get('upload_max_filesize') or ini_get('post_max_size') is returning 2 MB. If you'd like I can further investigate this for you. You can send FTP credentials to me using the Support > Contact form or just reply to this forum notification EMAIL. For safety reasons, do not post any sensitive information on the forum.

Best regards

Please Log in or Create an account to join the conversation.

1 year 3 months ago #26747 by jestick
No once you verified it is not a problem with the component I will take it from here. I must have missed something when checking the chain of configuration. I should be able to fix it. Thank you for your help.

Please Log in or Create an account to join the conversation.

1 year 3 months ago #26748 by support
I'm not sure I understood what you meant. I did investigate if it was an issue with the component, but I couldn't reproduce the same problem locally.

The only problem I found was that the Maximum upload size label is getting the data only from Multiple Files Form Field parameters and not from the ini_get('upload_max_filesize') or ini_get('post_max_size'). I've already fixed it and it will be available in the next release. I'll send the fix to your email as well in a few minutes.

Let me know if you need any further assistance.

Please Log in or Create an account to join the conversation.

1 year 3 months ago #26749 by jestick
This worked OK the file size displayed matches the file size used in the code. The problem with setting the file size was solved by creating a directive in a local php.ini. Everything works now, thank you for your help.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum

Copyright © 2018 IdealExtensions.com. All Rights Reserved.

This site is not affiliated with or endorsed by the Joomla!™ Project. It is not supported or warranted by the Joomla!™ Project or Open Source Matters™. The Joomla!™ logo is used under a limited license granted by Open Source Matters™, the trademark holder in the United States and other countries.
We may collect your IP address and your browser's User Agent string while using our site for security reasons and deriving aggregate information (analytics). This information is retained for a minimum of 1 and a maximum of 24 months.
Feedback