Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php.ini to affect all sub-folders

Tags:

php

I need to add a php.ini in a specific folder in my server to set allow_url_fopen = true for a website. The website has its root folder an plenty of sub-folders that also have many sub-folders.

If I place the php.ini in the root of the website, it seems to only affect that folder (I've run phpconfig() there and in the subfolders.

Is it possible to make it somehow that affects all the subfolders without having to palce uno php.ini per sub-folder?

like image 444
Albert Avatar asked Jul 22 '26 11:07

Albert


1 Answers

Regarding Mario's comment, I tried both php.ini and .user.ini. As he said php.ini is not recursive, but .user.ini is working recursively for me. I am also on 1and1 shared linux hosting with PHP5 as well. I just put the .user.ini in my root directory.

like image 74
Justin Thomas Avatar answered Jul 24 '26 02:07

Justin Thomas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!