Magento 1.7.0.2が新しいサーバーに移動され、製品がカートに追加された後、空白のページが表示されます[終了]


7

私は問題を抱えており、本当に行き詰っています。私は見つけた答えのほとんどを試しましたが、何もうまくいきません。

私の問題:

Magento 1.7.0.2を新しいサーバーに転送しました。

私のホストファイルに、eshopドメインを新しいサーバーIPで表示する行を追加しました(例SERVER.IP www.mydomain.com)

eショップにアクセスして、いくつかのエラーとキャッシュの問題を修正しました。残っている唯一の問題は、カートに商品を追加したときに商品が正常に追加されたにもかかわらず、すべてのページが空白ページになることです。

私のphpのメモリ制限は256MBです。

cpanelにphp.iniがありません。デフォルトのmagento .htaccessだけを追加しました。.htaccessを無効にすると、500エラーが発生します。

これらのツールで確認しました:http : //www.techjam.gr/techjamwp/wp-content/uploads/2012/04/magento-check.zip http://www.techjam.gr/techjamwp/wp-content /uploads/2012/04/magento-cleanup.zip そして、すべてが正しいようです。

index.phpに追加しました

error_reporting(E_ALL&〜E_NOTICE);

空白ページだけでエラーはまったく表示されません。

また、開発者モードをオンにすると、次のメッセージが表示されます。 Notice: Undefined index: themeData in /home/../public_html/app/design/frontend/default/../template/page/html/head.phtml on line 118

<?php

$config = Mage::getStoreConfig('mtcolinusadmin/mtcolinusadmin_appearance'); 
$otherconfig = Mage::getStoreConfig('mtcolinusadmin/otherconfig'); 
$sociallink = Mage::getStoreConfig('mtcolinusadmin/otherconfig/enabled_social_link');
?>
<meta http-equiv="Content-Type" content="<?php echo $this->getContentType() ?>" />
<title><?php echo $this->getTitle() ?></title>
<meta name="description" content="<?php echo htmlspecialchars($this->getDescription()) ?>" />
<meta name="keywords" content="<?php echo htmlspecialchars($this->getKeywords()) ?>" />
<meta name="author" content="Andreadis Homestores" />
<meta name="robots" content="<?php echo htmlspecialchars($this->getRobots()) ?>" />
<?php if($config['theme_responsive']){?>
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
<?php }?>
<link rel="icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
<!--[if lt IE 7]>
<script type="text/javascript">
//<![CDATA[
    var BLANK_URL = '<?php echo $this->helper('core/js')->getJsUrl('blank.html') ?>';
    var BLANK_IMG = '<?php echo $this->helper('core/js')->getJsUrl('spacer.gif') ?>';
//]]>
</script>
<![endif]-->
<?php echo $this->getCssJsHtml() ?>
<?php echo $this->getChildHtml() ?>
<?php echo $this->helper('core/js')->getTranslatorScript() ?>
<?php echo $this->getIncludes() ?> 
<?php if($config['color_panel']){?>  
<script src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'js/magenthemes/mt_colinus/js/mColorPicker.js';?>" type="text/javascript"></script>
<?php }?>
<script>
<?php if($otherconfig['enabled_compare']>0){?>
$mtkb('.mt-actions .link-compare').live('click', function () {
    addCompare($mtkb(this), $mtkb(this).attr('href'), $mtkb(this).attr('data-id'));
    return false;
});  
$mtkb('#block-compare a.btn-remove').live('click', function () {
    removeCompare($mtkb(this).attr('href'));
    return false;
});
$mtkb('.top-compare a.btn-remove').live('click', function () { 
    removeCompare($mtkb(this).attr('href'));
    return false;
});
$mtkb('#block-compare a.btn-remove-all').live('click', function () {
    clearCompare($mtkb(this).attr('href'));
    return false;
});
$mtkb('.top-compare a.btn-remove-all').live('click', function () { 
    clearCompare($mtkb(this).attr('href'));
    return false;
});
<?php }?>
<?php if($otherconfig['enabled_wisthlist']>0){?>
$mtkb('.mt-actions .link-wishlist').live('click', function () {
    addWishlist($mtkb(this), $mtkb(this).attr('href'),$mtkb(this).attr('data-id'));
    return false;
}); 
$mtkb('#block-wisthlist a.btn-remove').live('click', function () {
    removeWishlist($mtkb(this).attr('href'));
    return false;
});
<?php }?>
<?php if($otherconfig['enabled_ajax']){?>
$mtkb(function($) {
    $('.btn-cart').live('click', function () {
        var cart = $('.top-cart'); 
        var pass = true;   
        if($(this).parents("#block-related").length>0 || $(this).parents("#block-upsell").length>0){
            var currentImg = $(this).parents('.content').find('a.product-image img');
        }else{
            if($(this).parents('.product-view').length>0){
                var currentImg = $(this).parents('.product-view').find('a.cloud-zoom img');
            }else{
                var currentImg = $(this).parents('.content').find('a.product-image img');
            } 
        }
        if($(this).parents('.products-list-inner').length>0){
            var eload = $(this).parents('.products-list-inner').find(".ajax-loading-list").show();
        }else{
            var eload = $(this).parents('.top-actions-inner').find(".ajax-loading").show();
        }
        <?php if(Mage::app()->getRequest()->getControllerName() == 'product' && Mage::app()->getRequest()->getActionName() == 'view') {?>
        var qty = parseInt($('#qty').val()); 
        if(!qty>0){
            pass = false;
        } 
        <?php }?> 
        if($('.quickview').length>0){
            pass = false;
        }
        if (currentImg && pass) {
            var imgclone = currentImg.clone()
                .offset({ top:currentImg.offset().top, left:currentImg.offset().left })
                .addClass('imgfly')
                .css({'opacity':'0.7', 'position':'absolute', 'height':'180px', 'width':'180px', 'z-index':'1000'})
                .appendTo($('body'))
                .animate({
                    'top':cart.offset().top + 10,
                    'left':cart.offset().left + 10,
                    'width':55,
                    'height':55
                }, 1000, 'easeInOutExpo'); 
            imgclone.animate({'width':0, 'height':0});
        }
        return false;
    });
});
<?php }?>



</script>
<?php

$themeData = Mage::helper('core')->jsonDecode($_COOKIE['themeData']);

$link_color = isset($themeData['linkColor']) ? $themeData['linkColor'] : $config['link_color'];
$link_hover_color = isset($themeData['linkHoverColor']) ? $themeData['linkHoverColor'] : $config['link_hover_color'];
$link_active_color = isset($themeData['linkActiveColor']) ? $themeData['linkActiveColor'] : $config['link_active_color'];

$text_color = isset($themeData['textColor']) ? $themeData['textColor'] : $config['text_color'];
$bg_color = isset($themeData['bodyColor']) ? $themeData['bodyColor'] : $config['bg_color'];
$body_pattern = isset($themeData['bodyPattern']) ? $themeData['bodyPattern'] : $config['pattern_body_select']; 
$header_pattern = isset($themeData['headerPattern']) ? $themeData['headerPattern'] : $config['pattern_header_select'];
$top_pattern = isset($themeData['topPattern']) ? $themeData['topPattern'] : $config['pattern_top_select'];
$pattern_copyright = isset($themeData['patternCopyright']) ? $themeData['patternCopyright'] : $config['pattern_copyright_select'];
$footer_pattern = isset($themeData['footerPattern']) ? $themeData['footerPattern'] : $config['pattern_footer_select'];

$header_bg_color = isset($themeData['HeaderbgColor']) ? $themeData['HeaderbgColor'] : $config['header_bg_color']; 
$header_link_color = isset($themeData['HeaderlinkColor']) ? $themeData['HeaderlinkColor'] : $config['header_link_color'];
$header_link_hover_color = isset($themeData['HeaderlinkHoverColor']) ? $themeData['HeaderlinkHoverColor'] : $config['header_link_hover_color'];
$header_link_active_color = isset($themeData['HeaderlinkActiveColor']) ? $themeData['HeaderlinkActiveColor'] : $config['header_link_active_color'];
$header_text_color = isset($themeData['HeadertextColor']) ? $themeData['HeadertextColor'] : $config['header_text_color'];

$top_bg_color = isset($themeData['TopbgColor']) ? $themeData['TopbgColor'] : $config['top_bg_color']; 
$top_bg_hover_color = isset($themeData['TopbgHoverColor']) ? $themeData['TopbgHoverColor'] : $config['top_bg_hover_color']; 

$top_link_color = isset($themeData['ToplinkColor']) ? $themeData['ToplinkColor'] : $config['top_link_color'];
$top_link_hover_color = isset($themeData['ToplinkHoverColor']) ? $themeData['ToplinkHoverColor'] : $config['top_link_hover_color'];
$top_link_active_color = isset($themeData['ToplinkActiveColor']) ? $themeData['ToplinkActiveColor'] : $config['top_link_active_color'];
$top_text_color = isset($themeData['ToptextColor']) ? $themeData['ToptextColor'] : $config['top_text_color'];

$icons_bg_color = isset($themeData['IconsbgColor']) ? $themeData['IconsbgColor'] : $config['icons_bg_color'];
$icons_bg_hover_color = isset($themeData['IconsbgHoverColor']) ? $themeData['IconsbgHoverColor'] : $config['icons_bg_hover_color'];

$buttons_bg_color = isset($themeData['ButtonsbgColor']) ? $themeData['ButtonsbgColor'] : $config['buttons_bg_color'];
$buttons_bg_hover_color = isset($themeData['ButtonsbgHoverColor']) ? $themeData['ButtonsbgHoverColor'] : $config['buttons_bg_hover_color'];
$buttons_text_color = isset($themeData['ButtonstextColor']) ? $themeData['ButtonstextColor'] : $config['buttons_text_color'];
$buttons_text_hover_color = isset($themeData['ButtonstextHoverColor']) ? $themeData['ButtonstextHoverColor'] : $config['buttons_text_hover_color'];
$addtocart_bg_color = isset($themeData['AddtocartbgColor']) ? $themeData['AddtocartbgColor'] : $config['addtocart_bg_color'];
$addtocart_bg_hover_color = isset($themeData['AddtocartbgHoverColor']) ? $themeData['AddtocartbgHoverColor'] : $config['addtocart_bg_hover_color'];

$mainmenu_bg_color = isset($themeData['MainmenubgColor']) ? $themeData['MainmenubgColor'] : $config['mainmenu_bg_color'];
$mainmenu_dropdown_bg_color = isset($themeData['MainmenubgDropDownColor']) ? $themeData['MainmenubgDropDownColor'] : $config['mainmenu_dropdown_bg_color'];
$mainmenu_bg_hover_color = isset($themeData['MainmenubgHoverColor']) ? $themeData['MainmenubgHoverColor'] : $config['mainmenu_bg_hover_color']; 
$mainmenu_bg_active_color = isset($themeData['MainmenubgActiveColor']) ? $themeData['MainmenubgActiveColor'] : $config['mainmenu_bg_active_color']; 
$mainmenu_link_color = isset($themeData['MainmenulinkColor']) ? $themeData['MainmenulinkColor'] : $config['mainmenu_link_color'];
$mainmenu_link_hover_color = isset($themeData['MainmenulinkHoverColor']) ? $themeData['MainmenulinkHoverColor'] : $config['mainmenu_link_hover_color'];
$mainmenu_link_active_color = isset($themeData['MainmenulinkActiveColor']) ? $themeData['MainmenulinkActiveColor'] : $config['mainmenu_link_active_color'];
$mainmenu_link_sub_hover_color = isset($themeData['MainmenulinkSubHoverColor']) ? $themeData['MainmenulinkSubHoverColor'] : $config['mainmenu_link_sub_hover_color'];
$mainmenu_text_color = isset($themeData['MainmenutextColor']) ? $themeData['MainmenutextColor'] : $config['mainmenu_text_color'];

$copyright_bg_color = isset($themeData['CopyrightbgColor']) ? $themeData['CopyrightbgColor'] : $config['copyright_bg_color'];
$copyright_text_color = isset($themeData['CopyrighttextColor']) ? $themeData['CopyrighttextColor'] : $config['copyright_text_color'];
$copyright_link_color = isset($themeData['CopyrightlinkColor']) ? $themeData['CopyrightlinkColor'] : $config['copyright_link_color'];
$copyright_link_hover_color = isset($themeData['CopyrightlinkHoverColor']) ? $themeData['CopyrightlinkHoverColor'] : $config['copyright_link_hover_color'];
$copyright_link_active_color = isset($themeData['CopyrightlinkActiveColor']) ? $themeData['CopyrightlinkActiveColor'] : $config['copyright_link_active_color'];

$footer_static_bg_color = isset($themeData['footer_static_bg_color']) ? $themeData['footer_static_bg_color'] : $config['footer_static_bg_color']; 
$footer_static_text_color = isset($themeData['footer_static_text_color']) ? $themeData['footer_static_text_color'] :$config['footer_static_text_color']; 
$footer_static_link_color = isset($themeData['footer_static_link_color']) ? $themeData['footer_static_link_color'] :$config['footer_static_link_color'];
$footer_static_link_hover_color = isset($themeData['footer_static_link_hover_color']) ? $themeData['footer_static_link_hover_color'] :$config['footer_static_link_hover_color'];
$footer_static_link_active_color = isset($themeData['footer_static_link_active_color']) ? $themeData['footer_static_link_active_color'] :$config['footer_static_link_active_color'];

$bfont = isset($themeData['b_font']) ? $themeData['b_font'] : $config['b_font'];
$headerfont = isset($themeData['header_font']) ? $themeData['header_font'] : $config['header_font'];
$mfont = isset($themeData['m_font']) ? $themeData['m_font'] : $config['m_font']; 
$maintopfont = isset($themeData['maintop_font']) ? $themeData['maintop_font'] : $config['maintop_font']; 
$footerfont = isset($themeData['footer_font']) ? $themeData['footer_font'] : $config['footer_font'];
$copyrightfont = isset($themeData['copyright_font']) ? $themeData['copyright_font'] : $config['copyright_font'];

$themestyles = isset($themeData['theme_styles']) ? $themeData['theme_styles'] : $config['theme_styles'];  
?>

このエラーは、IPからmagento eshopにアクセスしようとしたことによるものですか?


質問にhead.phtmlの内容を貼り付けることができる場合は、回答すると役立ちます
Mukesh

質問を編集して追加しました
anastasia.m '19年

themeDataをcookieに設定したコードを確認します
Mukesh

これはどこで確認できますか?
anastasia.m

セッションCookieから問題が発生する可能性はありますか?ファイルが新しいサーバーにある前に明確にしなかったが、PCのホストファイルを変更してファイルにアクセスし、ドメイン名に新しいサーバーのIPを指定した場合。eショップを閲覧すると、すべてがうまく機能しています。しかし、カートに商品を追加すると、すべてのページに空白のページが表示されます。
anastasia.m

回答:


0

同じ問題が発生した場合は、ホストに連絡して、アカウントに設定されているメモリ制限を尋ねます。私の場合、それは低に設定されていたので、phpmemoryに何を設定しても、それでもメモリの下限がありました。


私は専用でwhmにアクセスできます。これを確認するにはどうすればよいですか?
anastasia.m

私にはわからない。いつもホスティング会社に連絡を取り、彼らが解決してくれた。
アンドラス、

私はサーバーの設定でphpのメモリ制限を確認したところ、256Mbに設定されています。増やしましょうか。
anastasia.m

512Mbに設定してみてください。
アンドラス、

1
さて、それは別のものです。申し訳ありません
アンドラス、

0

削除されたhead.phtmlを投稿しました。以下を含む正確な118行目を投稿してください: jsonDecode($_COOKIE['themeData']);

このようなものがある場合は $themeData = jsonDecode($_COOKIE['themeData']); 、次のものに置き換えてください。 $themeData = isset($_COOKIE['themeData']) ? jsonDecode($_COOKIE['themeData']) : array();

弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.