Php – What does “Restart PHP” mean in Zend Server

apache-2.2PHPzend-serverzend-server-ce

I've been using Apache with PHP for years, both as standalone installs (Windows and Linux) and as part of WAMP stacks on Windows.

Today I decided to try out Zend Server CE, and was surprised that it provides two things:

  • The original Apache Service Monitor, which allows me to restart Apache
  • The Zend Controller application, which has a "Restart PHP" button

I've never thought about "restarting PHP", as I'm used to see PHP as an Apache module. AFAIK, there is no way to "restart PHP", but you do apply your new PHP settings by restarting Apache.

Is "restarting PHP" just restarting Apache behind the scenes, or doing something else?

Best Answer

Here's my understanding of what happens:

  • The Zend Server GUI communicates with PHP running in Apache, via XML-RPC (localhost:80083)
  • The function zend_restart_php() is called (which is defined by the PHP module ZendUtils), and that causes the Apache module to re-read it's INI file and re-initialize.