• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Apache defaults to using PHP 5.4 to process requests

OlgaKM

Basic Pleskian
I have been trying to use nginx + PHP-FPM as much as possible on my server because of its efficiency, but have run into an issue. When Apache URL re-writing is used, Apache takes over the handling of the PHP script. I understand this (and setting up nginx URL re-writing is a whole another issue). The problem is, if a virtual host is set up to use nginx + PHP-FPM but a request ends up going to Apache, Apache uses PHP 5.4 to handle the request, even though PHP 7 is installed on the server! If I switch handling to Apache + FastCGI PHP, it uses PHP 7. But if I switch back to nginx + PHP-FPM, Apache starts using PHP 5.4 again. PHP 5.4 is of course far less efficient than PHP 7

I am considering simply setting up a symlink from /usr/bin/php-cgi to /opt/plesk/php/7.0/bin/php-cgi. Would this work to resolve the issue?
 
Hi OlgaKM,

you may do whatever you would like to on your server... it's YOUR choice. But pls. keep in mind, that you might have just forgotten to enable the corresponding PHP - module. Pls. check you settings at for example: => HOME > Tools & Settings > Apache Web Server
 
Well yes, I understand I'm free to do whatever I like. I'm asking for the method that would involve the least "hacking" of stock Plesk :)

I looked under Home > Tools & Settings > Apache Web Server, but I'm not sure what I'm looking for. It lists the enabled and disabled Apache modules. I'm not sure how this is relevant to my question.
 
Hi OlgaKM,

I'm not sure how this is relevant to my question.
Well, I could give you the screenshot example of a server, where PHP 5.6, 7.0 and 7.1 is installed ( as vendor versions ):

Plesk-Onyx_Apache_Web_Server_PHP-modules_01.png

As you can see, we have the option to choose between three modules installed on this server.

YOU stated:
even though PHP 7 is installed on the server!
... then you should not only have a standart "php" ( => PHP 5.4 ) option, but as well an option for your installed "PHP 7" - apache module. ;)



The additional PHP handlers from Plesk for example ( version 5.2 - 7.1 ), have no apache - module and therefore there is no option to change the php - module for your apache webserver on your server.
 
I see. On my server that page lists only "php5" and "php5-zts". I installed PHP 7.0 using Plesk's "Add or Remove Components".
 
Back
Top