简体   繁体   English

无法使Apache加载PHP作为模块

[英]Can't get apache to load PHP as a module

So I've looked all around google and have not been able to find a solution to this. 因此,我到处都在Google周围寻找资料,却无法找到解决方案。 I've tried everything I can think of and nothing seems to work. 我已经尝试了所有可以想到的方法,但似乎没有任何效果。 I'm running apache 2.2 and php 5.6.3. 我正在运行apache 2.2和php 5.6.3。

First, I downloaded PHP manually and then changed the php-development file to my .ini file and uncommented the extension for windows. 首先,我手动下载了PHP,然后将php-development文件更改为.ini文件,并取消了Windows扩展的注释。 (I'm on a windows 7 machine) Next I added an environment variable for PHP. (我在Windows 7机器上)接下来,我为PHP添加了一个环境变量。 After that I went into my apache config file and told it to load the module (which I had to download manually) And now everytime I try to start apache with the load module in the config file, apache gives me the operation could not be completed error. 之后,我进入我的apache配置文件,并告诉它加载模块(我必须手动下载),现在每次我尝试使用配置文件中的加载模块启动apache时,apache告诉我操作无法完成错误。

I'm honestly completely new to php and apache, but from what I understand it should work from what I've done so far. 老实说,我对php和apache完全陌生,但据我所知,它应该可以按照我到目前为止所做的工作来工作。 does anyone know of something else I should/could do? 有人知道我应该/可以做的其他事情吗?

Here are the lines where I load the module in the config file 这是我在配置文件中加载模块的行

LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "c:/php"

Mate, can you try like that and tell me if it is working for you: 伴侣,您能这样尝试并告诉我它是否对您有用:

LoadModule php5_module "c:\php\php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "c:\php"

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

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