FreePBX | Register | Issues | Wiki | Portal | Support

PHP Fatal error on check_portal.php


(Chris C) #1

Anyone get this error:
PHP Fatal error: Call to a member function fetchAll() on boolean in /var/www/html/admin/modules/sysadmin/bin/check_portal.php on line 10

It doesnt seem to affect anything that I have noticed, but just would like to stop getting the emails.
I am using FreePBX 14.0.1.1.
I looked in that php file and it appears to be compiled. The only useful thing I can see is it is it is System Admin 14.0.7.5.

Anyone know how to fix the error?

Thanks!


(Dude) #2

I am getting the exact same error… emailed to me every morning at exactly 12:00 am. It is called from a cron job. The subject of the e-mail is:

Cron asterisk@freepbx [ -e /var/www/html/admin/modules/sysadmin/bin/check_portal.php ] && /var/www/html/admin/modules/sysadmin/bin/check_portal.php

I am also running FreePBX 14 as a VM on vSphere ESXi. Here are some additional details:

PBX Firmware:12.7.3-1703-4.sng7
PBX Service Pack:1.0.0.0
Current Asterisk Version: 13.15.1
FreePBX 14.0.1.1
System Admin Module: 14.0.7.8 (Change log says “Ensure pnpd is started correctly” for this latest version.)

My e-mail for the asterisk and root accounts wasn’t configured properly for a while so I’m not sure how long these e-mails were being sent. It looks like this problem has been occurring since at least v14.0.7.5 of the System Admin module.


(Lorne Gaetz) #3

What happens when you run the script manuall? Does it provide an error?


(I love obfuscated scripts!) #4

I get exactly the same error. Running the file manually doesn’t help.

The files content looks bad:

[code]#!/usr/bin/php

<?php @Zend; 0622; ?>

0

System Admin 14.0.7.8
Copyright 2017 by Schmoozecom, Inc., All rights reserved

By installing, copying, downloading, distributing, inspecting or using
the materials provided herewith, you agree to all of the terms of use as
outlined in our End User Agreement which can be found and reviewed at

<?PHP exit(); __halt_compiler(); ?>

^K2004072203^@^F65543^@^E1638^@^E5187^@xù
<9f>2^L<95>YÍ<8f>TE^Pï^GJ<86><85>^CG^Sc2!^D^R<92>eûë½×ï@^H°<83>&D<97>À^Z^M<92>°³;^Ogt>È|(ëÁÄ<93>ràj ^^¼J<xðî<81>ÄxÃDcbâÁ?À^KG^R^NÚßUýv^V0á0Ûõ«ª_׫®êjLv]Ûé<8f>&<93>ÏêöÅÉh´^X^OvºóÁd<<83>«<8a>ýw<84>)Z0ªªRW|s^Yè-F£Ý3Ý^oê{ºu ^HYaBrV<96>Ü^VCW<89>t^[:äbAÉÚb6]^[^N¶×f»³no4^X¯^MÆ;ÃE¯<9e><9d>¹Ý¿mX¹¢hZÕ5^O¹qiZ×W.¼^_+¦^Q^Fý^[·´ðöö^]PÕGd]^?òí®ý^q­ç×^PÐ_À÷®<98>ßû@^NÊ<9c>èÓ×¹¸Ù>ݾtuãíöÖÇ<9f>Ìæ<93>i½Õþ´_OëöÖhÒ[^Lë­³§66.tN%ÄnÕó<9d>þùápé¢þ4éZ7^AÚ;,<8e>^P#^_Í&ã<9b>½Ú^StõXº<9e>^XÐíÝþmS33?^OùJ·3íÎúu^O¡Óµ¦<86>"<83>ÙÍîtÚÝÕÀ¬¹¶¯<99>^WÅ]í^wÝý×uÜ7;/^UõvwÜÓ<98>zW/x^B§#^D6¢kÀT<9b><9c>Î<92>^E<83>µ¥ä<90>*¤<9e>dí<81>iè.Û^[Rßga<99>VELË^ZÖó}Â]êÖPë^R<94>Ú klÉ^Z
^#ï^Y?¯^C^G1»ÖÙloélØ:{®ýÞ[<9d>«^]<88>ßq^S¿ãíóכּð<9d>K\Öwê<9d>ż^º¦¯ÖûãbZÖc<9b><96>ºS/^W<?PË×<9e>˪ø?¬Ô^KY5?ÕòÕÐ^GmÚTº^H^V¶<90>ÎO¬ðBI<91>K=^Ud¾w<98>Q×<8c>Ë®á|o<96>2_¾ýÃ<81>^W½öJÔ<96>VÓicÈïà@<90>c¦<8f>!<95>^Tºq <8a>xj­
<90>G<8d>ikz^Q©¤Ð<93>Fû<98>¥^<90>0Pz^Yu[Röþãn? |^P^Yê©^Oh$<98>_[x'^Z<97>^YaôB DF<96>É^<90>^Q^H<8d>,4SN°^NÂ^^]åºÕ<89>ªT<85>.mo^@*·Z-3¼88Û^Kÿ^Rà<92>ÕT<8d><92>
^BKÊ^BÓë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,}^N^BW´÷?<86>AÏ<92>ðQ<89>÷h^[{^_<84>Âï<8f>5<8d>À^E<9b>¢ºBQËt¶~À¸,)Ël5IrÊ÷0z^FÑl4/0r^V¢<97>^G^O²^Y½<9f>!zþ<96>ïAfé<9b>°^OQU>zv°^Xt^_GÏ^@^QW{<90>î<82>P5¢^W<8d>|w bJÒÄGV<94>¬<96>^^G0Fqô^L°ÉèÁ<89>(,^ZÑ<8b>F^^¹^C<97>PÈãÕD». ×Êp^Rí^E¶°÷AÓ<8c>í<<98><9b>G±<9c><98>¦aþþ7yk;àÞ^ZÌLh^^÷VX%¤ª<98>)ð<92>L&Ûµ&Z)¥rn^OÇ´<95>«B^T%3ÏoÝéô^H§^U¥ª4)bÆ<84>i=«çÛõ-=ö^_fÊ<84>Í^?¾ë1ºß^]^?X÷VXÎe!K=ßé^ZåÞ^@<8e>¬<96>¼¢úJlÚoA^FãY=<9d>ë&\p¦
^å<88>é^?¢ËØ®
[/code]


(Dude) #5

Hi sorry for the late response. Yes, when I run the script manually, I get the exact same error message:

“PHP Fatal error: Call to a member function fetchAll() on boolean in /var/www/html/admin/modules/sysadmin/bin/check_portal.php on line 10”


#6

Same problem here. New install of distro. Am I gonna be getting this every day then? :slight_smile:


(Andrew Nagy) #7

The file is obfuscated. Thats how it’s supposed to look


(Andrew Ashley) #8

I am also getting this every night at 00:00.

Job:
Cron asterisk@pbx01 [ -e /var/www/html/admin/modules/sysadmin/bin/check_portal.php ] && /var/www/html/admin/modules/sysadmin/bin/check_portal.php

Error:
PHP Fatal error: Call to a member function fetchAll() on boolean in /var/www/html/admin/modules/sysadmin/bin/check_portal.php on line 10

FreePBX 14.0.1.4
PBX Firmware:12.7.3-1708-1.sng7
PBX Service Pack:1.0.0.0


(Itzik) #9

Hey, How did you set up these alerts?


(Dave Burgess) #10

You can add options on your crontabs to mail “non-empty” cron job output to your email address. Google “mail from cron job” and follow the instructions on one of those. The “from memory” way is adding a line like "MAILTO=me@mhisp.com" at the top of the cron table (“crontab -eu _asterisk”).


(Oleksandr Lysenko) #11

I get same error message. Update sysadmin module 2 times, every time check file content - file version inside file changes(latest version available). File don’t look damaged. 3 different files - same error message.
Problems started after update from free to a commercial version.
I have only 2 commercial modules - sysadmin and Extension Routing.


(Asteriskadmin) #13

this is still unresolved?
I’m getting it as well; brand new install since the day 1 . I commented out the cron job, but the obfuscated script is a roadblock. is there any way to troubleshoot this?


(Andrew Nagy) #14

I looked over the code and there is nothing on line 10 of this file to fix. Furthermore the code “fetchAll” does not exist in any form. It appears you are on FreePBX 12?


(Asteriskadmin) #15

[root@freepbx ~]# /var/www/html/admin/modules/sysadmin/bin/check_portal.php
PHP Fatal error: Call to a member function fetchAll() on boolean in /var/www/html/admin/modules/sysadmin/bin/check_portal.php on line 10
[root@freepbx ~]# php -r 'include("/etc/freepbx.conf");echo getversion(),"\n";'
14.0.1.15
[root@freepbx ~]#

it was a new install from the ISO of FreePBX 14.0. something

edit: found the source was SNG7-FPBX-64bit-1707-1.iso


(Andrew Nagy) #16

I just checked the 14 version as well. There are no references to a fetchAll. Your sysadmin is out of date perhaps? Or your error is different than above. I think you need to make sure the error is the same.

Line 10 of check_portal.php is:

$oobe = array();


(Marbled) #17

Hi!

If you do a

vim /var/www/html/admin/modules/sysadmin/bin/check_portal.php

What do you see in the non-obfuscated part?

Good luck and have a nice day!

Nick


(Asteriskadmin) #18
[root@freepbx ~]# vim /var/www/html/admin/modules/sysadmin/bin/check_portal.php
#!/usr/bin/php
<?php @Zend;
0623;
?>
0

System Admin 14.0.7.22
Copyright 2017 by Schmoozecom, Inc., All rights reserved

By installing, copying, downloading, distributing, inspecting or using
the materials provided herewith, you agree to all of the terms of use as
outlined in our End User Agreement which can be found and reviewed at
www.schmoozecom.com/cmeula

<?PHP
exit();
__halt_compiler();
?>

(Asteriskadmin) #19

how do i obtain a proper copy


(Andrew Nagy) #20

fwconsole ma downloadinstall sysadmin

You still have not clarified if you are having the same exact error. You an run it like so:

/var/www/html/admin/modules/sysadmin/bin/check_portal.php


(Asteriskadmin) #21

it’s exact same errors, you can see in the message i posted earlier. the command is already posted there but i will paste again.

[root@freepbx ~]# /var/www/html/admin/modules/sysadmin/bin/check_portal.php
PHP Fatal error: Call to a member function fetchAll() on boolean in /var/www/html/admin/modules/sysadmin/bin/check_portal.php on line 10
[root@freepbx ~]# php -r 'include("/etc/freepbx.conf");echo getversion(),"\n";'
14.0.1.15
[root@freepbx ~]#