this is part of my code where I start and stop my MySQL database:
// first to check is mysql started or not
exec('net start', $b);
$mysqlStarted = false;
while(list(,$v) = each($b))
{
if (trim($v) == "MySql") $mysqlStarted = true;
}
//=== now start mysql
exec('net start mysql',$a);
===============
This work on my computer...
cu
Igor