lance smith
lance smith

Reputation: 73

Restart Specific Version of PHP/Apache?

I just installed PHP version 5.5 on my server (Centos 6 / Plesk 12) and changed the php version for one of my sites. I can see via a php info file that the site IS using the new PHP version, but I don't know how to start that VERSION of php. I made some changes to PHP5 ini file but when I restart apache, it restarts the old version (php 5.4) and not php5.5 ..sorry I am not the best at shell commands but does anyone know how to restart the NEW php version if i have multiple versions installed on the server? Thanks!

additional info- the changes that i made to the php5.5 ini file is loading the zend_extension opcache.so ..which is why i installed php 5.5 in the first place!

BONUS QUESTION: will zend opcache be effective running php 5.5 as fastcgi? I've heard that object cache modules are not compatible with fastcgi because it lets users run the application as their own user so the cache can not create x number of caches for each user..if that makes sense..lol

Thanks

Upvotes: 0

Views: 1324

Answers (1)

SaRiD
SaRiD

Reputation: 1050

Not sure if anyone is still following this but I also got stuck with this too. The solution I found to work was this:

Depending on what PHP versions you have setup with Plesk you need to run the following command:

service plesk-php{version}-fpm restart

For example:

service plesk-php54.fpm restart

or

service plesk-php56.fpm restart

In centos 7 the "service" command actually just calls another function so you end up calling:

/bin/systemctl restart plesk-php54-fpm.service

You can call that directly if you want but it is a few extra characters to type in.

With the above in mind you are now free to edit your php.ini files for each specific version you have enabled via Plesk. For those who don't know the ini files are usually located here:

/opt/plesk/php/{version}/etc/php.ini 

Where {version} is 5.4, 5.5, 5.6, etc...

Hope this helps someone else.

In regards to your bonus question - sorry I'm not sure as I've not worked with that specifically.

Upvotes: 1

Related Questions