Page 1 of 1

Apache Error_log

PostPosted: Thu Mar 17, 2016 11:46 am
by maxol
Checking system error messages I observed several errors in apache log.

[Thu Mar 17 11:58:20.193193 2016] [php5:error] [pid 7742] [client XXX.XXX.XXX.XXX:50078] PHP Notice: Undefined variable: NOW_TIME in /srv/www/htdocs/agc/conf_exten_check.php on line 153, referer: http://XXX.XXX.XXX.XXX/agc/vicidial.php
[Thu Mar 17 11:58:20.194534 2016] [php5:error] [pid 7742] [client XXX.XXX.XXX.XXX:50078] PHP Notice: Undefined variable: DB in /srv/www/htdocs/agc/functions.php on line 45, referer: http://XXX.XXX.XXX.XXX/agc/vicidial.php
[Thu Mar 17 11:58:20.194593 2016] [php5:error] [pid 7742] [client XXX.XXX.XXX.XXX:50078] PHP Notice: Undefined variable: DB in /srv/www/htdocs/agc/functions.php on line 89, referer: http://XXX.XXX.XXX.XXX/agc/vicidial.php
[Thu Mar 17 11:58:20.194764 2016] [php5:error] [pid 7742] [client XXX.XXX.XXX.XXX:50078] PHP Notice: Undefined variable: mel in /srv/www/htdocs/agc/functions.php on line 92, referer: http://XXX.XXX.XXX.XXX/agc/vicidial.php
[Thu Mar 17 11:58:20.194898 2016] [php5:error] [pid 7742] [client XXX.XXX.XXX.XXX:50078] PHP Notice: Undefined variable: DB in /srv/www/htdocs/agc/functions.php on line 147, referer: http://XXX.XXX.XXX.XXX/agc/vicidial.php
[Thu Mar 17 11:58:20.195071 2016] [php5:error] [pid 7742] [client XXX.XXX.XXX.XXX:50078] PHP Notice: Undefined variable: DB in /srv/www/htdocs/agc/functions.php on line 167, referer: http://XXX.XXX.XXX.XXX/agc/vicidial.php
[Thu Mar 17 11:58:20.195209 2016] [php5:error] [pid 7742] [client XXX.XXX.XXX.XXX:50078] PHP Notice: Undefined variable: DB in /srv/www/htdocs/agc/functions.php on line 177, referer: http://XXX.XXX.XXX.XXX/agc/vicidial.php
[Thu Mar 17 11:58:20.197062 2016] [php5:error] [pid 7742] [client XXX.XXX.XXX.XXX:50078] PHP Notice: Undefined variable: VD_login in /srv/www/htdocs/agc/conf_exten_check.php on line 739, referer: http://XXX.XXX.XXX.XXX/agc/vicidial.php
[Thu Mar 17 11:58:20.197207 2016] [php5:error] [pid 7742] [client XXX.XXX.XXX.XXX:50078] PHP Notice: Undefined variable: VD_login in /srv/www/htdocs/agc/conf_exten_check.php on line 747, referer: http://XXX.XXX.XXX.XXX/agc/vicidial.php
[Thu Mar 17 11:58:20.197260 2016] [php5:error] [pid 7742] [client XXX.XXX.XXX.XXX:50078] PHP Notice: Undefined variable: live_agents_comments in /srv/www/htdocs/agc/conf_exten_check.php on line 829, referer: http://XXX.XXX.XXX.XXX/agc/vicidial.php


SVN Update 2491
VERSION: 2.12-543a
BUILD: 160313-0756
Asterisk 1.8.32.3-vici
LOCAL Server and SIP GSM gateway (local)
Firewall :Off
Local Agents : Not through WAN
Intel(R) Xeon(R) CPU 5160 @ 3.00GHz (QuardCore) & 8 GB Ram ECC
Vicibox-6.0.4

Re: Apache Error_log

PostPosted: Thu Mar 17, 2016 1:55 pm
by maxol
I change my php.ini to
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE

Re: Apache Error_log

PostPosted: Thu Mar 17, 2016 1:59 pm
by williamconley
maxol wrote:I change my php.ini to
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE

Why? (And ... what was it before you changed it?)

Re: Apache Error_log

PostPosted: Fri Mar 18, 2016 1:12 pm
by maxol
Hi,

Before value is:
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

With the ~E_NOTICE the notice message donĀ“t show in apache error_log.

Re: Apache Error_log

PostPosted: Fri Mar 18, 2016 2:21 pm
by williamconley
So the lesson is:

Prior versions of PHP did not care about the use of an undefined variable.

Present versions of PHP still do not care, if you have error_reporting set correctly to avoid getting a notice.

You have three choices:

1 Define the missing variable in each of the files reported (with the option to submit a DIFF so these changes can be pushed into the Vicidial Core) above the line of the first error in each file.
2 Change your error_reporting back to where it belongs.
3 Expect those errors to continue to fill your apache logs.

Re: Apache Error_log

PostPosted: Mon Mar 21, 2016 8:05 am
by maxol
Ok.

Where can I provide the diff?

Index: conf_exten_check.php
===================================================================
--- conf_exten_check.php (revision 2491)
+++ conf_exten_check.php (working copy)
@@ -81,6 +81,7 @@
$mysql_log_count=44;
$one_mysql_log=0;
$DB=0;
+$VD_login=0;
$SSagent_debug_logging=0;
$startMS = microtime();

Index: vicidial.php
===================================================================
--- vicidial.php (revision 2491)
+++ vicidial.php (working copy)
@@ -524,6 +524,7 @@
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=87;
$one_mysql_log=0;
+$DB=0;

require_once("dbconnect_mysqli.php");
require_once("functions.php");

Re: Apache Error_log

PostPosted: Mon Mar 21, 2016 5:09 pm
by mflorell
You can post diffs to the Issue Tracker(Linked at the top of this page)

Re: Apache Error_log

PostPosted: Tue Mar 22, 2016 10:03 am
by maxol