What security risks should be considered when configuring Apache to handle PHP files?

When configuring Apache to handle PHP files, it is important to consider security risks such as code injection attacks and unauthorized access to sensitive files. To mitigate these risks, it is recommended to disable the PHP execution in certain directories and limit the file permissions to prevent unauthorized access.

<FilesMatch "\.php$">
    Order allow,deny
    Deny from all
</FilesMatch>