Childdomain PHP setup fallback to 5.6.36 after PHP version change in CP

Steps to reproduce:
1.) Clean install of Ubuntu 18.04 minimal version
2.) install Cyberpanel with OLS (both actual from today)
3.) Set up a virtual Host with php 7.0 as preference
4.) Under that vHost add another Domain (Childdomain)
5.) verify both are working with phpinfo
6.) Change the childdomains php version to 7.2 and verify again it’s still working.

From here on i did the following steps:

1.) changed the childdomains php version to 7.0 and altered the php.ini in advanced mode. Removed a semikolon in front of mysqli.dll to get rid of the error message “Fatal error: Call to undefined function mysqli_connect() in”

2.) did that for the other php versions as well just to be sure if i want to switch in the future that i’ll not forget that.

3.) altered vHost Conf and changed the lines:

scripthandler {
add lsapi:vultras1234 php
}

to:

scripthandler {
add lsapi:vultras1234 php, html
}

in order to parse html files with php.

Any one of these 3 steps or all together made that the childdomain does fall back to php 5.6.36 and from that time on one can not change the childdomains php version within Cyberpanel anymore.

For the complete thread please look here

in configurations do you see PHP being changed? Need to make check if configurations are not updated or OpenLiteSpeed is not picking up the change.

I’m not sure i understand you right? There’s only a dropdown to choose different php versions. From 7.0 up to 7.3. If i choose the versions at the dropdown there’s a small green modal popup where it says that the change was successful (something like that),
but there’s no change. The php version of the childdomain remains at 5.6.36 after the fallback.

The vHost maindomain is okay. This is happening only at the childdomains level.

I’m in need of childdomains since if i would setup a seperate vHost for each of the 30 domains per server i would need 30 ftp user for one server. And with 4 servers this is getting out of hand :frowning:

Kindly open a ticket with server login details. Would like to check if it is OLS or CyberPanel problem. It will be a minor fix.

I am sorry for this time. As i have no spare vps at hand and am a bit under pressure timewise i needed to try something different with that vps.
That’s why i described the error a bit more detailed, in hope that you can reproduce it.

Let see if I can reproduce it.

I can reproduce it. However generated configurations are fine, but somehow OpenLiteSpeed is being defaulted to 5.6. Will get back to you with more details.

Jep. 5.6.36 as well? I don’t know how that can be as i never installed php 5.6.36 for sure. Maybe that’s included in Ubuntu 18.04 LTS?

It seems that OpenLiteSpeed fails to load PHP configurations for the vhost (due to .html modification) and then it loads its fall back PHP (which is PHP 5.6)

Have the same Ubuntu 18.04 LTS minimal on a other VPS and verified that php 5.6.36 is not included per default

at least with # locate bin/php, and checking everything wich looks like a bin with for example # /usr/bin/php -v
did not reveal any php 5.6.36 version

Here it is

root@php:/usr/local/lsws/fcgi-bin# ls /usr/local/lsws/fcgi-bin
RackRunner.rb  lsnode.js  lsperld.fpl  lsphp  lsphp5
root@php:/usr/local/lsws/fcgi-bin# 

Dang! Something learned again. Thank you :slight_smile:

It is probably an OpenLiteSpeed bug, that needs fixing. Hopefully starting next week. :slight_smile:

@maxxom

This works

scripthandler {
add lsapi:vultras1234 php
add lsapi:vultras1234 html
}

Shows correct PHP version, and treat HTML as PHP.

Uups, so, are you saying that this was the culprit? And everything works now as expected?

This is not a fix, it should work the way you were trying. But David asked me to try it like this and it worked.

Its a work around and not a fix, it will be fixed later.

Okay, thank you! I’m already setting up :slight_smile:

Just wanted to report back, vps with 31 Domains running since setup with the above mentioned work around flawless. Thanks!