Asset size wont' change

Your software
My Mautic version is:2.16.0
My PHP version is:7.2.27

Your problem
My problem is:

I’ve gone through every php.ini file on my cpanel server and changed all upload_max_filesize = 10. The problem persists.

Issue with v2.16.0: attempting to change upload max size for assets fails. Changed in configuration to 10 then tried 10MB then tried 10M (since it’s unclear in the explanation which should be used) and all failed. Tried changing in config.php also fails. Even after clearing cache and rebuilding, still fails.

/opt/cpanel/ea-php72/root/etc/php.ini shows the php.ini file in use with a max. upload of 10MB
from configuration | loaded php file:
upload_max_filesize = 10

I do notice that the mautic “php file in use” show 2 different values: local at 2 MB and master at 10 MB - how to change the local? What is local? There is no specification in the php.ini local vs. master so I’m obviously changing the master which is of no use.
See attached screenshot from mautic’s “php file in use” printout: Why is local fixed at “2M” and Master at “10”? Even if this worked it should be consistent either 2 & 10 or 2M & 10M.

These errors are showing in the log: no errors in log files.

Steps I have tried to fix the problem:

@bulgin I have problem to. Sorry english. Since update 2.16 I can not chnage asset above 2 megabytes.

You find solution?

Hi there,

When you go to System Info in Mautic, please can you check which php.ini files are being used - should look like this:

This should tell you which files are being used.

Sometimes you might have a php.ini file in your Mautic directory, which might be overriding the global setting.

Also to answer your question on the difference between local/global values:

Master Value

This comes from your main php.ini file (the one being loaded above in the ‘Loaded configuration file’ section). This is the value which applies server-wide.

Local Value

The global setting can be overridden locally in multiple locations, such as httpd.conf , .htaccess or other Apache configuration.

This is often used to get around restrictive settings at the server level, and can sometimes mean that making changes at the top global level doesn’t trickle down to your specific folder or location. So if you have a discrepancy between the two, check for a local .htaccess or a *.ini file within your Mautic directory (or check with your hosting provider!)

Also, remember you might well need to restart apache in order for changes to take effect in your php.ini file! Caught me out many times forgetting to restart in the past!

Hope that helps some!

1 Like

Thank you for helping me.

I’ve checked all the .php and .htaccess files server-wide and none of them have any restrictions on upload size, or have been set to 10M. What I did find, and which may be of use is that the Mautic | System Info | Folders and File Permissions shows an odd entry. See attached screenshot.

It’s saying that /app/media/files is uwriteable when in fact, /app/media/files doesn’t even exist - there is no directory there names as such.

I originally checked all the files you provided in the screenshot several days ago and they are set to 10M.

Mautic is reporting a directory as unwriteable when in fact that directory doesn’t exist. Yet I do have:

/domain-name/media/files/
and
/domain-name/media/images/

and they have the correct permissions and files exist in those directories that are in use.

Thanks for the extra detail.

Can you post the value set in /opt/cpanel/ea-php72/root/etc/php.ini for the upload file size? If you change that, and restart Apache, do you see the change reflected in your Mautic system info?

See attached.

Restarted httpd (Centos) and upload local Max. is still hard-coded at 2M.

Can you tell me what are the octal permissions of these directories? 755 or 775? Thank you.

Late to the party. Just wanted to chime in – in case someone comes here looking for a solution – that you also need to change the post_max_size value, to either 0 (unlimited) or a value.