HI I want to change some of php.ini setting like post_max_size
and upload_max_filesize
I ran php.info() and found the correct php.ini file I changed it and reset the wamp then I ran php.info() again and I saw that the setting wasn't applied ,so how can I change php.ini setting in laravel?
P.S: I wanted to upload a large file in laravel and I ran in to this problem
There are 2 mistakes people make when amending the php.ini
file in WAMPServer
See this post for a correct method of editing the right file
php.ini
fileAt the top of the file are a lot of comments intended to help people understand what most of the parameters do. Do not edit these comments. Instead search again for the parameter you want to change it should appear again later in the file.
post_max_size = 8M
Is on line 660 (or there abouts depending on version)
upload_max_filesize = "16M"
Is on line 810 (or there abouts depending on version)
Final Note: Remember that the
post_max_size
must be > that theupload_max_filesize
because the uploaded files are part of the POST payload but you need to include space in thepost_max_size
for the other fields on a form as well as the file(s)
If the above is not the issue then :-
Do you have a php.ini in the wrong place. Check your boot drive for any other php.ini file. There shoud be no php.ini
files outside the \wamp\
folder. There is lots af bad advice out there and some suggest to put the php.ini file in the \windows
or \windows\system32
folders. If you find any other delete them.
There is also bad advice out there suggesting that you add the PHP folder to your system PATH. If you have anything to do with WAMPServer on your PATH remove it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With