Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php.ini reload in php-cli

Tags:

php

php-ini

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?

like image 715
Anton Avatar asked Apr 28 '11 10:04

Anton


People also ask

Do I need to restart PHP after changing PHP ini?

PHP-FPM you need to restart to avoid configuration inconsistency. Some workers will lay dormant and keep the old configuration, while new workers will get the new configuration.


1 Answers

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

like image 177
Ignacio Vazquez-Abrams Avatar answered Oct 09 '22 03:10

Ignacio Vazquez-Abrams