I'm working on a problem and could use some guidance, Receiving the following error: Cannot redeclare class queryFactory in /includes/classes/db/mysql/query_factory.php on line 424. I've searched the forum and have been unable to find a resolution. This is a 1.3.9d install with numerous mods installed (I'm not aware of all of them as numerous people have/do support this site). Some of the more notable are Wordpress on Zencart, Simple SEO URL, Back in stock notifications, advanced shipper, CAPTCHA, sitemap xml, and others. At first this seemed to be related to the CAPTCHA mod which I turned off in the admin. That slowed the number of errors down but didn't stop them. I've used the developers toolkit to make sure the class wasn't defined multiple times. It wasn't . Here's the output from that:
Code:
Searching 1158 files ... for: queryFactory
.../includes/classes/class.phpbb.php
Line #30 : $this->db_phpbb = new queryFactory();
.../includes/classes/db/mysql/query_factory.php
Line #15 : * Queryfactory - A simple database abstraction layer
Line #18 : class queryFactory extends base {
Line #21 : function queryFactory() {
Line #118 : $obj = new queryFactoryResult;
Line #136 : $obj = new queryFactoryResult;
Line #186 : $obj = new queryFactoryResult;
Line #228 : $obj = new queryFactoryResult;
Line #298 : $obj[strtoupper(@mysql_field_name($res, $i))] = new queryFactoryMeta($i, $res);
Line #425 : class queryFactoryResult {
Line #427 : function queryFactoryResult() {
Line #491 : class queryFactoryMeta {
Line #493 : function queryFactoryMeta($zp_field, $zp_res) {
.../includes/classes/yclass.php
Line #32 : if($this->is_obj($db_result,'queryFactoryResult')){
Line #52 : if($this->is_obj($db_result,'queryFactoryResult')){
.../includes/functions/functions_general.php
Line #662 : } elseif( is_a( $value, 'queryFactoryResult' ) ) {
.../includes/functions/sessions.php
Line #58 : $db = new queryFactory();
.../includes/init_includes/init_database.php
Line #18 : $db = new queryFactory();
.../admin/includes/functions/general.php
Line #385 : } elseif( is_a( $value, 'queryFactoryResult' ) ) {
.../admin/includes/init_includes/init_database.php
Line #16 : // Load queryFactory db classes
Line #18 : $db = new queryFactory();
.../admin/thubservice.php
Line #64 : $db = new queryFactory();
Match Lines found: 22
I replaced includes/classes/db/mysql/query_factory.php with the original file from 1.3.9d to make sure it wasn't corrupted. That had no effect. The interesting thing is that the error always refers to line 424 as containing the error. In both the original file and the one that existed on the server line 424 does not contain a class definition.
PHP Code:
class queryFactoryResult {
function queryFactoryResult() {
$this->is_cached = false;
}
function MoveNext() {
global $zc_cache;
$this->cursor++;
if ($this->is_cached) {
//THE FOLLOWING LINE IS 424
if ($this->cursor >= sizeof($this->result)) {
$this->EOF = true;
} else {
while(list($key, $value) = each($this->result[$this->cursor])) {
$this->fields[$key] = $value;
}
}
} else {
$zp_result_array = @mysql_fetch_array($this->resource);
if (!$zp_result_array) {
$this->EOF = true;
} else {
while (list($key, $value) = each($zp_result_array)) {
if (!preg_match('/^[0-9]/', $key)) {
$this->fields[$key] = $value;
}
}
}
}
}
Any suggestions on how to proceed with debugging this?
Bookmarks