restarting apache via php
Posted 11 July 2006 - 02:34 PM
Posted 11 July 2006 - 02:52 PM
Posted 12 July 2006 - 12:35 AM
Anyway, you could do this:
$result = shell_exec('C:\path\to\apache.exe -k restart');
May do the trick.
Zend Certified Engineer
Follow me on Twitter: http://twitter.com/davidd
Posted 12 July 2006 - 06:46 AM
I also tried this
<?php $result = popen( 'C:\Program Files\apache\bin\apache.exe -k restart', 'r'); echo fread( $result, 4096 ); pclose($result); ?>
This works fine for reloading Bind but not for Apache. Any suggestions?
Posted 12 July 2006 - 07:04 AM
[code]When I try it this way [code=php:0]<?php $result = popen( 'C:\Program Files\apache\bin\apache.exe restart', '-k'); echo fread( $result, 4096 ); pclose($result); ?>[/code] I get the following error [/code] Faulting application Apache.exe, version 18.104.22.168, faulting module ntdll.dll, version 5.1.2600.2180, fault address 0x000010f3.
This is in the windows event viewer.
Any suggestions on a better way to do this
Posted 12 July 2006 - 08:32 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users