How can the Apache server configuration impact the ability of a PHP script to execute system commands like "shutdown"?

The Apache server configuration can impact the ability of a PHP script to execute system commands like "shutdown" by restricting the execution of certain functions for security reasons. To allow PHP scripts to execute system commands, you can modify the Apache server configuration to enable the "exec" function in PHP.

<?php
// Enable the "exec" function in PHP
ini_set('disable_functions', '');

// Execute system command to shutdown
exec('shutdown -h now');
?>