I wanna change the upload_max_filesize
value without changing the php.ini
file.
In the process of searching, I got to know that by using .user.ini
file also, we can change the upload_max_filesize
. I have made the .user.ini
as follows
upload_max_filesize = 50M
and placed the file in xampp folder But not working as expected, where did I do wrong? where should I place the file to effect? Please suggest me right way to achieve.Thanks in advance.

- 345
- 1
- 6
- 20
1 Answers
Php manual page states that .user.ini
are like .htaccess
files and work on a per-directory basis. The same doc's also state that you can achieve the same results by using .htaccess
files in case you are running php as Apache module. This answer, This article and This part of doc's also shed some light on what can be set inside .user.ini
files.
Now considering that you are using xammp and judging by the doc's:
Looks like instead of using .user.ini
you are better off using .htaccess
. Also as far as I got it php.ini
must have user_ini.filename
set and uncommented and also .user.ini
must be located in the same folder as .htaccess
for a site/script/setup. For xammp .htaccess
place greatly depends on setups. For exaple site sourse code can be placed in a separate folder inside htdocs folder (Virtual hosts). But it's only one way of setups.
This is not really an answer, but all this research did not fit in the comments.

- 140
- 11