php 7 php.ini upload_max_filesize not working
i fingured out !
in my loaded php.ini
config , my error_reporting
values is E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
-> this is wrong!, so i changed it to
error_reporting: E_ALL
and then restart apache2 server,
now everything working fine !
so please note : if
php.ini
have any error , it will use default value (which means upload_max_filesize
always 2M
) php.ini unable to change upload_max_filesize
Try to check if there is any syntax error in your php.ini, if there is any, it will not take the changes.
also make sure that your php.ini is writable
Max filesize not taking effect from php.ini
By default NGINX has a limit of 1MB on file uploads. To change this you will need to set the client_max_body_size variable. You can do this in the http block in your nginx.conf
http {
#...
client_max_body_size 100m;
client_body_timeout 120s; # Default is 60, May need to be increased for very large uploads
#...
}
If you are expecting upload very large files where upload times will exceed 60 seconds you will also need to add the client_body_timeout
variable with a large valueAfter updating you NGINX configuration don’t forget to restart NGINX.
you need to restart nginx and php to reload the configs. This can be done using the following commands;
sudo service nginx restart
sudo service php7.0-fpm restart
Note:if you don't have to host multipleWebsites just add it to the server block
server {
client_max_body_size 8M;
}
php.ini changes, but not effective on Ubuntu
I have solved my question.
There is a syntax error in php.ini in line 109, so the next all syntax does not execute.
Related Topics
PHP Readfile() and Large Files
How to Access Elements in an Array Returned from a Function
Exploding by Array of Delimiters
Create a Zip File Using PHP Class Ziparchive Without Writing the File to Disk
What Is the Js Equivalent to the PHP Function Number_Format
Looping Through a Simplexml Object, or Turning the Whole Thing into an Array
Compare Object Properties and Show Diff in PHP
How to Use Laravel Passport with a Custom Username Column
Send Zip File to Browser/Force Direct Download
PHP Utf-8 to Windows Command Line Encoding
Make Script Execution to Unlimited
PHP Gd: How to Get Imagedata as Binary String
How to Add Custom Fields to Woocommerce Registration Form
How to Put Double Quotes Inside a String Within an Ajax JSON Response from PHP