1

Topic: MySqli problem

Hello,

I have a strange problem with Mysqli only under admin_* scripts.

AS far as i know regular user scripts running with no errors.

I have error on simple selects statement returning no result causing the script to report error with no error.

example:

//debug var dump($db) to see if i have a connection

object(DBLayer)#6 (5) { ["prefix"]=>  string(0) "" ["link_id"]=>  object(mysqli)#7 (0) { } ["query_result"]=>  NULL ["saved_queries"]=>  array(0) { } ["num_queries"]=>  int(0) }

An error was encountered
File: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\wibizz\htdocs\app\plugins\forums\admin_forums.php
Line: 47

PunBB reported: Unable to create forum

Database reported:


As you can see no error is reported query return bool(false)

The only fix i found was:

/**
  * *fix without it the query fails
  */

    unset($db);
    $db = new DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect);

I can't even release the result or the link because i get error : Can't fetch mysqli ....

It's going to terrible if i need to add this bug fix to all admin_* files

Any idea?

Thanks,

Assaf

2

Re: MySqli problem

Hi again,

Things getting worse.

There files that run more then one function , like cache.php, there i need bug fix for each function.

I have search for known bug, found some semiliar problems but not exact and no one admit it's a bug.

My question is what is different between user scripts and admin scripts?
Is there a point of failure know to anybody?

Help will be appreciated, very very much,

Assaf

Re: MySqli problem

I have never heard of anything like this, although I assume it has something to do with how you're integrating PunBB into cakephp.
Could you post your code?