Page 1 of 1

Upgraded server - PHP not working

Posted: Tue Oct 04, 2022 1:58 am
by asai
Hi,

I upgraded my server today from Ubuntu 20.04 to 22.04.
Almost all went well, however php is not working anymore.
When I open a php webpage its only showing the code.
Example, phpmyadmin:

Code: Select all

<?php

declare(strict_types=1);

use PhpMyAdmin\Routing;

if (! defined('ROOT_PATH')) {
    // phpcs:disable PSR1.Files.SideEffects
    define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
    // phpcs:enable
}

global $route, $containerBuilder;

require_once ROOT_PATH . 'libraries/common.inc.php';

$dispatcher = Routing::getDispatcher();
Routing::callControllerForRoute($route, $dispatcher, $containerBuilder);
What could be missing from the upgrade og PHP installation?

Re: Upgraded server - PHP not working

Posted: Tue Oct 04, 2022 7:42 am
by Michalio
What kind of http server do you use? Apache, nginx?

Re: Upgraded server - PHP not working

Posted: Tue Oct 04, 2022 9:59 pm
by asai
Apache :)

Re: Upgraded server - PHP not working

Posted: Fri Oct 07, 2022 6:03 am
by Michalio
Probably you need to reenable the php module for the apache

Re: Upgraded server - PHP not working

Posted: Mon Oct 10, 2022 5:39 am
by asai
For some reason the module was not enabled... Works fine now :)