Drupal - 白色屏幕死亡 [英] Drupal - White Screen Of Death

查看:88
本文介绍了Drupal - 白色屏幕死亡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚改变的主题与drupal,我留下了白色的死亡屏幕。工作的默认主题是禅。这存储在 sites / mysite.com / themes
下主题我改变为我认为是 themes /
无法访问数据库。有FTP访问
有什么办法可以更改主题或安装一个可以正常使用的主题吗?

解决方案

解决问题的最简单的方法要找到什么问题。



转到index.php,并在<?php

  ini_set('display_errors',1); 
error_reporting(E_ALL | E_STRICT);

然后在此发布错误。
完成后不要忘记评论/删除。



编辑



如果我理解正确,这是您在进行WSOD之前所做的。


  1. 您正在使用Zen主题。 li>
  2. 您以管理员权限登录到您的网站,并转到 http://yoursite.com/admin

  3. 你去主题管理,把你的主题改成另一个(以后称之为theme_b)

  4. 刷新时页面(或者到您网站的其他页面)您获得了WSOD。



如果这是真的,请按照下列步骤操作:



创建一个空白的主题。
为此,在您的计算机中创建一个名为theme_b的文件夹。



内部创建以下文件:
theme_b.info,template。 php,style.css和page.tpl.php



打开theme_b.info并粘贴:

  name = theme_b 
description = bla
version = 1
core = 6.x
engine = phptemplate
stylesheets [all] [] = style.css

保存。



打开page.tpl.php并粘贴:

 code><!DOCTYPE html> 
< html>
< head>
< meta charset =utf-8/>
<?php print $ head?>
< title><?php print $ head_title?>< / title>
<?php print $ styles?>
<?php print $ scripts?>
< / head>
< body>
< div><?php print theme('links',$ primary_links,array('class'=>'links primary-links'))>< / div>
< div><?php print theme('links',$ secondary_links,array('class'=>'links secondary-links'))>< / div>
< div id =sidebar-leftclass =sidebar><?php print $ left?>< / div>
< div>
<?php if($ tabs):print'< div id =tabs-wrapperclass =clear-block>';万一; ?>
<?php if($ title):print'< h2'。 ($ tabs?'class =with-tabs':'')。'>'。 $ title。'< / h2>';万一; ?>
<?php if($ tabs):print'< ul class =tabs primary>'。 $ tab。'< / ul>< / div>';万一; ?>
<?php if($ tabs2):print'< ul class =tabs secondary>'。 $ tabs2。'< / ul>';万一; ?>
<?php if($ show_messages&& $ messages):print $ messages;万一; ?>
<?php print $ help; ?>
< / div>
< div>
<?php print $ content; ?>
< / div>
< / body>
< / html>

保存。



然后上传文件夹theme_a到sites / yoursite.com / themes替换现有的theme_a文件夹。



这应该可以让您访问drupal的管理部分。


Just changed themes with drupal and I'm left with white screen of death. Default theme which worked was Zen. This is stored under sites/mysite.com/themes Theme I changed to I think is one of the themes under themes/ Don't have access to the database. Have FTP access. Is there any way to change themes or install one that will work?

解决方案

The easiest way to correct your problem is to find what's wrong.

go to index.php and add the following lines after <?php

ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);

Then post the error here. Don't forget to comment/remove when you're done.

EDIT:

If I understood correctly this was what you did before going WSOD.

  1. You were using Zen theme.
  2. You logged into your site with administrator privileges and went to http://yoursite.com/admin
  3. You went to the theme management and changed your theme to another one (henceforth refered as "theme_b")
  4. When refreshed the page (or went to another page in your site) you got the WSOD.

.

If this is true then follow these steps:

Create a blank theme. In order to do this, create a folder in your computer named "theme_b".

Inside create the following files: theme_b.info, template.php, style.css and page.tpl.php

Open theme_b.info and paste this:

name = theme_b
description = bla
version = 1
core = 6.x
engine = phptemplate
stylesheets[all][] = style.css

Save.

Open page.tpl.php and paste this:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <?php print $head ?>
    <title><?php print $head_title ?></title>
    <?php print $styles ?>
    <?php print $scripts ?>
</head>
<body>
<div><?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?></div>
<div><?php print theme('links', $secondary_links, array('class' => 'links secondary-links')) ?></div>
<div id="sidebar-left" class="sidebar"><?php print $left ?></div>
<div>
<?php if ($tabs): print '<div id="tabs-wrapper" class="clear-block">'; endif; ?>
<?php if ($title): print '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>'; endif; ?>
<?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul></div>'; endif; ?>
<?php if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif; ?>
<?php if ($show_messages && $messages): print $messages; endif; ?>
<?php print $help; ?>
</div>
<div>
<?php print $content; ?>
</div>
</body>
</html>

Save.

Then upload the folder theme_a to sites/yoursite.com/themes replacing existing theme_a folder.

This should enable you to access admin section of drupal.

这篇关于Drupal - 白色屏幕死亡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆