Im starting on writing an Admin Control Panel for pl-serv on linux, and was wondering how do i make php check to see if the httpd and mysqld are runnin ? so far i got
all i need is the part that checks if Apache and MySQL are running how would i do this ?
<<edit>> i think i figured out the mysql chk but not apache
PHP:
<?php
if(//Check if httpd is running goes here)
echo "Apache is running";
else {
echo "Apache is not running";
if(//Check if mysqld is running code goes here)
echo "MySQL is running";
else {
echo "MySQL is not running";
?>
all i need is the part that checks if Apache and MySQL are running how would i do this ?
<<edit>> i think i figured out the mysql chk but not apache
PHP:
<?php
if(Check if httpd is running)
echo "Apache is running";
else {
echo "Apache is not running";
if($link = mysql_connect (localhost, admin, scripts))
echo "MySQL is running";
else {
echo "MySQL is not running"
?>
Last edited: