我不确定这里发生了什么,但我想权限有问题。我将尝试描述症状,希望有人能治愈?我正在尝试在 EC2 实例上运行我的网站。我按照本指南安装了灯:https ://gist.github.com/aronwoost/1105007 。该网站使用 php、mysql 和 javascript。我看到我可以通过从 php 文件运行查询来访问 mysql 数据库,但是有很多事情不能正常工作:
- 当我使用“include 'databaseinfo.php';”时,它会自动打印文件的内容而不是导入变量,这样我就可以进行更安全的 mysql 查询。
- 在主 index.html 文件中,我有一些 php 代码并尝试让它回显一些要运行的 html,但 html 只是作为文本回显,而不是实际运行。
编辑:我对 httpd.conf 所做的唯一修改是这一部分:
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All