When i access phpmyadmin i got this
<?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);...
How can i access phpmyadmin .
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Heya,
This should happen only when PHP is not installed or enabled on the server itself. You can make sure that the following package is installed and enabled -
libapache2-mod-php
You can also check our tutorial on how to install and configure a LAMP stack droplet on Ubuntu 22.04
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-22-04#step-3-installing-php
Hope that this helps!
Heya @9e717a7a4dc54f49bcf9b6e81f2ae7,
It seems like you do not have PHP enabled and you are just seeing the code as plain text.
I’ll assume you don’t have PHP as well and provide you with the steps to enable PHP for Apache2(WebService). If you however have installed PHP just skip the steps that do the installation process of PHP.
Enabling PHP for Apache2 on a Linux system is a straightforward process that involves installing PHP, configuring Apache to use PHP, and then restarting the Apache server. Here’s a step-by-step guide to help you through the process:
This command installs Apache2, PHP, and the necessary module to integrate PHP with Apache.
libapache2-mod-php
module is enabled. You can enable it with:Replace
[version]
with your PHP version, likephp7.4
orphp8.0
.AddType
andDirectoryIndex
directives. These can be found in/etc/apache2/apache2.conf
or in specific site configuration files in/etc/apache2/sites-available/
./var/www/html/
). For example:Then, open your web browser and navigate to
http://localhost/phpinfo.php
. If PHP is configured correctly, this page should display detailed information about the PHP environment.phpinfo.php
file as it exposes sensitive information about your server’s configuration.Additionally, you might want to adjust PHP settings for security and performance as per your requirements. This can be done by editing the
php.ini
file, typically located in/etc/php/[version]/apache2/php.ini
.