skip to Main Content

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


  1. 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

    Login or Signup to reply.
  2. Did you check if you (re)enabled PHP for Apache2? Therefore check the mods-enabled folder in Apache’s installation directory for a php file.

    If you cannot fine any file, try running sudo a2enmod php8.1.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search