我无法127.0.0.1/phpmyadmin在Web浏览器中访问www.example.com

4sup72z8  于 2022-11-09  发布在  PHP
关注(0)|答案(1)|浏览(281)

我使用的是Fedora 20,运行的是apache 2.4.9,php 5.5.11和mysql 5.16.17。不幸的是,我无法访问phpmyadmin。我试着在/etc/php. ini中添加扩展名=mysqli.so和mbstring,即使我重新启动apache也不起作用。然后我使用了yum install php-mysqli和php-mbstring...在成功安装后,不起作用。我查看php.info,但没有看到安装了mysqli或mbstring。我一直在研究...但我找不到任何修复此问题的线索。www.example.com的输出127.0.0.1/phpmyadmin/显示如下:
Index of /新建文件夹

Parent Directory
.coveralls.yml
CONTRIBUTING.md
ChangeLog
LICENSE
README
RELEASE-DATE-4.1.12
browse_foreigners.php
changelog.php
chk_rel.php
composer.json
config.sample.inc.php
config/
db_create.php
db_datadict.php
db_events.php
db_export.php
db_import.php
db_operations.php
db_printview.php
db_qbe.php
db_routines.php
db_search.php
db_sql.php
db_structure.php
db_tracking.php
db_triggers.php
doc/
error_report.php
examples/
export.php
favicon.ico
file_echo.php
gis_data_editor.php
import.php
import_status.php
index.php
js/
libraries/
license.php
navigation.php
phpinfo.php
phpmyadmin.css.php
phpunit.xml.nocoverage
pmd_display_field.php
pmd_general.php
pmd_pdf.php
pmd_relation_new.php
pmd_relation_upd.php
pmd_save_pos.php
prefs_forms.php
prefs_manage.php
print.css
querywindow.php
robots.txt
schema_edit.php
schema_export.php
server_binlog.php
server_collations.php
server_databases.php
server_engines.php
server_export.php
server_import.php
server_plugins.php
server_privileges.php
server_replication.php
server_sql.php
server_status.php
server_status_advisor.php
server_status_monitor.php
server_status_queries.php
server_status_variables.php
server_user_groups.php
server_variables.php
setup/
show_config_errors.php
sql.php
tbl_addfield.php
tbl_change.php
tbl_chart.php
tbl_create.php
tbl_export.php
tbl_find_replace.php
tbl_get_field.php
tbl_gis_visualization.php
tbl_import.php
tbl_indexes.php
tbl_move_copy.php
tbl_operations.php
tbl_printview.php
tbl_relation.php
tbl_replace.php
tbl_row_action.php
tbl_select.php
tbl_sql.php
tbl_structure.php
tbl_tracking.php
tbl_triggers.php
tbl_zoom_select.php
themes.php
themes/
transformation_overview.php
transformation_wrapper.php
url.php
user_password.php
version_check.php
view_create.php
view_operations.php
webapp.php

对于为什么phpmyadmin的输出会出现这种情况,有什么建议吗?

w8rqjzmb

w8rqjzmb1#

尝试http://127.0.0.1/phpmyadmin/index.php。我怀疑它会起作用,在这种情况下,当您安装PHP时,没有为PHP文件配置DirectoryIndex。
DirectoryIndex是一个Apache配置指令,它告诉Apache要加载哪些文件名因此,如果http://example.com/被加载,并且DirectoryIndex行包含index.html home.html,Apache将首先尝试加载index.html,如果缺少index.html,它将尝试加载home.html,如果缺少home.html,它将(取决于configuration),只需显示一个目录列表。这就是你在这里看到的。
所以正确的修复方法是将index.php添加到DirectoryIndex指令中。它看起来可能类似于DirectoryIndex index.html index.htm home.html,您可以简单地将index.php添加到其他行之前或之后(结果将类似于DirectoryIndex index.php index.html index.htm home.html)。注意,这只是一个示例,我建议您直接编辑现有的行,而不是复制并粘贴我的行。

相关问题