I’ve been wracking my brain trying to figure out what I did here. I don’t know how I possibly could have, but I messed up the default version of PHP that a website created through the web API uses. I can successfully change the PHP version after creation via the GUI, the nonexistent default causes a wordpress installation to fail, with the only fix being to delete the entire website over again and start over. I want to use /usr/local/lsws/lsphp74. The automated install seems to point it to lsphp70, which doesn’t exist, and I can’t seem to be able to update the PATH. Help!
root@wordpresshost:/home/wordpresshost.io# /usr/local/lsws/bin/openlitespeed -t
2021-12-13 01:21:30.940928 [ERROR] [2703] [config:server:vhosts:vhost:thing.com:epsr:thing1918.655340] invalid path - /usr/local/lsws/lsphp70/bin/lsphp, it cannot be started by Web server!
2021-12-13 01:21:30.941013 [ERROR] [2703] [config:server:vhosts:vhost:thing.com:scripthandler:add] HttpMime::addMimeHandler getHandler with name thing1918 ret (nil)
2021-12-13 01:21:30.941017 [ERROR] [2703] [config:server:vhosts:vhost:thing.com:scripthandler:add] use static file handler for suffix [php]
I have only tried the automated method. Works fine if I first set the php version via cyberpanel gui manually. But if I don’t, the install is worthless forever, have to delete the website and start over.
Thanks for your replies- I tried upgrading too. Is there a PATH or environment variable I’m not thinking of? It’s weird, because PHP 7.0 is not installed, nor was it ever, I don’t think.
The reason I asked to do an upgrade command is that It will repair the php issue you have. Maybe you have messed up something and finding what really is messed will take a long time and its better to repair the issue rather going back in finding the issue as of now.
That’s really kind. Would be against our security policy to assign you more than a reseller account, would that work? I haven’t tried the API with a reseller, are they allowed?
@die2mrw007 thought- i see that via the CLI, I can specify a PHP version. Can I specify the PHP version via the web API? I see hints toward a $phpVersion allowance for the createWebsite endpoint, and I tried it, but maybe I’m getting the syntax wrong? Not well documented, unless I’m missing something.
There shouldn’t be so much hazzles as you are doing currently. Cyberpanel works out of the box with all PHP versions upto PHP 8.0.12
You might have messed up things which you might be knowing better. I would rather suggest to spin up a new server with ubuntu 20.4 minimal OS setup and install cyberpanel fresh on it. Then make sure everything is working fine in this server and then shift all your websites to this new server.
Make a snapshot of this new server so that you can restore it whenever you mess things up in future.
Dont use cyberpanel AMI on any platform. Install cyberpanel using SSH method by copy pasting the install code which is provided in official documentation of cyberpanel.
For anyone watching, solution was to downgrade to Ubuntu 18, which for whatever reason allows PHP 7.0 to properly install, where Ubuntu 20 did not. Tried multiple fresh Ubuntu 20 installations, to no avail. I am using AWS EC2 t3.small instance.