【问题标题】:How to get the list of apache modules enabled with php如何获取使用 php 启用的 apache 模块列表
【发布时间】:2011-07-01 12:19:27
【问题描述】:

我试过了

<?php

print_r(apache_get_modules());

?>

得到了这个

Fatal error:  Call to undefined function apache_get_modules() in

为什么内置函数出错以及如何获取模块列表

【问题讨论】:

  • 你正在运行 php 作为 apache 模块?
  • @King:哦,它是作为 CGI 安装的。你知道如何检查 CGI 是否启用了 mod_rewrite 吗?

标签: php apache


【解决方案1】:

manual page 包含有关支持apache_get_modules() 的 PHP 和 Apache 版本的详细信息。

您必须运行 PHP >= 4.3.2 并使用 Apache 2 处理程序 API,或者 PHP >= 5.0 和 Apache 1 或 Apache 2 过滤器 API。

【讨论】:

  • 以及如何检查 mod_rewrite 是否启用了 CGI?
  • @Daric 检查我的回答,检查是否在 CGI 下启用了 mod_rewrite
猜你喜欢
  • 2011-03-26
  • 2016-06-29
  • 2017-05-07
  • 1970-01-01
  • 1970-01-01
  • 2016-11-04
  • 1970-01-01
  • 2018-03-31
  • 2011-05-13
相关资源
最近更新 更多