500错误/分段错误 - Magento

时间:2013-09-23 17:03:15

标签: php mysql sql magento

我遇到某个页面上500错误的问题:http://www.artevolution.com/shop/abstract.html?p=9

这是我得到的支持票:

看起来分段错误发生在以下查询中:

SELECT `_default_table`.`entity_id`,
       `_default_table`.`entity_type`,
       Ifnull(_store_table.code_id, _default_table.code_id)
       AS `code_id`,
       Ifnull(_store_table.store_id, _default_table.store_id)
       AS `store_id`,
       Ifnull(_store_table.control_script, _default_table.control_script)
       AS
       `control_script`,
       Ifnull(_store_table.tracking_script, _default_table.tracking_script)
       AS
       `tracking_script`,
       Ifnull(_store_table.conversion_script, _default_table.conversion_script)
       AS
       `conversion_script`,
       Ifnull(_store_table.conversion_page, _default_table.conversion_page)
       AS
       `conversion_page`,
       Ifnull(_store_table.additional_data, _default_table.additional_data)
       AS
       `additional_data`
FROM   `googleoptimizer_code` AS `_default_table`
       LEFT JOIN `googleoptimizer_code` AS `_store_table`
              ON _store_table.entity_id = _default_table.entity_id
                 AND _store_table.entity_type = _default_table.entity_type
                 AND _store_table.store_id = 2
WHERE  ( _default_table.entity_id = '' )
       AND ( _default_table.entity_type = 'category' )
       AND ( _default_table.store_id IN ( 0, '2' ) )
ORDER  BY `_default_table`.`store_id` DESC
LIMIT  1; 

您希望让开发人员查看生成此查询的内容,以及我提到的其他三个查询(为方便起见,我将在下面再次提供这些查询),看看他们是否可以查明代码中发生了什么(可能导致查询循环)。查询如下:

SELECT `catalog_category_entity`.*
FROM   `catalog_category_entity`
WHERE  ( entity_id = '' ); 
SELECT `attr_table`.*
FROM   `catalog_category_entity_varchar` AS `attr_table`
WHERE  ( attr_table.entity_id = '' )
       AND ( attr_table.store_id IN ( 0, '2' ) )
UNION
SELECT `attr_table`.*
FROM   `catalog_category_entity_int` AS `attr_table`
WHERE  ( attr_table.entity_id = '' )
       AND ( attr_table.store_id IN ( 0, '2' ) )
UNION
SELECT `attr_table`.*
FROM   `catalog_category_entity_text` AS `attr_table`
WHERE  ( attr_table.entity_id = '' )
       AND ( attr_table.store_id IN ( 0, '2' ) )
UNION
SELECT `attr_table`.*
FROM   `catalog_category_entity_datetime` AS `attr_table`
WHERE  ( attr_table.entity_id = '' )
       AND ( attr_table.store_id IN ( 0, '2' ) )
ORDER  BY `store_id` ASC; 
SELECT `_default_table`.`entity_id`,
       `_default_table`.`entity_type`,
       Ifnull(_store_table.code_id, _default_table.code_id)
       AS `code_id`,
       Ifnull(_store_table.store_id, _default_table.store_id)
       AS `store_id`,
       Ifnull(_store_table.control_script, _default_table.control_script)
       AS
       `control_script`,
       Ifnull(_store_table.tracking_script, _default_table.tracking_script)
       AS
       `tracking_script`,
       Ifnull(_store_table.conversion_script, _default_table.conversion_script)
       AS
       `conversion_script`,
       Ifnull(_store_table.conversion_page, _default_table.conversion_page)
       AS
       `conversion_page`,
       Ifnull(_store_table.additional_data, _default_table.additional_data)
       AS
       `additional_data`
FROM   `googleoptimizer_code` AS `_default_table`
       LEFT JOIN `googleoptimizer_code` AS `_store_table`
              ON _store_table.entity_id = _default_table.entity_id
                 AND _store_table.entity_type = _default_table.entity_type
                 AND _store_table.store_id = 2
WHERE  ( _default_table.entity_id = '' )
       AND ( _default_table.entity_type = 'category' )
       AND ( _default_table.store_id IN ( 0, '2' ) )
ORDER  BY `_default_table`.`store_id` DESC
LIMIT  1; 

我还在服务器的以下位置放置了strace的副本以及来自strace的相关查询: http://deathbecomesher.ca/artevo/segFaultPageLoadQueries.txt http://deathbecomesher.ca/artevo/segFaultPageLoadStrace.txt

有没有人有关于如何解决这个问题的想法?我是一个新的开发人员,不知道如何继续。非常感谢您的阅读。

0 个答案:

没有答案