P
P
PO6OT2015-04-25 22:02:57
PHP
PO6OT, 2015-04-25 22:02:57

How to get a list of enabled Apache modules using php?

This is necessary for quick debugging, for example, you take .htaccess, try to fix RewritreRule and you realize that your hands are growing out of your ass. And then it turns out that the Rewrite module was turned off. And after that, the idea came to my mind to shove information about Apache into php. So is it possible to get a list of all enabled modules from php? In order not to look for errors every time, I stupidly add variables to my debug.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Filimonov, 2015-04-25
@woonem

A list of all enabled modules can be found using apachectl.
Write a wrapper around it.
Or if mod_php is used, then there is a function apache_get_modules()in PHP.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question