Bug #237
Fatal error: Call to a member function fetchRow() on a non-object
| Status: | Closed | Start: | 11/11/2009 | |
|---|---|---|---|---|
| Priority: | High | Due date: | 08/10/2010 | |
| Assigned to: | tshif | % Done: | 100% |
|
| Category: | - | |||
| Target version: | Caller ID Superfecta v 2.2.4 Maintenance Release |
Description
Originally Posted by Nixi
Hi all,
Some users of the module have reported to me that they get this error message:
Fatal error: Call to a member function fetchRow() on a non-object in /var/www/html/admin/modules/superfecta/bin/callerid.php on line 130
It only happens when they get a number that is not found in the directory. They use Hitta.se and Eniro.se
One user setup is as follows:
Centos 5.4
superfecta 2.2.2
php 5.2.5
Asterisk 1.6.0.10
(Trixbox fully updated to 2.8.0.1)
Any clues on what could be wrong? I have never seen this in my setup.
Related issues
| related to Caller ID Superfecta - Bug #260: The requested URL returned error: 404 not found | Closed | 12/08/2009 |
History
Updated by tshif about 2 years ago
- Target version changed from Caller ID Superfectav 2.2.3 Maintenance Release to Caller ID Superfecta - Future Versions
#
Updated by tshif about 2 years ago
- Status changed from New to Reviewed
Updated by jacobsj about 2 years ago
Based on the location of the error, there is a problem with the MySQL query. I added some debug code to print the query to the screen during and error. Can we have one of the users experiencing this error try the new code and take a look at the query that is failing.
It would also be helpful to know one of the phone numbers that is causing this problem.
Updated by jgirdner about 2 years ago
I am getting this same error.
Fatal error: Call to a member function fetchRow() on a non-object in /var/www/admin/modules/superfecta/bin/callerid.php on line 130
It is created when my provider passes Unknown as the callerid. I also did some playing around and found that any test entry such as "Test" creates this error.
Any suggestions to correct this problem would be greatly appreciated. Just let me know what additional information you need and I can provide it.
Updated by robfantini about 2 years ago
we also have the the problem.
callerid="<br /> <b>Fatal error</b>: Call to a member function fetchRow() on a non-object in <b>/var/www/admin/modules/su perfecta/bin/callerid.php</b> on line <b>130</b><br />" <7818589166>
We send voice mails as an e-mail attachment. that stopped working and the message was sent inline. here is a .txt file from one of those voicemails at /var/spool/asterisk/voicemail/default/200/INBOX/msg0188.txt
; ; Message Information file ; [message] origmailbox=200 context=macro-vm macrocontext=ext-local exten=s-NOMESSAGE priority=3 callerchan=Zap/4-1 callerid="<br /> <b>Fatal error</b>: Call to a member function fetchRow() on a non-object in <b>/var/www/admin/modules/su perfecta/bin/callerid.php</b> on line <b>130</b><br />" <6038457051> origdate=Sun Jan 10 02:15:33 PM EST 2010 origtime=1263150933 category= duration=32
If you need more information or testing let me know.
Updated by tshif about 2 years ago
- Status changed from Reviewed to Assigned
- Assigned to set to jacobsj
Updated by jacobsj about 2 years ago
Please get the latest callerid.php file from the repository and run some tests with that file on your system. It should display a more descriptive error to the screen now that will help me determine more about the problem.
Updated by jgirdner about 2 years ago
I used the callerid.php file from the repo. I still get the same error when testing through the freepbx admin. Here is the total debug results generated.
Processing Default Scheme.
Searching Superfecta Cache ... not found
result took 0.0000 seconds.
Searching Addresses.com Yellow Pages ... not found
result took 0.6360 seconds.
Searching White Pages ... Skipping Source - Toll Free or Non US/CAN number: 8002400381
result took 0.0000 seconds.
Searching Addresses White Pages ... Skipping Source - Toll Free or Non US/CAN number: 8002400381
result took 0.0000 seconds.
Searching Google ... not found
result took 0.1080 seconds.
Searching Any Who ... Skipping Source - Toll Free or Non US/CAN number: 8002400381
result took 0.0000 seconds.
Fatal error: Call to a member function fetchRow() on a non-object in /var/www/admin/modules/superfecta/bin/callerid.php on line 136
Updated by jgirdner about 2 years ago
Here is the output when I test and number that is Unknown
Debugging Enabled, will not stop after first result.
Processing Default Scheme.
Searching Superfecta Cache ... not found
result took 0.0000 seconds.
Searching Addresses.com Yellow Pages ... Skipping Source - Non US/CAN number:
result took 0.0040 seconds.
Searching White Pages ... Skipping Source - Toll Free or Non US/CAN number:
result took 0.0000 seconds.
Searching Addresses White Pages ... Skipping Source - Toll Free or Non US/CAN number:
result took 0.0000 seconds.
Searching Google ... Skipping Source - Non NANP number:
result took 0.0000 seconds.
Searching Any Who ... Skipping Source - Toll Free or Non US/CAN number:
result took 0.0000 seconds.
Fatal error: Call to a member function fetchRow() on a non-object in /var/www/admin/modules/superfecta/bin/callerid.php on line 136
Updated by jacobsj about 2 years ago
Can you tell me what source is after AnyWho and does the error move up if you move that source up in the sequence?
Updated by jgirdner about 2 years ago
Anywho is the final source in the query. I moved Anywho up one sequence and the error remained the same.
Processing Default Scheme.
Searching Superfecta Cache ... not found
result took 0.0000 seconds.
Searching Addresses.com Yellow Pages ... Skipping Source - Non US/CAN number:
result took 0.0000 seconds.
Searching White Pages ... Skipping Source - Toll Free or Non US/CAN number:
result took 0.0040 seconds.
Searching Addresses White Pages ... Skipping Source - Toll Free or Non US/CAN number:
result took 0.0000 seconds.
Searching Any Who ... Skipping Source - Toll Free or Non US/CAN number:
result took 0.0000 seconds.
Searching Google ... Skipping Source - Non NANP number:
result took 0.0000 seconds.
Fatal error: Call to a member function fetchRow() on a non-object in /var/www/admin/modules/superfecta/bin/callerid.php on line 136
Updated by jgirdner about 2 years ago
No luck figuring this error out? I really need to get it fixed.
Updated by bsau about 2 years ago
This may be related to #260 - I suggest you try the r251 version of callerid.php (source:bin/callerid.php@251) in your present Superfecta install and please let us know if it helps in any way.
Updated by robfantini about 2 years ago
bsau wrote:
This may be related to #260 - I suggest you try the r251 version of callerid.php (source:bin/callerid.php@251) in your present Superfecta install and please let us know if it helps in any way.
Hi
I tried callerid.php r251 , and still get errors.
this from the debug screen
------------------------------
number: 8774979050
Debugging Enabled, will not stop after first result.
Processing Default Scheme.
Searching Asterisk Phonebook ... not found
result took 0.0003 seconds.
Searching Superfecta Cache ... not found
result took 0.0007 seconds.
Searching Addresses.com Yellow Pages ... not found
result took 1.0819 seconds.
Searching White Pages ... Skipping Source - Toll Free or Non US/CAN number: 8774979050
result took 0.0007 seconds.
Fatal error: Call to a member function fetchRow() on a non-object in /var/www/admin/modules/superfecta/bin/callerid.php on line 136
---------------------------------------------------------------
from logs:
[Feb 5 17:58:49] VERBOSE16590 logger.c: -- Executing [cidlookup_11@cidlookup:1] Set("Zap/1-1", "CA
LLERID=<br />
<b>Fatal error</b>: Call to a member function fetchRow() on a non-object in <b>/var/www/admin/modules/su
perfecta/bin/callerid.php</b> on line <b>136</b><br />") in new stack
--------------------------------
Updated by robfantini about 2 years ago
bsau wrote:
This may be related to #260 - I suggest you try the r251 version of callerid.php (source:bin/callerid.php@251) in your present Superfecta install and please let us know if it helps in any way.
here is info on the file i am using:
ls l callerid.php-r-- 1 root root 19101 2010-02-02 16:47 callerid.php
-rw-r
md5sum callerid.php
6bd0748c87cf5d394840753fb20beb23 callerid.php
Updated by jgirdner almost 2 years ago
This problem has still not be resolved. What is taking so long? I am using r251 of callerid.php and the problem is still happening.
Updated by jgirdner over 1 year ago
It seems that the problem is happening when there are no results returned. We made some changes to the code and it seems to get rid of the error on lookups with no results returned. This probably isn't the best solution, but at least we aren't getting the error returned on our phone when people call in from numbers that have no results returned in lookups. This change was made to r251 of callerid.php.
336 if($debug)
337 {
338 print "<b>Returned Result would be: ";
339 if($first_caller_id != ''){
340 $first_caller_id = utf8_encode($first_caller_id);
341 }else{
342 $first_caller_id = $thenumber_orig;
343 }
344 }
Updated by tshif over 1 year ago
- Assigned to changed from jacobsj to tshif
jgirdner - thanks for the corrected code. I will try to validate it in the next few days. Can you tell me if your still using it - and you still find it doesnt break anything else?
Updated by tshif over 1 year ago
My testing seems to confirm that your patch will run against r251, as well as with the version in build 2.2.3.
This doesnt prove anything since I could never generate the "Fatal error: Call to a member function fetchRow() on a non-object in /var/www/html/admin/modules/superfecta/bin/callerid.php on line 130" error in the first place.
We could use some more folks testing this before we include it in the code - please post your results in this ticket.
Updated by tshif over 1 year ago
- Status changed from Assigned to QA Testing
- % Done changed from 0 to 70
We could really use some user testing before we release this -
Updated by tshif over 1 year ago
- Due date set to 08/10/2010
- Status changed from QA Testing to Closed
- % Done changed from 70 to 100
Accepted for next build, 2.2.4
Updated by tshif over 1 year ago
- Target version changed from Caller ID Superfecta - Future Versions to Caller ID Superfecta v 2.2.4 Maintenance Release
Scheduled for build 2.2.4