Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
605 views
in Technique[技术] by (71.8m points)

php 7 - php 7 php.ini upload_max_filesize not working

I have read many solutions on internet , but still cannot change upload_max_filesize value (upload_max_filesize always = 2M )

here is my loaded php.ini in phpinfo() :

Configuration File (php.ini) Path         /etc/php/7.0/apache2
Loaded Configuration File                    /etc/php/7.0/apache2/php.ini
Scan this dir for additional .ini files      /etc/php/7.0/apache2/conf.d 
upload_max_filesize 2M  2M
post_max_size   8M  8M

here is my edited php.ini in /etc/php/7.0/apache2/php.ini

; http://php.net/post-max-size
post_max_size = 86M
; http://php.net/upload-max-filesize
upload_max_filesize = 40M

im using ubuntu 14.04,apache2,php7.0 (I have reset apache2 many time after each change in php.ini )

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I had a fix for PHP-FPM 7.1

Edit your php.ini in

/etc/php/7.1/fpm/php.ini

Make changes to whatever option you want like, post_max_size, upload_max_filesize, max_execution_time & so...

save & close file.

run

sudo service php7.1-fpm restart

It will work!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...