What are common configuration issues when setting up PHP with Apache?
Issue: One common configuration issue when setting up PHP with Apache is the PHP script not being executed by the server. This can be resolved by ensuring that the PHP module is enabled in Apache's configuration file and that the file extension for PHP scripts is set correctly. ```apache # Enable PHP module LoadModule php_module modules/libphp.so # Set file extension for PHP scripts AddType application/x-httpd-php .php ``` Issue: Another common issue is PHP files not being parsed correctly, resulting in the script being displayed as plain text in the browser. This can be fixed by adding a handler for PHP files in Apache's configuration. ```apache # Add handler for PHP files AddHandler php-script .php ``` Issue: Additionally, if PHP directives in .htaccess files are not being processed, it may be due to the AllowOverride directive in Apache's configuration file not allowing the necessary overrides. This can be addressed by setting AllowOverride to All for the directory where the .htaccess file is located. ```apache <Directory "/path/to/directory"> AllowOverride All </Directory> ```