如何调试、排错zen cart网店(出现空白页面)?

Zen Cart说明文件,安装指南和使用手册等等。可以回复,不能发新贴。

版主: 17412718

版面规则
新手必读栏目。本版面不能发新贴,可以回复

Re: 如何调试、排错zen cart网店(出现空白页面)?

帖子zencarter » 2011-11-12 22:02

错误提示应该在页面最后几行
头像
zencarter
VIP会员
VIP会员
 
帖子: 536
注册: 2011-06-22 15:03
地址: zencart建站 模板 产品采集 支付宝担保交易 http://t.qq.com/wb631992791
QQ 帐号: 631992791

Re: 如何调试、排错zen cart网店(出现空白页面)?

帖子tianya518 » 2011-11-14 21:12

我的网站迁移后在注册的时候出现空白。是提交注册信息后发生的, 虽然空白了,但是还是注册成功了,因为输入首页地址,显示的是刚注册的用户已经是登录状态,不过用这个用户再登录时提交登录信息后也是空白,打开了错误提示也没有错误提示的信息,在cache目录下也没有mydebug-xxx.log的前台日志文件,现在无从查找问题出在哪里了,大家帮帮忙吧!!!
tianya518
中级会员
中级会员
 
帖子: 65
注册: 2010-04-03 12:22

Re: 如何调试、排错zen cart网店(出现空白页面)?

帖子zencarter » 2011-12-30 16:33

tianya518 写道:我的网站迁移后在注册的时候出现空白。是提交注册信息后发生的, 虽然空白了,但是还是注册成功了,因为输入首页地址,显示的是刚注册的用户已经是登录状态,不过用这个用户再登录时提交登录信息后也是空白,打开了错误提示也没有错误提示的信息,在cache目录下也没有mydebug-xxx.log的前台日志文件,现在无从查找问题出在哪里了,大家帮帮忙吧!!!


通常情况是因为源代码首尾有空白行造成的。
用Dreamweaver,点编辑-查找和替换,然后选文件夹,只需要处理includes文件夹就能解决这一问题。
然后选源代码,而且选中使用正则表达式的复选框,最后选择替换全部。
用正则表达式删除首尾空白行
^[\s| ]*\n|\n[\s| ]*$
全部替换为空



zencarter
头像
zencarter
VIP会员
VIP会员
 
帖子: 536
注册: 2011-06-22 15:03
地址: zencart建站 模板 产品采集 支付宝担保交易 http://t.qq.com/wb631992791
QQ 帐号: 631992791

Re: 如何调试、排错zen cart网店(出现空白页面)?

帖子meichen666 » 2012-01-10 23:03

学习了
meichen666
初来乍到
初来乍到
 
帖子: 2
注册: 2012-01-10 22:41

Re: 如何调试、排错zen cart网店(出现空白页面)?

帖子kayako » 2012-02-07 18:42

登陆页面空白,IE浏览器排错,还有其他问题,用这个显示问题了发现提示如下:

Warning: Cannot modify header information - headers already sent by (output started at /home/content/u/h/h/uhh403/html/index.php:1) in /home/content/u/h/h/uhh403/html/includes/functions/functions_general.php on line 776

Warning: Cannot modify header information - headers already sent by (output started at /home/content/u/h/h/uhh403/html/index.php:1) in /home/content/u/h/h/uhh403/html/includes/init_includes/init_templates.php on line 78

Warning: Cannot modify header information - headers already sent by (output started at /home/content/u/h/h/uhh403/html/index.php:1) in /home/content/u/h/h/uhh403/html/includes/functions/functions_general.php on line 45

可是这些文件都没有改过啊,不知道是怎么问题,高手请看看代码:


functions_general.php on line 776:以下是759--789的代码

代码: 全选
    if ( ($operator_count < $keyword_count) && ($balance == 0) ) {

      return true;

    } else {

      return false;

    }

  }





////

// Check date

  function zen_checkdate($date_to_check, $format_string, &$date_array) {

    $separator_idx = -1;



    $separators = array('-', ' ', '/', '.');

    $month_abbr = array('jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec');

    $no_of_days = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);



init_templates.php on line 78:

代码: 全选
  $template_query = $db->Execute($sql);

  if ($template_query->RecordCount() > 0) {

    $template_dir = $template_query->fields['template_dir'];

  }



/**

* The actual template directory to use

*/

  define('DIR_WS_TEMPLATE', DIR_WS_TEMPLATES . $template_dir . '/');

/**

* The actual template images directory to use

*/

  define('DIR_WS_TEMPLATE_IMAGES', DIR_WS_TEMPLATE . 'images/');

/**

* The actual template icons directory to use

*/

  define('DIR_WS_TEMPLATE_ICONS', DIR_WS_TEMPLATE_IMAGES . 'icons/');




这个是functions_general.php on line 45:


代码: 全选
if (!defined('IS_ADMIN_FLAG')) {

  die('Illegal Access');

}

/**

* Stop from parsing any further PHP code

*/

  function zen_exit() {

   session_write_close();

   exit();

  }



/**

* Redirect to another page or site

* @param string The url to redirect to

*/

  function zen_redirect($url, $httpResponseCode = '') {

    global $request_type;

    // Are we loading an SSL page?

    if ( (ENABLE_SSL == true) && ($request_type == 'SSL') ) {

      // yes, but a NONSSL url was supplied

      if (substr($url, 0, strlen(HTTP_SERVER . DIR_WS_CATALOG)) == HTTP_SERVER . DIR_WS_CATALOG) {

        // So, change it to SSL, based on site's configuration for SSL

        $url = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . substr($url, strlen(HTTP_SERVER . DIR_WS_CATALOG));

      }

    }



  // clean up URL before executing it

    while (strstr($url, '&&')) $url = str_replace('&&', '&', $url);

    while (strstr($url, '&amp;&amp;')) $url = str_replace('&amp;&amp;', '&amp;', $url);

    // header locates should not have the &amp; in the address it breaks things

    while (strstr($url, '&amp;')) $url = str_replace('&amp;', '&', $url);


帮忙看看哪里出问题了?
kayako
普通会员
普通会员
 
帖子: 29
注册: 2011-04-27 23:51

Re: 如何调试、排错zen cart网店(出现空白页面)?

帖子zyhivan » 2012-02-13 10:31

留个记号
头像
zyhivan
新手上路
新手上路
 
帖子: 9
注册: 2010-05-15 22:54
QQ 帐号: 494128550

Re: 如何调试、排错zen cart网店(出现空白页面)?

帖子zen_carts » 2012-02-14 9:20

学习 了...
zen_carts
初来乍到
初来乍到
 
帖子: 2
注册: 2012-02-14 9:16

Re: 如何调试、排错zen cart网店(出现空白页面)?

帖子jjessie » 2012-02-24 18:10

我的网站点击所有的按钮或者注册提交都出现空白页,
排错方法后显示
Warning: Cannot modify header information - headers already sent by (output started at /home/******/public_html/includes/languages/french.php:1) in /home/******/public_html/includes/init_includes/init_templates.php on line 78

line 78代码: header("Content-Type: text/html; charset=" . CHARSET);

Warning: Cannot modify header information - headers already sent by (output started at /home/******/public_html/includes/languages/french.php:1) in /home/******/public_html/includes/functions/functions_general.php on line 45
line 78代码 : header('Location: ' . $url);

请问这个要怎么修改呢?谢谢!
jjessie
普通会员
普通会员
 
帖子: 31
注册: 2011-11-16 14:53

Re: 如何调试、排错zen cart网店(出现空白页面)?

帖子jjessie » 2012-02-24 18:30

我的网站点击所有的按钮或者注册提交都出现空白页,
排错方法后显示
1. Warning: Cannot modify header information - headers already sent by (output started at /home/******/public_html/includes/languages/french.php:1) in /home/******/public_html/includes/init_includes/init_templates.php on line 78
代码如下:
include_once(DIR_WS_LANGUAGES . $_SESSION['language'] . '.php');


/**
* send the content charset "now" so that all content is impacted by it
*/
line 78代码: header("Content-Type: text/html; charset=" . CHARSET);

/**
* include the extra language definitions
*/
include(DIR_WS_MODULES . 'extra_definitions.php');
?>

2.
Warning: Cannot modify header information - headers already sent by (output started at /home/******/public_html/includes/languages/french.php:1) in /home/******/public_html/includes/functions/functions_general.php on line 45
代码如下:
// header locates should not have the &amp; in the address it breaks things
while (strstr($url, '&amp;')) $url = str_replace('&amp;', '&', $url);

if ($httpResponseCode == '') {
line 78代码 header('Location: ' . $url);
session_write_close();
} else {
header('Location: ' . $url, TRUE, (int)$httpResponseCode);
session_write_close();
}

exit();

请问这个要怎么修改呢?谢谢!
jjessie
普通会员
普通会员
 
帖子: 31
注册: 2011-11-16 14:53

Re: 如何调试、排错zen cart网店(出现空白页面)?

帖子jjessie » 2012-02-24 19:39

Jack:
public_html/includes/languages/french.php:1 是说这个文件第一行有错吗,但是我还原 本网站下载的原文件后,页面就出现Internal Server Error。
因为上传法语语言包后详细页面图片显示不了,在论坛查找,改了french.php中296行
把define('TEXT_CLICK_TO_ENLARGE', 'Agrandir l\'image'); 改成 define('TEXT_CLICK_TO_ENLARGE', 'Agrandir l\\\'image');

请问这是什么原因,请Jack和各位朋友帮忙看下。(还有上面两个点击所有按钮出现空白的问题)谢谢!
jjessie
普通会员
普通会员
 
帖子: 31
注册: 2011-11-16 14:53

上一页下一页

回到 新手上路

在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客