Do I Need to Restart Apache After Changing the PHP.Ini File

Do I need to restart Apache after changing the php.ini file?

Depends, actually. Depends on how you use php inside that webserver:

  • using php as module inside the http server: you have to restart the http server process
  • using php as cgi backend: you do not have to restart the http server process or anything else
  • using php fastcgi: you have to restart the fastcgi daemon, not the http server
  • using php-fpm: you have to restart the fpm server process, not the http server process

Do i need to restart Apache after changing the settings.php file of a Drupal website?

Simple answer is NO, as it is .php it is not cached by Apache it is not php.ini or something like that, Apache is caching only its own configs and settings.php is Drupal settings

php.ini not updating after changes

Chances are you are modifying the php.ini of the CLI instead of the one for apache. It should be under:

/etc/php/$VERSION/apache2/php.ini

Then restart apache.



Related Topics



Leave a reply



Submit