Apache Failure to Execute PHP Code: Resolving Display Issues
When attempting to install PHP and Apache on Windows Vista, users may encounter situations where PHP code displays as source rather than executing. This article provides a solution to this specific problem.
Troubleshooting the Issue:
To resolve this issue, follow these steps:
1. Check mod-Enabled Folder:
Navigate to the Apache directory (default: /etc/apache2/mods-enabled) and search for a file named php.(extension). Enable this file (if not already done).
2. Examine Error Log:
Inspect the error log located at /var/log/apache2/error.log for any additional error messages that could further troubleshoot the problem.
Example Configuration:
For PHP.INI:
short_open_tag = On
For HTTPD.CONF:
LoadModule php5_module "C:/php/php5apache2_2.dll" AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps PHPIniDir "C:/php"
Following these steps should enable PHP execution and prevent source code display in Apache.
The above is the detailed content of Why Isn't My Apache Server Executing PHP Code on Windows Vista?. For more information, please follow other related articles on the PHP Chinese website!