替代apache_get_modules()来获得的加载Apache模块列表 [英] Alternatives to apache_get_modules() to get list of loaded apache modules

查看:218
本文介绍了替代apache_get_modules()来获得的加载Apache模块列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用PHP中使用 apache_get_modules()来获取加载Apache模块列表中,但我得到一个错误,这个函数是不确定的。

I'm trying to use php to get the list of loaded apache modules using apache_get_modules(), but I get an error that this function is undefined.

从搜索看来问题在于

在安装PHP时,这仅适用
  作为Apache模块。这不会
  功能使用PHP作为CGI(例如当:
  suPHP)

this only works when PHP is installed as an Apache module. This will not function when using PHP as CGI (ex: suPHP)

我不知道,如果是这样的话,但我的共享主机。任何想法如何找出装载Apache模块,preferably用PHP的名单,但我很开放的建议。

I'm not sure if this is the case, but I'm on shared hosting. Any ideas how to find out the list of loaded apache modules, preferably with php, but I'm open to suggestions.

推荐答案


  • phpinfo()函数将告诉你PHP的安装方式,尤其是服务器API一行。

  • 您可以解析配置文件为Apache找出哪些模块配置。

  • 您可以运行像的Apache2 -t -D DUMP_MODULES 来获得的模块列表。

  • phpinfo() will tell you how PHP is installed, especially the Server API row.
  • You could parse the config files for Apache to find out which modules are configured.
  • You could run something like apache2 -t -D DUMP_MODULES to obtain a list of modules.
  • 这篇关于替代apache_get_modules()来获得的加载Apache模块列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆