在Drupal安装中,它将根PHP文件显示为下面的纯文本。a2enmod表示启用了php5,智能表示安装了libasache2-mod-php5,启用了mods/有php5.conf和php5.load,VirtualHost指定了DirectoryIndex和ScriptHandler。这有点像政府经济学家的电脑病毒:你能找到的每一个指标都表明你的系统很好,但它不起作用。我还应该怎么做才能启动这个Drupal 7站点?
显示的页面如下:
<?php
/**
* @file
* The PHP page that serves all page requests on a Drupal installation.
*
* The routines here dispatch control to the appropriate handler, which then
* prints the appropriate page.
*
* All Drupal code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
/**
* Root directory of Drupal installation.
*/
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
menu_execute_active_handler();发布于 2013-07-13 21:35:03
这听起来像是apache没有正确配置来运行php脚本。
检查这两行文件中的任何一个( /etc/httpd/conf.d/php.conf或/etc/httpd/conf/httpd.conf )
AddHandler php5-script .php
AddType text/html .php然后重新启动apache
service httpd restart
发布于 2014-08-02 18:40:30
只是遇到了同样的问题,尽管Drupal没有问题--最终发现了short_open_tag参数,这个参数现在显然默认为"Off“--我的应用程序完全使用简短的打开标记编写。把它改为short_open_tag = On,它马上就出现了。
https://serverfault.com/questions/523131
复制相似问题