当我导航到我的网站(例如www.mydomain.com)时,浏览器会打开一个弹出窗口来下载文件。Apache,PHP,Centos 6
在我的httpdocs文件夹中我有: - index.html的 - 的index.php() - 我没有.htaccess文件
检查浏览器: - www.mydomain.com/index .html - >它工作正常 - www.mydomain.com/index.php - >它的作品错误(它下载index.php文件) - www.mydomain.com - >它工作错误(它下载“descarga”具有index.php内容的文件)。
PHP安装,当我运行php -v
命令,它说,我使用的PHP 5.3
我有同样的服务器工作正常使用PHP文件在其他领域,这样的AddHandler或LoadModule伪不应该是问题,只要PHP是我所有领域的常数。
这是我php.conf貌似对一切是正确的:
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
<IfModule prefork.c>
LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule worker.c>
LoadModule php5_module modules/libphp5-zts.so
</IfModule>
#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
我应该尝试导航到我的域名成功?
我已经用一些更多的细节重写了我的问题: - 我在同一台服务器上可以正常工作的其他域使用php - 只要其他域正在工作,我就可以正确配置AddHandler和LoadModule。 所以,这似乎不应该是解决方案。 (无论如何,感谢您的尝试) –