marcel158's avatar

Edit Laravel's out-of-the-box php.ini

Hey guys!

I'm using laravel on localhost:8000 and play around with it for a while. Now I came to the point that I need to change some settings on php. Specifically: I need to increase upload_max_filesite and post_max_size. But my laravel installation isn't using the php.ini located in /etc/ on my mac like my other non-laravel projects do. So where can I find the php.ini my laravel installation is using? I even did some ini_set on the top of /public/index.php and it did not affect.

0 likes
5 replies
martinbean's avatar
Level 80

@marcel158 Put a <?php phpinfo(); ?> call at the top of your public/index.php file. It’ll show you what php.ini is loaded.

2 likes
d3xt3r's avatar

@marcel158 Laravel does not ship with php.ini. It will default to whatever is defined for the php you are using to run the application.

1 like
yassine_mokni's avatar

I came across to the same question and I find out that you can check your php.ini easily using php --ini commande

manelgavalda's avatar

@YASSINE_MOKNI - Hey, just wanted to point out that your php cli version (command line) and your php server version, are not always the same, so if you use php --ini it is showing your cli configuration, but if you use phpinfo() in your site, it will show your php server configuration.

Please or to participate in this conversation.