server-command
server-command copied to clipboard
ini files not working with router.php
Bug Report
It seems loading a config file with auto_prepend_file does not work with the router.php file.
If I use the internal PHP server without this, it works.
https://github.com/wp-cli/server-command/blob/master/src/Server_Command.php#L90
This works without any problems:
php -c .../.user.ini -S localhost:8080 -t .
Describe the current, buggy behavior
php wp-cli.phar server --config=.user.ini
Describe how other contributors can replicate this bug
- create a
.user.inifile with aauto_prepend_filesetting - run
php wp-cli.phar server --config=.user.ini - open the browser
- check if the file is actually executed (add an
echoto it)
Describe what you would expect as the correct outcome
The ini file should be loaded and the auto_prepend_file setting should work.
Let us know what environment you are running this on
(Paste the output of "wp cli info" into this box)
Provide a possible solution
If you happen to have a suggestion on how to fix this bug, please tell us in here.
Just leave this section out if you don't know how to fix it.
Provide additional context/Screenshots
Add any other context about the problem here.
If applicable, add screenshots to help explain (you can just drag&drop images into the Github issue).