User login

Backtrace for a weird db_escape_string error on a very old Drupal 4.7 site

<?php
/**
 * Prepare user input for use in a database query, preventing SQL injection attacks.
 */
function db_escape_string($text) {
  global $active_db;
  if (is_array($text)) {  // three lines added for testing
    drupal_set_message('<pre>'. var_export(debug_backtrace(),TRUE) .'</pre>');
  }
  return mysql_real_escape_string($text, $active_db);
}

array (
  0 =>
  array (
    'file' => '/home/zingspac/public_html/auction2008/includes/database.inc',
    'line' => 152,
    'function' => 'db_escape_string',
    'args' =>
    array (
      0 =>
      array (
      ),
    ),
  ),
  1 =>
  array (
    'function' => '_db_query_callback',
    'args' =>
    array (
      0 =>
      array (
        0 => '%s',
        1 => '%s',
      ),
    ),
  ),
  2 =>
  array (
    'file' => '/home/zingspac/public_html/auction2008/modules/contributed/views-4.7.x-1.6/views/views_query.inc',
    'line' => 678,
    'function' => 'preg_replace_callback',
    'args' =>
    array (
      0 => '/(%d|%s|%%|%f|%b)/',
      1 => '_db_query_callback',
      2 => 'SELECT node.nid, rand() AS random_sort FROM {node} node  LEFT JOIN {nodequeue_nodes} nodequeue_nodes ON node.nid = nodequeue_nodes.nid WHERE (%s.%s %s \'%s\')  ORDER BY random_sort ASC',
    ),
  ),
  3 =>
  array (
    'file' => '/home/zingspac/public_html/auction2008/modules/contributed/views-4.7.x-1.6/views/views.module',
    'line' => 290,
    'function' => '_views_replace_args',
    'args' =>
    array (
      0 => 'SELECT node.nid, rand() AS random_sort FROM {node} node  LEFT JOIN {nodequeue_nodes} nodequeue_nodes ON node.nid = nodequeue_nodes.nid WHERE (%s.%s %s \'%s\')  ORDER BY random_sort ASC',
      1 =>
      array (
        0 => 'nodequeue_nodes',
        1 => 'qid',
        2 => 'OR',
        3 =>
        array (
        ),
      ),
    ),
  ),
  4 =>
  array (
    'file' => '/home/zingspac/public_html/auction2008/modules/contributed/views-4.7.x-1.6/views/views.module',
    'line' => 777,
    'function' => '_views_get_query',
    'args' =>
    array (
      0 =>
      stdClass::__set_state(array(
         'vid' => '9',
         'name' => 'Featured_Items',
         'description' => 'Random featured item from nodequeue\'s featured item list.',
         'access' =>
        array (
        ),
         'page' => '1',
         'page_title' => 'Featured Items',
         'page_header' => '',
         'page_header_format' => '1',
         'page_empty' => 'No featured items at this time.',
         'page_empty_format' => '1',
         'page_footer' => '',
         'page_footer_format' => '1',
         'page_type' => 'node',
         'use_pager' => false,
         'nodes_per_page' => '20',
         'url' => 'featured',
         'menu' => '1',
         'menu_tab' => '0',
         'menu_tab_default' => '0',
         'menu_tab_weight' => '0',
         'menu_title' => 'Featured',
         'block' => '1',
         'block_title' => 'Featured Item',
         'block_use_page_header' => '0',
         'block_header' => '',
         'block_header_format' => '1',
         'block_use_page_footer' => '0',
         'block_footer' => '',
         'block_footer_format' => '1',
         'block_use_page_empty' => '0',
         'block_empty' => '',
         'block_empty_format' => '1',
         'block_type' => 'node',
         'nodes_per_block' => '1',
         'block_more' => '0',
         'breadcrumb_no_home' => '0',
         'changed' => '1160569231',
         'view_args_php' => '',
         'is_cacheable' => '1',
         'sort' =>
        array (
          0 =>
          array (
            'vid' => '9',
            'position' => '0',
            'field' => 'node.random',
            'sortorder' => 'ASC',
            'options' => '',
            'tablename' => NULL,
            'id' => 'node.random',
          ),
        ),
         'argument' =>
        array (
        ),
         'field' =>
        array (
        ),
         'filter' =>
        array (
          0 =>
          array (
            'vid' => '9',
            'tablename' => '',
            'field' => 'nodequeue_nodes.qid',
            'value' =>
            array (
            ),
            'operator' => 'OR',
            'options' => '',
            'position' => '0',
            'id' => 'nodequeue_nodes.qid',
          ),
        ),
         'exposed_filter' =>
        array (
        ),
         'build_type' => 'block',
         'type' => 'node',
         'pager_limit' => '1',
         'current_page' => 0,
         'offset' => 0,
         'used_filters' =>
        array (
        ),
         'args' =>
        array (
        ),
      )),
      1 =>
      array (
      ),
      2 =>
      array (
      ),
    ),
  ),
  5 =>
  array (
    'file' => '/home/zingspac/public_html/auction2008/modules/contributed/views-4.7.x-1.6/views/views.module',
    'line' => 682,
    'function' => 'views_build_view',
    'args' =>
    array (
      0 => 'block',
      1 =>
      stdClass::__set_state(array(
         'vid' => '9',
         'name' => 'Featured_Items',
         'description' => 'Random featured item from nodequeue\'s featured item list.',
         'access' =>
        array (
        ),
         'page' => '1',
         'page_title' => 'Featured Items',
         'page_header' => '',
         'page_header_format' => '1',
         'page_empty' => 'No featured items at this time.',
         'page_empty_format' => '1',
         'page_footer' => '',
         'page_footer_format' => '1',
         'page_type' => 'node',
         'use_pager' => false,
         'nodes_per_page' => '20',
         'url' => 'featured',
         'menu' => '1',
         'menu_tab' => '0',
         'menu_tab_default' => '0',
         'menu_tab_weight' => '0',
         'menu_title' => 'Featured',
         'block' => '1',
         'block_title' => 'Featured Item',
         'block_use_page_header' => '0',
         'block_header' => '',
         'block_header_format' => '1',
         'block_use_page_footer' => '0',
         'block_footer' => '',
         'block_footer_format' => '1',
         'block_use_page_empty' => '0',
         'block_empty' => '',
         'block_empty_format' => '1',
         'block_type' => 'node',
         'nodes_per_block' => '1',
         'block_more' => '0',
         'breadcrumb_no_home' => '0',
         'changed' => '1160569231',
         'view_args_php' => '',
         'is_cacheable' => '1',
         'sort' =>
        array (
          0 =>
          array (
            'vid' => '9',
            'position' => '0',
            'field' => 'node.random',
            'sortorder' => 'ASC',
            'options' => '',
            'tablename' => NULL,
            'id' => 'node.random',
          ),
        ),
         'argument' =>
        array (
        ),
         'field' =>
        array (
        ),
         'filter' =>
        array (
          0 =>
          array (
            'vid' => '9',
            'tablename' => '',
            'field' => 'nodequeue_nodes.qid',
            'value' =>
            array (
            ),
            'operator' => 'OR',
            'options' => '',
            'position' => '0',
            'id' => 'nodequeue_nodes.qid',
          ),
        ),
         'exposed_filter' =>
        array (
        ),
         'build_type' => 'block',
         'type' => 'node',
         'pager_limit' => '1',
         'current_page' => 0,
         'offset' => 0,
         'used_filters' =>
        array (
        ),
         'args' =>
        array (
        ),
      )),
      2 =>
      array (
      ),
      3 => false,
      4 => '1',
    ),
  ),
  6 =>
  array (
    'file' => '/home/zingspac/public_html/auction2008/modules/contributed/views-4.7.x-1.6/views/views.module',
    'line' => 593,
    'function' => 'views_view_block',
    'args' =>
    array (
      0 => 'Featured_Items',
    ),
  ),
  7 =>
  array (
    'function' => 'views_block',
    'args' =>
    array (
      0 => 'view',
      1 => 'Featured_Items',
    ),
  ),
  8 =>
  array (
    'file' => '/home/zingspac/public_html/auction2008/includes/module.inc',
    'line' => 183,
    'function' => 'call_user_func_array',
    'args' =>
    array (
      0 => 'views_block',
      1 =>
      array (
        0 => 'view',
        1 => 'Featured_Items',
      ),
    ),
  ),
  9 =>
  array (
    'file' => '/home/zingspac/public_html/auction2008/modules/block.module',
    'line' => 653,
    'function' => 'module_invoke',
    'args' =>
    array (
      0 => 'views',
      1 => 'block',
      2 => 'view',
      3 => 'Featured_Items',
    ),
  ),
  10 =>
  array (
    'file' => '/home/zingspac/public_html/auction2008/includes/theme.inc',
    'line' => 936,
    'function' => 'block_list',
    'args' =>
    array (
      0 => 'left',
    ),
  ),
  11 =>
  array (
    'function' => 'theme_blocks',
    'args' =>
    array (
      0 => 'left',
    ),
  ),
  12 =>
  array (
    'file' => '/home/zingspac/public_html/auction2008/includes/theme.inc',
    'line' => 166,
    'function' => 'call_user_func_array',
    'args' =>
    array (
      0 => 'theme_blocks',
      1 =>
      array (
        0 => 'left',
      ),
    ),
  ),
  13 =>
  array (
    'file' => '/home/zingspac/public_html/auction2008/themes/engines/phptemplate/phptemplate.engine',
    'line' => 160,
    'function' => 'theme',
    'args' =>
    array (
      0 => 'blocks',
      1 => 'left',
    ),
  ),
  14 =>
  array (
    'function' => 'phptemplate_page',
    'args' =>
    array (
      0 => '
?>

Resolution

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.