• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question How to change PHP version for selected extension

lunex

New Pleskian
Hello,
is there a way to change default PHP version for selected extension? After updating Plesk from Onyx to Obsidian, my extension is running on PHP 7.4 instead of 7.2 as before, thus not working... I guess I need to set PHP version in nginx config for selected directory where the extension resides, but I do not know how to do it exactly. I appreciate any help :)
 
What about Websites & Domains > PHP Settings > PHP support (PHP version ?
 
Thank you for your answer. Its not gonna work because i'm talking about plesk extension installed in:
Code:
/usr/local/psa/admin/htdocs/modules
 
Extensions run on the same PHP version as Plesk it self runs on. I don't believe it possible to change Plesk uses.
 
Thank you for your answer. Its not gonna work because i'm talking about plesk extension installed in:
Plesk extensions works under Plesk PHP version:

# /usr/local/psa/admin/bin/php -v
PHP 7.4.21 (cli) (built: Jul 7 2021 12:28:53) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.21, Copyright (c), by Zend Technologies

It was updated in 18.0.37 version: Change Log for Plesk Obsidian

Updated sw-engine PHP to version 7.4.21.
So, you can't upgrade/downgrade this PHP without dramatic consequences for the whole Plesk.
 
I know, but I need some (even temporary) way to set php handler back to 7.3 only for this one directory where my extension is. It shouldn't break anything else in plesk i think
 
only for this one directory where my extension is.
It doesn't work that way. Extensions are called by plesk, and interact with plesk, so they necessarily run in the same context as plesk.
You could use a specific php version if you call the extension directly from the shell, but then it's not really an extension and any callbacks to plesk will probably fail.
 
Back
Top