KuhlHost
03-02-2004, 04:46 AM
Does anyone know of a PHP script to check for all installed components on an Apache server. I know of a script written in ASP to check the installed components on an IIS server, but the server we'll be using is running Red Hat with Apache and is a shared server.
Thanks in advance for any help.
dspillettt
03-02-2004, 01:58 PM
Originally posted by KuhlHost
Does anyone know of a PHP script to check for all installed components on an Apache server. I know of a script written in ASP to check the installed components on an IIS server, but the server we'll be using is running Red Hat with Apache and is a shared server.
Thanks in advance for any help.
As a hacky way od doing things you could create a small php script that just calls phpinfo() then have your function call that script (using the fact that the PFP file functions can read from HTTP requests) and parse the response to read the 'loaded modules' section of the 'apache' block.
Alternativly if you can read the apache configuration files (this depends on your host, and even if the file isn't protected from users reading it you won't always know where it is to read!).
You might want to check the PHP manual though (www.php.net/manual), as there is no doubt a much cleaner way of doing this! I am assuming that the function PHP uses to read the loaded modules is exposed somewhere for you to call.