php.ini reload in php-cli

PhpPhp Ini

Php Problem Overview


I have php script that must be runned from console (php-cli). But configuration of php.ini for php-cli was incorrect. I fix it, but when I run script a had error with php config, because php.ini uses an old.

How I can reload php.ini for console without restart server?

Php Solutions


Solution 1 - Php

The configuration is loaded fresh each time you invoke PHP from the CLI.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAntonView Question on Stackoverflow
Solution 1 - PhpIgnacio Vazquez-AbramsView Answer on Stackoverflow