How do you load a .user.ini PHP configuration file when using the built in web server?
My setup is like this:
site
│ include.php
│
├───bin
│ router.php
│ server.bat
│
└───public
.user.ini
index.php
The document root is public, and bin\router.php routes to public\index.php if the file does not exist.
I did a phpinfo(), to verify that the .user.ini was not being loaded. The setting I am trying to change is error_log.
Petah, I’ve just twigged what the issue is from your comment. The built-in webserver was only introduced in 5.4
It acts as a webserver listening on the specified socket. The .user.ini states that:
In other words you can’t use .user.ini files with the built-in webserver or with Apache/mod_php, etc. You have to use a custom php.ini. The safest way to do this is to clone the default php.ini (or php_value/flag directives with Apache/mod_php) and then add the lines you want for development. Of course you could always just add an ini_set command in you script(s) startup as well.