Page 1 of 1

Can Not Upload Extension - Error: uploaded file exceeds the upload_max_filesize directive in php.ini

Posted: Tue Apr 16, 2019 3:23 am
by tom327
I am using OpenCart 3.0.3.1. Having issue when I try to install an extension.

In Admin, I am using Extensions > Installer. Using Upload button.
When I try to upload an Extension I have it fails and I get this error:

Warning: The uploaded file exceeds the upload_max_filesize directive in php.ini!

Now, I went ahead and edited both the PHP.ini for my local server, and also a PHP.ini that is in my opencart main directory.
I made the following changes to my php.ini files, based on suggestions from forum:

upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 512M
max_execution_time = 180

But, this did not help. I am still getting the same Error.

Can anyone suggest some other solution.

Re: Can Not Upload Extension - Error: uploaded file exceeds the upload_max_filesize directive in php.ini

Posted: Tue Apr 16, 2019 3:36 am
by D3MO
Easiest way is simply extract that ocmod.zip file and upload all files manually from upload folder trough ftp to the root of your opencart installatioon keeping the structure of the module files), later install.xml (zipit) and name it anything.ocmod.zip and use extension installer to upload it.

later refresh cashed files in extension modifications, and in admin dashboard small cog icon top right corner

Re: Can Not Upload Extension - Error: uploaded file exceeds the upload_max_filesize directive in php.ini

Posted: Tue Apr 16, 2019 4:12 am
by thekrotek
Your actual value of this variable may be different. You can check it by using phpinfo() function.

Re: Can Not Upload Extension - Error: uploaded file exceeds the upload_max_filesize directive in php.ini

Posted: Wed Apr 17, 2019 12:36 am
by tom327
Thanks for the tip to check settings using phpinfo().
I did that and the settings match the ones I listed above.
I guess I will try the manual install method.

Re: Can Not Upload Extension - Error: uploaded file exceeds the upload_max_filesize directive in php.ini

Posted: Wed Apr 17, 2019 2:02 am
by tom327
I am getting sense that with Opencart 3.x, and perhaps the extensions I am using do not work well in a local computer server environment or being on a local server is causing complications, and I will have less problems if I install opencart to my live online server at my host and develop the website on my online host.

Re: Can Not Upload Extension - Error: uploaded file exceeds the upload_max_filesize directive in php.ini

Posted: Wed Apr 17, 2019 5:22 pm
by D3MO
If configured properly local dev server do not have issues:)

Re: Can Not Upload Extension - Error: uploaded file exceeds the upload_max_filesize directive in php.ini

Posted: Sat Apr 11, 2020 10:20 pm
by Aleks1201
I get this same error. When I try to upload my extension, there it says upload_max_filesize: 2M
post_max_size: 8M
php.ini: /opt/cpanel/ea-php73/root/etc/php.ini

but when I go into php.ini in cPanel ---> upload_max_filesize = 999M

Please help ???

Re: Can Not Upload Extension - Error: uploaded file exceeds the upload_max_filesize directive in php.ini

Posted: Sun Apr 12, 2020 3:13 am
by ADD Creative
If using cPanel you usually have to edit PHP settings in the MultiPHP INI Editor and apply to make that sort of change.

Re: Can Not Upload Extension - Error: uploaded file exceeds the upload_max_filesize directive in php.ini

Posted: Sun Apr 12, 2020 2:56 pm
by Aleks1201
Thank you, it works now

Re: Can Not Upload Extension - Error: uploaded file exceeds the upload_max_filesize directive in php.ini

Posted: Sun Apr 11, 2021 6:48 pm
by farah27
Hi i encounter the same problem too. I tried to install Facebook Pixel but get the message "Warning: The uploaded file exceeds the upload_max_filesize directive in php.ini!"

Can someone help me to solve this ?

Re: Can Not Upload Extension - Error: uploaded file exceeds the upload_max_filesize directive in php.ini

Posted: Sun Apr 11, 2021 11:10 pm
by ADD Creative
farah27 wrote:
Sun Apr 11, 2021 6:48 pm
Hi i encounter the same problem too. I tried to install Facebook Pixel but get the message "Warning: The uploaded file exceeds the upload_max_filesize directive in php.ini!"

Can someone help me to solve this ?
Use phpinfo() to see what upload_max_filesize is set to. If it's too small you will need to set in php.ini, user.ini, htaccess or your hosting control panel. If you don't know where ask your host.