你好,我知道有很多关于这个问题的问题,但问题是我安装了 apache2 和 mysql 和 php 7.3 但是当我尝试输入 localhost/phpmyadmin 它显示
?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Main loader script
*
* @package PhpMyAdmin
*/
use PhpMyAdmin\Charsets;
use PhpMyAdmin\Config;
use PhpMyAdmin\Core;
use PhpMyAdmin\Display\GitRevision;
use PhpMyAdmin\LanguageManager;
use PhpMyAdmin\Message;
use PhpMyAdmin\RecentFavoriteTable;
use PhpMyAdmin\Relation;
use PhpMyAdmin\Response;
use PhpMyAdmin\Sanitize;
use PhpMyAdmin\Server\Select;
use PhpMyAdmin\ThemeManager;
use PhpMyAdmin\Url;
use PhpMyAdmin\Util;
use PhpMyAdmin\UserPreferences;
/**
* Gets some core libraries and displays a top message if required
*/
require_once 'libraries/common.inc.php';
/**
* pass variables to child pages
*/
$drops = array(
'lang',
'server',
'collation_connection',
'db',
'table'
);
foreach ($drops as $each_drop) {
if (array_key_exists($each_drop, $_GET)) {
unset($_GET[$each_drop]);
}
}
unset($drops, $each_drop);
/*
* Black list of all scripts to which front-end must submit data.
* Such scripts must not be loaded on home page.
*
*/
$target_blacklist = array (
'import.php', 'export.php'
);
// If we have a valid target, let's load that script instead
if (! empty($_REQUEST['target'])
&& is_string($_REQUEST['target'])
&& ! preg_match('/^index/', $_REQUEST['target'])
&& ! in_array($_REQUEST['target'], $target_blacklist)
&& Core::checkPageValidity($_REQUEST['target'], [], true)
) {
include $_REQUEST['target'];
exit;
}
if (isset($_REQUEST['ajax_request']) && ! empty($_REQUEST['access_time'])) {
exit;
}.....etc
这是一个很长的代码,所以我不会全部包含它,除非你问我发生了什么是在安装了所有 Lamp 服务之后我输入了 php 我的管理员然后它抛出了 not found 所以我将这一行包含在 apache 配置中
Include /etc/phpmyadmin/apache.conf
然后这发生了
ubuntu 版本:Ubuntu 20.04 LTS 我将它下载为桌面
我如何安装 LAMP https://medium.com/better-programming/how-to-install-lamp-stack-on-ubuntu-db77ac018116
但请注意,并非一切工作都完美,有一些错误,我不得不检查其他资源,我进入了许多网站并在来到这里之前尝试了很多东西,所以如果你建议重新安装所有东西,我的环境可能会很糟糕,请指导我完成整个过程
更新: 我安装了 php 7.4.3,但我认为它没有启用,当我尝试时
a2enmod php7.4
它抛出
Considering dependency mpm_prefork for php7.4:
Considering conflict mpm_event for mpm_prefork:
ERROR: Module mpm_event is enabled - cannot proceed due to conflicts. It needs to be disabled first!
Considering conflict mpm_worker for mpm_prefork:
ERROR: Could not enable dependency mpm_prefork for php7.4, aborting
php cli 是 7.4.3 apache 日志
[Mon Apr 27 06:04:22.301065 2020] [mpm_event:notice] [pid 7212:tid 140619563371584] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Mon Apr 27 06:04:22.301385 2020] [core:notice] [pid 7212:tid 140619563371584] AH00094: Command line: '/usr/sbin/apache2'
[Mon Apr 27 06:05:42.547129 2020] [mpm_event:notice] [pid 7212:tid 140619563371584] AH00491: caught SIGTERM, shutting down
[Mon Apr 27 06:06:08.849938 2020] [mpm_event:notice] [pid 8424:tid 140393719311424] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Mon Apr 27 06:06:08.850056 2020] [core:notice] [pid 8424:tid 140393719311424] AH00094: Command line: '/usr/sbin/apache2'
[Mon Apr 27 06:08:59.234468 2020] [mpm_event:notice] [pid 8424:tid 140393719311424] AH00493: SIGUSR1 received. Doing graceful restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Mon Apr 27 06:08:59.242099 2020] [mpm_event:notice] [pid 8424:tid 140393719311424] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Mon Apr 27 06:08:59.242111 2020] [core:notice] [pid 8424:tid 140393719311424] AH00094: Command line: '/usr/sbin/apache2'
[Mon Apr 27 06:09:07.878703 2020] [mpm_event:notice] [pid 8424:tid 140393719311424] AH00491: caught SIGTERM, shutting down
[Mon Apr 27 15:40:17.496415 2020] [mpm_event:notice] [pid 971:tid 140557889219648] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Mon Apr 27 15:40:17.549391 2020] [core:notice] [pid 971:tid 140557889219648] AH00094: Command line: '/usr/sbin/apache2'
关于 phpinfotest 它显示了源代码
没有这样的文件 /etc/apache2/site-available/your_vhost.conf
我与此类似的是/etc/apache2/sites-available/000-default.conf