Download & Extend

DOCTYPE ON: mysqli_real_escape_string() expects parameter 1 (endless row of errors)

Project:Resource Description Framework (RDF)
Version:6.x-1.0-alpha7
Component:API compatibility
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Issue tags:dblog, DOCTYPE, error, MySQLi, mysqli.inc, mysqli_real_escape_string, output, parameter, RDF, RDFa, xhtml+rdfa

Issue Summary

This here is an absolutely serious issue/bug report: As soon as I switch on the doctype-checkbox under/below "Output an XHTML+RDFa DOCTYPE:" on "/admin/settings/rdf", I get -- in the dblog/ex-watchdog module -- an endless row of the error message below:

- mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in /linux-directory/httpd/websites/example.com/includes/database.mysqli.inc in Zeile 323.
- [...]

Comments

#1

I also get these errors as soon as the RDF module is enabled.

#2

Version:6.x-1.x-dev» 6.x-1.0-alpha7

I received a similar error, when I enabled the RDFa namespaces. The details of the error output are similar to the following:

Type php
Date Monday, April 12, 2010 - 10:35
User Visitor
Location http://www.pagevisions.com/admin/settings
Referrer
http://www.pagevisions.com/admin/build
Message
mysqli_query() expects parameter 1 to be mysqli, null given in /home/monica1205/pagevisions.com/includes/database.mysqli.inc on line 108.
Severity error
Hostname 75.230.228.252
Operations

A key to the error is that I was actually running as the id 1, and not an anonymous visitor.

The backtrace from the Trace module for one of the errors is:

#879950d1 T+0.314312 [WARNING] E_WARNING: mysqli_query() expects parameter 1 to be mysqli, null given in `includes/database.mysqli.inc
':108
                               $result = mysqli_query($active_db, $query);
                               mysqli_query(NULL, 'SELECT v.prefix, v.uri FROM rdf_namespaces v') in `includes/database.mysqli.inc':10
8
                               _db_query('SELECT v.prefix, v.uri FROM rdf_namespaces v') in `includes/database.mysql-common.inc':42
                               db_query('SELECT v.prefix, v.uri FROM {rdf_namespaces} v') in `sites/all/modules/rdf/rdf.db.inc':18
                               rdf_db_rdf_namespaces() in `sites/all/modules/rdf/rdf.module':620
                               rdf_rdf_namespaces()
                               call_user_func_array('rdf_rdf_namespaces', array()) in `includes/module.inc':483
                               module_invoke_all('rdf_namespaces') in `sites/all/modules/rdf/rdf.api.inc':916
                               rdf_get_namespaces('rdfa') in `sites/all/modules/rdf/rdf.module':844
                               _rdf_ob_handler_insert_namespaces('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\
n  <head>\n<meta http-equiv="Conte'...) in `sites/all/modules/rdf/rdf.module':802
                               _rdf_ob_handler('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n  "http://www.w3.org/TR/xhtm
l1/DTD/xhtml1-s'..., 5)

#3

... any new conclusions so far?

#4

Same here when I enable "Output an XHTML+RDFa DOCTYPE: " I begin to get this error on pages, regardless of permission level.

mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in database.mysqli.inc on line 323

I am using RDF module 1.0-alpha-7 with Drupal 6.17.
I am also using the RDF/XML format
I am also storing 1 local repository.

Don't know if this helps, hopefully we can find a commonality within our situations.