Open Source Training Seminar FreePBX Paid Support

Ticket #2829 (closed Bugs: fixed)

Opened 3 months ago

Last modified 1 month ago

Reports fail: Call to undefined method DB_Error::numRows()

Reported by: jonnywifi Assigned to:
Priority: major Milestone: 2.5
Component: Reports Version: 2.4-branch
Keywords: DB_Error, numRows Cc:
Confirmation: Need testing SVN Revision (if applicable):
Backend Engine: Asterisk 1.4.x Backend Engine Version:

Description

On Wednesday, I installed a new system at a customer site. It processes around 9000 calls per day. Each call is only 1-3 minutes long. The CDR was working fine for the first 2 days. Now, on the 3rd day, I get this error when trying to see any reports:

Fatal error: Call to undefined method DB_Error::numRows() in /var/www/html/admin/cdr/lib/Class.Table.php on line 85

My system is based on TrixBox v2.6.0.7.

Please help! My customer will be back on Monday and expectsto see a full history of the calls received by this system.

Thanks.

Change History

05/23/08 08:52:53 changed by p_lindheimer

numRows() is a pear DB.php function. If you are getting an error there I'm surprised that anything is working? Check that you have pear properly installed.

05/23/08 08:57:52 changed by jonnywifi

Thanks for looking at it. Nobody has touched the system since it went into service a few days ago. I was enjoying watching the massive call volume each day in the reports, then just this moring, I started seeing that error.

Since pear was installed properly and working fine yesterday, I tend to believe it is still installed properly. However, I know very little about pear - how would I check to see if pear is installed/working properly?

Thanks. -Jon

05/23/08 09:15:17 changed by p_lindheimer

jonny, you are right there is either a bug or something else going wrong. The following query:

    $num = $res -> numRows();

    if ($num==0) return 0;

should be checking for an error back from the query. Maybe someone can have a look at this and get an error check in so the error can be reported back. Unfortunately I can't get to looking at this until early next week. Maybe one of the other dev's can hop on and provide you patch to print out the error and help get to the bottom line of this.

07/12/08 15:35:35 changed by p_lindheimer

  • confirmation changed from Unreviewed to Confirmed.
  • milestone changed from Cut Line to 2.5.

07/13/08 21:42:28 changed by p_lindheimer

  • status changed from new to closed.
  • confirmation changed from Confirmed to Need testing.
  • resolution set to fixed.

r6002 hopefully this will address the error, although I don't know if I should be failing in this case with an error vs. simply returning 0?

07/19/08 07:50:05 changed by ukr-alex

Hi

At http://xxxxxx/web-meetme/lib/report-gen.php?now=2008-07-19

for the Fatal error: Call to undefined method DB_Error::numRows() ....

I found that defines not work:

DB Error: no such table,SELECT bookId FROM DB_TABLESCHED WHERE startTime LIKE '%2008-07-19 00%' [nativecode=1146 ** Table 'meetme.DB_TABLESCHED' doesn't exist]

07/19/08 07:57:35 changed by ukr-alex

I think some query constructed wrong

07/31/08 08:54:20 changed by ukr-alex

report-gen.php file:

$query = "SELECT bookId FROM DB_TABLESCHED WHERE startTime LIKE '%$hour%'"; => $query = "SELECT bookId FROM ".DB_TABLESCHED." WHERE startTime LIKE '%$hour%'";

and

$query = "SELECT * FROM DB_TABLECDR WHERE bookId = '$result[0]'"; => $query = "SELECT * FROM ".DB_TABLECDR." WHERE bookId = '$result[0]'";

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads