OLS downloading php files, not executing them, HELP pls!

#1
Hello everyone,

Unfortunately, due to a server crash, I had to rebuild my Home Lab. On this environment I have been hosting a few websites free of charge for some acquaintances as a courtesy.

I have been using OpenLiteSpeed for a very long time, but since it required no attention after the initial configuration, I essentially did not touch it for years.

After the server crash, I was forced to install a new operating system (headless Ubuntu 25.10 Server). Unfortunately, I only had backups of the www directories and the MySQL databases.

Now that I have reinstalled OpenLiteSpeed and deployed LSPHP 8.5.2, nothing is working. Any non-static content fails: instead of executing PHP, the browser attempts to download the page.

Does anyone have an idea what could be causing this issue? I would be very grateful for any guidance or support.

Here are a few example URLs:
https://skynet.zone/phpinfo

https://phpmyadmin.skynet.zone
 

Attachments

#4
If PHP files are being downloaded instead of executed, I'd focus on the web server configuration rather than MySQL. That behavior almost always means OpenLiteSpeed isn't passing .php files to the LSPHP handler. In the forum thread, the OP eventually found the issue was due to mistakes in the server and virtual host configuration after rebuilding the server.

I'd verify that your External App and Script Handler are configured correctly, make sure the installed lsphp version matches the configured handler, and confirm the virtual host is using that handler. If you recently upgraded Ubuntu or PHP, also check that you're using a supported LTS release and compatible LSPHP packages.

Since your database was restored after the crash, it's still worth checking that your MySQL/MariaDB service starts cleanly and your application can connect to it. If the crash also left the database corrupted and native recovery methods don't work, then a tool like Stellar Repair for MySQL can be considered as a last resort. But for PHP files downloading instead of executing, I'd troubleshoot the OpenLiteSpeed/PHP configuration first.
 
Top