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]  [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]  [config:server:vhosts:vhost:thing.com:scripthandler:add] HttpMime::addMimeHandler getHandler with name thing1918 ret (nil)
2021-12-13 01:21:30.941017 [ERROR]  [config:server:vhosts:vhost:thing.com:scripthandler:add] use static file handler for suffix [php]
So is it only with the automated wordpress installer or are you able to install it the manual way of installing wordpress very fine?
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.
Just try to upgrade Cyberpanel : 02 - Upgrading CyberPanel
This should solve most of the issues for you.
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.
Thanks, I did already try running the upgrade command, as you have posted, I hoped that would solve it. It did not unfortunately
If possible do send me a temporary login in private message to check things and find the cause+solution to the issue.
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?
Otherwise feel free to e-mail me if you’d be willing to zoom in for a moment- I’d happily pay you for your time. email@example.com
@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.
@die2mrw007 Will do this. On AWS, do you recommend the AMI there?
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.
@die2mrw007 Thank you! Do you work on the open source project? I’m going to try and find time to contribute soon.
I am not working on the development part but I contribute on support and other aspects of the project. Feel free to be a part of the development at GitHub - usmannasir/cyberpanel: Cyber Panel - The hosting control panel for OpenLiteSpeed
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.
I am using Ubuntu 20.4 on AWS EC2 instance…its t3.medium instance
And I can confirm that in Ubuntu 20.4 PHP starts from 7.2
In my almalinux setup, it starts from PHP 5.3
This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.