PHP Apache 未运行
我正在尝试安装 phpldapadmin。我已经安装了代码并将其放置在 apache 的文档目录中,我还将 php5 模块加载到 apache 配置中并添加了以下目录指令。
<Directory "/usr/local/www/apache22/data/phpldapadmin/htdocs">
DirectoryIndex index.php
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
AddType application/x-httpd-php .php
</Directory>
然而,当我将浏览器导航到此时,它仅显示index.php 中的php 代码,任何帮助将不胜感激。
添加此行 AddType application/x-httpd-php .php 无效。还重新启动了服务器。
I am trying to install phpldapadmin. I have installed the code and placed it in my document dir for apache I have also loaded the php5 module into apache config and added the following directory directive.
<Directory "/usr/local/www/apache22/data/phpldapadmin/htdocs">
DirectoryIndex index.php
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
AddType application/x-httpd-php .php
</Directory>
However when I navigate the browser to this it just show the php code from index.php any help would be greatly appreciated.
Added this line AddType application/x-httpd-php .php to no effect. Have also restart the server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在
中添加以下行:AddType application/x-httpd-php .php .phtml
这使得您的 PHP 脚本由 PHP 解释器执行。
(并记住重新启动服务器。如果您不知道如何重新启动计算机)
http://www.php.net/manual/en/install.unix.apache.php
Add this line inside
<Directory></Directory>
:AddType application/x-httpd-php .php .phtml
This makes your PHP script execute by PHP interpreter.
(and remember to restart the server. restart the computer if you don't know how to)
http://www.php.net/manual/en/install.unix.apache.php
尝试重新启动服务器以使配置文件更改生效。
Try restarting the server to make the configuration file changes to effect.