g613 / asterisk-cdr-viewer

Simple and fast viewer for asterisk CDRs / recordings
54 stars 33 forks source link

PHP Notice Undifined Index #35

Closed klavo closed 6 years ago

klavo commented 7 years ago

I setup a new server. Installed Asterisk-CDR-Viewer and I noticed my Apache log files were huge. Looking at the logs they are filling with errors. Just accessing the home screen without doing a search produces the following.

[Fri Jun 30 09:06:14.831624 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: startmonth in /var/www/html/cdr/templates/form.tpl.php on line 23
[Fri Jun 30 09:06:14.831630 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: startmonth in /var/www/html/cdr/templates/form.tpl.php on line 23
[Fri Jun 30 09:06:14.831633 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: startmonth in /var/www/html/cdr/templates/form.tpl.php on line 23
[Fri Jun 30 09:06:14.831636 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: startmonth in /var/www/html/cdr/templates/form.tpl.php on line 23
[Fri Jun 30 09:06:14.831643 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: startmonth in /var/www/html/cdr/templates/form.tpl.php on line 23
[Fri Jun 30 09:06:14.831646 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: startmonth in /var/www/html/cdr/templates/form.tpl.php on line 23
[Fri Jun 30 09:06:14.831649 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: startmonth in /var/www/html/cdr/templates/form.tpl.php on line 23
[Fri Jun 30 09:06:14.831652 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: startmonth in /var/www/html/cdr/templates/form.tpl.php on line 23
[Fri Jun 30 09:06:14.831655 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: startmonth in /var/www/html/cdr/templates/form.tpl.php on line 23
[Fri Jun 30 09:06:14.831658 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: startmonth in /var/www/html/cdr/templates/form.tpl.php on line 23
[Fri Jun 30 09:06:14.831661 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: startmonth in /var/www/html/cdr/templates/form.tpl.php on line 23
[Fri Jun 30 09:06:14.831696 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endmonth in /var/www/html/cdr/templates/form.tpl.php on line 50
[Fri Jun 30 09:06:14.831700 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endmonth in /var/www/html/cdr/templates/form.tpl.php on line 50
[Fri Jun 30 09:06:14.831703 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endmonth in /var/www/html/cdr/templates/form.tpl.php on line 50
[Fri Jun 30 09:06:14.831706 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endmonth in /var/www/html/cdr/templates/form.tpl.php on line 50
[Fri Jun 30 09:06:14.831708 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endmonth in /var/www/html/cdr/templates/form.tpl.php on line 50
[Fri Jun 30 09:06:14.831711 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endmonth in /var/www/html/cdr/templates/form.tpl.php on line 50
[Fri Jun 30 09:06:14.831714 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endmonth in /var/www/html/cdr/templates/form.tpl.php on line 50
[Fri Jun 30 09:06:14.831717 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endmonth in /var/www/html/cdr/templates/form.tpl.php on line 50
[Fri Jun 30 09:06:14.831720 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endmonth in /var/www/html/cdr/templates/form.tpl.php on line 50
[Fri Jun 30 09:06:14.831722 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endmonth in /var/www/html/cdr/templates/form.tpl.php on line 50
[Fri Jun 30 09:06:14.831725 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endmonth in /var/www/html/cdr/templates/form.tpl.php on line 50
[Fri Jun 30 09:06:14.831733 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endmonth in /var/www/html/cdr/templates/form.tpl.php on line 50
[Fri Jun 30 09:06:15.537964 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: startmonth in /var/www/html/cdr/index.php on line 23
[Fri Jun 30 09:06:15.538014 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: startyear in /var/www/html/cdr/index.php on line 24
[Fri Jun 30 09:06:15.538030 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: startday in /var/www/html/cdr/index.php on line 26
[Fri Jun 30 09:06:15.538039 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: starthour in /var/www/html/cdr/index.php on line 33
[Fri Jun 30 09:06:15.538046 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: startmin in /var/www/html/cdr/index.php on line 34
[Fri Jun 30 09:06:15.538068 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endmonth in /var/www/html/cdr/index.php on line 39
[Fri Jun 30 09:06:15.538080 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endyear in /var/www/html/cdr/index.php on line 40
[Fri Jun 30 09:06:15.538091 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endday in /var/www/html/cdr/index.php on line 42
[Fri Jun 30 09:06:15.538120 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endhour in /var/www/html/cdr/index.php on line 47
[Fri Jun 30 09:06:15.538128 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: endmin in /var/www/html/cdr/index.php on line 48
[Fri Jun 30 09:06:15.538145 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: src in /var/www/html/cdr/index.php on line 56
[Fri Jun 30 09:06:15.538153 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: dst in /var/www/html/cdr/index.php on line 62
[Fri Jun 30 09:06:15.538159 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: did in /var/www/html/cdr/index.php on line 68
[Fri Jun 30 09:06:15.538168 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: channel in /var/www/html/cdr/index.php on line 75
[Fri Jun 30 09:06:15.538184 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: clid in /var/www/html/cdr/index.php on line 81
[Fri Jun 30 09:06:15.538194 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: dstchannel in /var/www/html/cdr/index.php on line 84
[Fri Jun 30 09:06:15.538207 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: userfield in /var/www/html/cdr/index.php on line 93
[Fri Jun 30 09:06:15.538216 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: accountcode in /var/www/html/cdr/index.php on line 96
[Fri Jun 30 09:06:15.538225 2017] [:error] [pid 7526] [client 10.13.13.11:53184] PHP Notice:  Undefined index: limit in /var/www/html/cdr/index.php on line 99
g613 commented 7 years ago

Please provide PHP version and OS version.

klavo commented 7 years ago

Sorry for that. I should have realised.

PHP 5.4.16
CentOS Linux release 7.3.1611 (Core)

The errors are reported in /var/log/httpd/error_log

sinyb commented 7 years ago

php -v

PHP 5.5.14 (cli) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies

cat /etc/os-release

NAME="openSUSE Leap" VERSION="42.2" ...

Thank you!

On Fri, Jul 14, 2017 at 6:13 PM, g613 notifications@github.com wrote:

Please provide PHP version and OS version.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/g613/asterisk-cdr-viewer/issues/35#issuecomment-315400512, or mute the thread https://github.com/notifications/unsubscribe-auth/APHZH4CyyH_XYVtiuDgKLkbrmJXQhXkzks5sN5OPgaJpZM4OKAu9 .

g613 commented 6 years ago

try to replace debug level in php.ini

/etc/php.ini old: error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT new: error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE

i.e. add & ~E_NOTICE