Well I ended up with a slightly different way to do it but it seems to work
for me.
Don't know if anyone else will find it useful but here is the code.

//Use windows netstat to check for port 3306 (MySQL)
//If it is not in the list then run MySQL
exec ('netstat -a -n', $reply, $error);
$reply = implode($reply);
$mysqlrunning = eregi( ':3306',$reply );
if (!$mysqlrunning){
    exec
('C:\mysql\bin\mysqld.exe --defaults-file=C:\mysql\bin\my.cnf --standalone')
;
}



""Jon"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is there some way to have PHP test if MySQL is running and if not make the
> system call to start it?
>
> This is just an ME test machine but I would also like to know how on XP
PRO
> cause I have another test machine available.

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to