【发布时间】:2015-03-02 04:37:27
【问题描述】:
这好像很奇怪,我安装了apache2,php5,phpmyadmin,mysql-server。
我用代码创建了一个文件 -
<?php
phpinfo();
?>
然后我的网络服务器输出与代码字符串相同。它没有输出任何它的 php 配置。
我使用过 Google Cloud Platform、DigitalOcean.. Amazon EC2 的新手,但由于这台机器只是一个 linux,它应该可以正常工作,但事实并非如此。
编辑:
当我在我的 EC2 实例命令行上运行此命令 $php info.php 时,它会显示 phpinfo(); 的完整输出; ,但它没有显示在我的浏览器上。
输出:sudo apachectl -M
core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
access_compat_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
filter_module (shared)
mime_module (shared)
mpm_event_module (shared)
negotiation_module (shared)
setenvif_module (shared)
status_module (shared)
【问题讨论】:
-
你是否加载了 php5 模块 (
apachectl -M)?仔细检查:Apache 2.x on Unix systems,如果没有什么明显的。您是否更改了它的任何配置?
标签: php amazon-web-services amazon-ec2