PDA

View Full Version : Apache, php, MySQL check


edit
01-07-2004, 10:47 AM
Hi,

Is there any way to check if Apache and mySQL is running on the target computer? And i need to detect php and domxml, too.

Thanks,
Edit

Adam
01-07-2004, 02:29 PM
There is no built in way to detect those technologies as it stands right now. These should all have keys in the registry somewhere. You could then use the built in registry actions to look for these keys in some pre-defined places.

I am sorry but I do not have any specific information as to where these keys would be stored.

bab
01-07-2004, 05:12 PM
Adam is correct, you can check the registry to find out if Apache and MySQL have been installed. Depending on how much you need to verify, there are additional steps you can take such as searching for the executable using the "Find File" action or see if a service is present using the "Query Service" action.

There may be some way to query Apache using a command line interface to find out what it is supporting (php, etc) but you'd have to do some research to find that out.

Both Apache and MySQL are not very Windows friendly as far as puting information in the registry in a useful way, such as well defined keys containg the install directory or version info. But with a little work you can probable find out what you need to know.

Barbara

Corey
01-08-2004, 01:17 AM
To test for PHP I would reccomend running a tiny script, i.e. load a basic PHP page which contains an HTML meta refresh head tag to "fail.html" but also contains a small PHP line such as:

<?
header ("Location: success.html");
?>

Note that the PHP must be the first thing on the page, you can't even have any whitespace before it.

Run this, if PHP is installed it will navigate to success.html and if not it will navigate to fail.html you can easily set one of these pages to send your app an alert as to which result was found, etc. I'm sure this can be made more elegant I just wanted to outline the concept...

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)