Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get php.ini's updated value

Tags:

php

I have changed php.ini's some value in php.ini file and also through php script like,

ini_set('upload_max_filesize', '10M');
ini_set('POST_MAX_SIZE', '10MB');

but when I am running phpinfo() it doesn't shows the updated value.

It shows

upload_max_filesize = 2M

I am wondering how it is possible??

like image 672
Nirali Joshi Avatar asked Sep 27 '26 23:09

Nirali Joshi


1 Answers

Do you have access to your Apache configuration ?

Maybe theses parameters are overridden in the virtual host of the Apache configuration via php_admin_value. If this is the case, then you won't be able to change this value in the php script itself.

Also, check the following post : Changing upload_max_filesize on PHP

Good luck with that.

like image 198
Thibault Avatar answered Sep 29 '26 13:09

Thibault