Is this all I need to restart Apache from within my Perl script?
system("C:\\Apache24\\bin\\httpd.exe -k restart");
I tried to verify that this actually restarts Apache, but cant find my Apache log file. And looking in Windows Task Manager under the Services tag the Apache service did not get a renewed PID number. I also checked if I could see any activity in the Windows Computer Management > System Tools > Event Viewer > Windows Logs tabs, for anything that could hint if Apache did do a restart, but did not find any activity. And now I am not sure if this code is working.
I guess I could just do a
system("C:\\Apache24\\bin\\httpd.exe -k stop");
and see if that killed Apache...
Update: I tried to stop it in my cmd window and got
(OS 5)Access is denied. : AH10014: Failed to open the 'Apache2.4' service
... come to find out I was not running under an elevated Administrator: Command Prompt window. So probably the Perl script would also not have had the right to execute that command.