I have php 7.4, 8.0 & 8.1 installed. The path is /usr/local/lsws/lsphp81
My Nextcloud V26 runs on php8.1 and when I do phpinfo.php and check it says it’s 8.1
When I try this cmd:
sudo -u www-data /home/site.com/nextcloud/occ -V
It says:
This version of Nextcloud requires at least PHP 8.0 You are currently running 7.4.33. Please update your PHP version.
I tried running sudo -u www-data php8.1 and combinations thereof but then it complains about the cmd. I also cannot change the environment as I have two sites installed here, and the other site needs the php7.4 version.
Can someone clever please help, I am a total noob.
Your php8.1 does not point to litespeeds php cli binary.
To find out where it is pointing to you could execute which php8.1
To tackle this issue you could directly use the litespeed php binary like:
@alexoz Thank you so much! I tried this and it worked:
sudo -u www-data /usr/local/lsws/lsphp82/bin/php /home/site.com/nextcloud/occ -V
I get the following msg:
Cannot write into “config” directory!
This can usually be fixed by giving the web server write access to the config directory.
This sounds like a file permissions problem.
So set config_is_read_only to false. You have set it to true. This will (as the variable says) set it to read only and prevent writing to it.
After that set the correct file permissions as found in the nextcloud manual in list item 12.
Please check under which user your litespeed virtual host is running, it probably isn’t www-data.
After you have found out which user actually serves your nextcloud instance you can execute those commands again with the right user and group.
In this thread you can find a good starting point for a nextcloud setup with litespeed webserver. Please check that you have setup everything correctly.
I’ll see if I can hire someone from upwork and then report back. I just don’t know enough and am a linux noob. I may just end up breaking the whole server.
@Irdi Thank you for all the help! Could not have done it without you. If anyone else ever gets stuck, why not ask Irdi? He did above and beyond and was super helpful!