• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Issue Issue with PHP Selector per domain settings in Plesk

Tyson_Moore

Basic Pleskian
Server operating system version
CloudLinux 8.10
Plesk version and microupdate number
Plesk Obsidian 18.0.82 Update #2
I've been trying to set per domain settings for PHP in PHP Selector. I'm sure it used to work, but isn't now.

We have a new domain and website going up on a customers account. The domain and site on there is running on 7.3. The new domain requires at least 8.3. I've set the per domain setting for the new domain but it is still showing 7.3.


CloudLinux Manager (7.11.53-1)
LiteSpeed Web Server Enterprise 6.3.7

Any ideas would be greatly appreciated.
 
Last edited by a moderator:
Hi @Tyson_Moore ,

a few things worth checking, since the Selector settings can get overridden in several places:

1. Per-domain vs. per-user: CloudLinux PHP Selector works per system user, not per domain. If both domains are in the same subscription, they share one system user and therefore one PHP version. In that case the new domain needs its own subscription (own system user), then you can set 8.3 there without touching the 7.3 site.

2. Check for a leftover handler in the .htaccess of the new domain's document root. Old AddHandler/AddType lines or an auto-generated PHP block can force 7.3 no matter what the Selector says:
Code:
grep -riE "AddHandler|AddType|lsphp|suphp|php_value" /var/www/vhosts/DOMAIN/httpdocs/.htaccess

3. Check what the Selector actually has set for the user:
Code:
selectorctl --user-current --user=SYSTEMUSER

4. Make sure the PHP handler in Plesk (Domains > yourdomain > PHP Settings) is set to the CloudLinux/LSPHP one and not a different handler, as that would override the Selector.

5. Refresh CageFS and restart LiteSpeed so the change is picked up:
Code:
cagefsctl --force-update
Code:
/usr/local/lsws/bin/lswsctrl restart

To verify, drop a phpinfo.php into the docroot of the new domain and look at the PHP version and Server API. Delete the file afterwards.

If it still shows 7.3, please post the output of the selectorctl command and the grep, then it should be easy to narrow down.

Regards
Tessa
 
Hi @Tyson_Moore

thanks for the update. That matches what I can find in the docs, with one correction to how it is usually described: the CloudLinux PHP Selector works per system user, which in Plesk is the subscription, and not per domain. Plesk's own PHP version setting for a domain is a separate feature.

Plesk's KB says the version from the Selector overrides the version set in Plesk's PHP Settings. To let Plesk's setting win, you can either set the Selector to "native" for that subscription, or use the PHP-FPM handler in Plesk, which the Selector does not support. The same article notes that Plesk does not support LSPHP, so the Selector has to be used there. My reading is that this is why it does not work for you on LiteSpeed, while Apache with PHP-FPM should. The KB does not say this in so many words, and I have not tested it on CloudLinux with LiteSpeed.

If you stay on LiteSpeed, two things to try:

1. Put the new domain into its own subscription, so it gets its own system user, and select 8.3 for that user in the Selector. The version must be installed and enabled in LVE Manager first.
2. Check that php83 is in the handled suffixes of the CloudLinux handler in the LiteSpeed WebAdmin console. A guide that quotes LiteSpeed's Plesk documentation says new PHP versions have to be added there by hand: Configure Plesk and Litespeed for CloudLinux PHP

Plesk KB: https://support.plesk.com/hc/en-us/articles/12377598352023

Regards
Tessa
 
Back
Top