Upgraded server - PHP not working

Forum for you who has PHP installation issues

Moderators: gesf, Michalio

Post Reply
asai
New php-forum User
New php-forum User
Posts: 3
Joined: Tue Oct 04, 2022 1:54 am

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?
User avatar
Michalio
Moderator
Moderator
Posts: 315
Joined: Sun Jul 18, 2021 1:33 pm
Location: Poland

What kind of http server do you use? Apache, nginx?
Free coding lessons: https://php-forum.com/phpforum/viewtopic.php?t=29852
asai
New php-forum User
New php-forum User
Posts: 3
Joined: Tue Oct 04, 2022 1:54 am

Apache :)
User avatar
Michalio
Moderator
Moderator
Posts: 315
Joined: Sun Jul 18, 2021 1:33 pm
Location: Poland

Probably you need to reenable the php module for the apache
Free coding lessons: https://php-forum.com/phpforum/viewtopic.php?t=29852
asai
New php-forum User
New php-forum User
Posts: 3
Joined: Tue Oct 04, 2022 1:54 am

For some reason the module was not enabled... Works fine now :)
Post Reply