I am attempting to use php to obtain the listing of loaded apache modules using apache_get_modules(), however i have an error this function is undefined.

From searching it appears however ,

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

I am unsure if this sounds like the situation, but I am on hosting that is shared. Any ideas how you can discover their email list of loaded apache modules, ideally with php, but I am available to suggestions.

  • phpinfo() will explain how PHP is installed, particularly the Server API row.
  • You can parse the config files for Apache to discover which modules are set up.
  • You can run something similar to apache2 -t -D DUMP_MODULES to acquire a listing of modules.

Request the server admin. Otherwise that which you do could easily get drenched somewhere...