Re: exec or system in windowz to stop mysql or apache fromremote (and restart them)

From: Date: Mon, 27 Nov 2000 18:11:06 +0000
Subject: Re: exec or system in windowz to stop mysql or apache fromremote (and restart them)
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-27414@lists.php.net to get a copy of this message
Hello, thanks for your hints: I tried the script: Atleast now the php doesn't hang on. But I get no output. $Return is empty. I also tried to use *.doc or *.* since I was not sure where the dir command was executed. in c:\ or in c:\apache\htdocs (where thescript resides) or in other dirs. > > > <?php > > $Command = "dir *.htm"; > > > echo "<pre>\n"; > echo "Command to be run: $Command\n\n"; > > echo "\n\n=========================================================\n"; > echo "EXEC()===================================================\n"; > $Return = exec("$Command"); > echo "\n\n----Returns----\n"; > echo "$Return"; > > echo "\n\n\n\n=========================================================\n"; > echo "PASSTHRU()===============================================\n"; > $Return = passthru("$Command"); > echo "\n\n----Returns----\n"; > echo "$Return"; > > echo "\n\n\n\n=========================================================\n"; > echo "SYSTEM()=================================================\n"; > $Return = system("$Command"); > echo "\n\n----Returns----\n"; > echo "$Return"; > > ?> > > > -- > PHP scripts that make your job easier > http://www.analysisandsolutions.com/code/ > SQL Solution | Layout Solution | Form Solution > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#27414) next »