Home > Backend Development > PHP Tutorial > Why Isn't My Apache Server Executing PHP Code on Windows Vista?

Why Isn't My Apache Server Executing PHP Code on Windows Vista?

Mary-Kate Olsen
Release: 2024-12-17 22:28:12
Original
982 people have browsed it

Why Isn't My Apache Server Executing PHP Code on Windows Vista?

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
Copy after login

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"
Copy after login

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template