简体   繁体   English

Apache上的内部服务器错误,但仅适用于PHP文件

[英]Internal Server Error on apache, but only on PHP files

This is not a duplicate, this is a millionplicate, because I know there are like dozens of the same question in here, but none of them have the answer for my situation. 这不是重复的,而是一百万个重复的,因为我知道这里有数十个相同的问题,但是没有一个能解决我的情况。

There we go: 我们去了:

I have apache, with the latest zend server. 我有Apache,使用最新的zend服务器。 For some reason whenever i open a php project, it does not open, it says Internal Server Error. 由于某种原因,每当我打开一个php项目时,它都不会打开,并显示“内部服务器错误”。

I have changed the httpd.conf, have allowed permissions to the folder, and if i run php phpinfo.php (my test file), it will run the php file, but if i open on a browser, it wont. 我已经更改了httpd.conf,已允许该文件夹的权限,并且如果我运行php phpinfo.php(我的测试文件),它将运行php文件,但是如果我在浏览器中打开,则不会。

The apache is running html files, but not PHP. apache正在运行html文件,但不运行PHP。

Any help on this? 有什么帮助吗?

请确保此命令代码在您的apache httpconfig文件中

LoadModule php5_module "c:/yourphpfolderr/php5apache2_2.dll"

AddType application/x-httpd-php .php

# configure the path to php.ini

PHPIniDir "C:/yourphpfolder"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM