What I’m seeing is: The code from my index.php file. It’s as if PHP isn’t turned on for my site.
I’m using this software: phpBB 3.3.0 & php set to 5.4 in cPanel
Additional information:
I manually uploaded the forum & db, as I do whenever moving or testing servers, but the results when visiting the installed forum is code directly from the index.php file. I’ve changed to different versions of PHP in cP, to no avail. No changes after 72 hours, so I thought I’d escalate the issue here.
Today, I also installed phpBB 3.5x using Softalicious. with similar results:
For starters, please note that the control panel we use is not cPanel. We use VistaPanel, which was modeled to look like cPanel in the front, but is very different under the hood.
I checked your .htaccess file, and in the file file at htdocs/.htaccess, I found code like this:
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php56” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php56 .php .php5 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
If your website used to be on cPanel, this probably worked fine. But we don’t use cPanel, so these codes do not work.
Specifically, these lines tell the server to execute PHP code in a certain way. But our server doesn’t know this way, so it can’t execute your PHP code if you give it these instructions.
The fix is simple: just remove these lines and your .php files will be handled with the default server logic, which means they are executed with the PHP interpreter you’ve configured.
That said, it’s recommended to set the PHP version in your cPanel to the highest possible version supported by your software. Old PHP versions can contain security issues, and the oldest ones are likely the first to be removed.
So sorry to have wasted your time! I had to reconstruct the site from several backups, and that htaccess file was errantly included. Fixed that, now on to the next step.