I’ve upgraded an Ubuntu server from 18 to 22.04.
PHP version is 8.1.2
Apache/2.4.52
After that, my .php files are not interpreted but apache2 show source code… Why ?
Thanks
I’ve upgraded an Ubuntu server from 18 to 22.04.
PHP version is 8.1.2
Apache/2.4.52
After that, my .php files are not interpreted but apache2 show source code… Why ?
Thanks
2
Answers
Was the PHP Version also updated from <7.4 in that Ubuntu Server update?
This could be the result of PHP’s short tags having gotten deprecated with 7.4+ if you are still trying to use them in PHP 8
https://wiki.php.net/rfc/deprecate_php_short_tags
Did you check if you (re)enabled PHP for Apache2? Therefore check the
mods-enabled
folder in Apache’s installation directory for aphp
file.If you cannot fine any file, try running
sudo a2enmod php8.1
.