• 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.

PHP version for applications above web root

DylanJ

New Pleskian
I am running an application for which I was told for security purposes to install the application files in a folder above the web root (httpdocs) so they are in Home directory > application folder.

I assumed that the application would be running the same PHP version as the vhost which I have set to be 5.6.15 fpm served by nginx (as is the entire subscription). PHPinfo in the httpdocs folder confirms that it is running 5.6.15 as expected. However, the application reports that it is running on 5.4.45 on Apache.

Also, if I go to the subscription and "customise" then "PHP settings" it also tells me that my current PHP version is 5.4.45.

How can I change the default version to the one I want or will it always default to the OS vendor PHP version?
 
I now realise that this is a problem inside of the web root too. If I enable 5.6.15 PHP-FPM served by nginx the application reports that the PHP version is running on Apache version 5.4.45 but if I enable 5.6.15 as Fast CGI application served by Apache the application reports that PHP version 5.6.15 is being used.

Obviously for some reason PHP-FPM isn't working properly, can someone shed some light on why this is the case, please?

(btw I'm using version 12.5)
 
On further investigation, I'm beginning to suspect that Yii framework is the problem, has anyone managed to configure nginx vhosts to work with it?
 
Hi DylanJ,

any solution for that? I face a similar issue after installing nginx/php-fpm: Just executing a php info e.g. from the default test folder (under the web root) works fine with version 5.6.x - however if I create a new folder next to it and reexecute the same php info it returns me php 5.3.3 (default by Apache) . The PHP settings are clearly set to the nginx/fpm combination. Why do both PHP handlers interfere here?
 
Hi DylanJ,

any solution for that? I face a similar issue after installing nginx/php-fpm: Just executing a php info e.g. from the default test folder (under the web root) works fine with version 5.6.x - however if I create a new folder next to it and reexecute the same php info it returns me php 5.3.3 (default by Apache) . The PHP settings are clearly set to the nginx/fpm combination. Why do both PHP handlers interfere here?

I found my problem to be caused by nginx directives not being configured correctly. Then, what was happening was that .htaccess files were picking up the requests that nginx missed and obviously Apache was processing them and defaulting to the OS vendor version of PHP. Because the application appeared to be working ok I thought all was set up correctly but it was clearly not the case!
 
Back
Top