เทคนิคการ Debug FreePBX

Let Freedom Ring

Moderator: jubjang

กฎการใช้บอร์ด
All about FreePBX

เทคนิคการ Debug FreePBX

โพสต์โดย nuiz » 16 ส.ค. 2018 13:11

ใน FreePBX เวอร์ชั่นใหม่ๆมีคำสั่งที่ช่วยให้เราทำงานได้ง่ายขึ้น เช่นคำสั่ง fwconsole (คำสั่งนี้พัฒนามาจากคำสั่ง amportal ใน FreePBX เวอร์ชั่นแรกๆ) คำสั่ง fwconsole นี้มีออปชั่นต่อท้ายเยอะแยะมากมายครับ ในบทความนี้จะพูดถึงออปชั่น debug ครับ

โค้ด: เลือกทั้งหมด
[root@telephony ~]# fwconsole debug


ตัวอย่างข้อความที่แสดงออกมาครับ - อาจจะช่วยแก้ปัญหาได้
โค้ด: เลือกทั้งหมด
+-----------------------+
| FreePBX Notifications |
+-----------------------+
OUT > ==> /var/log/asterisk/freepbx_dbug <==

==> /var/log/httpd/error_log <==
[Thu Aug 16 12:01:24.538076 2018] [:error] [pid 21151] [client 172.31.241.254:6308] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /opt/a2billing/common/lib/common.defines.php on line 112, referer: http://172.31.241.220/a2b/Public/A2B_entity_trunk.php?form_action=ask-edit&id=2
[Thu Aug 16 12:04:14.873566 2018] [authz_core:error] [pid 21152] [client 172.31.241.254:45919] AH01630: client denied by server configuration: /var/www/html/admin/index.html
[Thu Aug 16 12:57:37.312375 2018] [authz_core:error] [pid 24623] [client 172.31.241.254:41426] AH01630: client denied by server configuration: /var/www/html/admin/index.html
[Thu Aug 16 13:05:12.474496 2018] [mpm_prefork:notice] [pid 21073] AH00170: caught SIGWINCH, shutting down gracefully
[Thu Aug 16 13:05:15.662254 2018] [suexec:notice] [pid 17294] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::20c:29ff:fe8f:d842. Set the 'ServerName' directive globally to suppress this message
[Thu Aug 16 13:05:15.771552 2018] [auth_digest:notice] [pid 17294] AH01757: generating secret for digest authentication ...
[Thu Aug 16 13:05:15.772722 2018] [lbmethod_heartbeat:notice] [pid 17294] AH02282: No slotmem from mod_heartmonitor
[Thu Aug 16 13:05:15.895736 2018] [mpm_prefork:notice] [pid 17294] AH00163: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips PHP/5.6.30 configured -- resuming normal operations
[Thu Aug 16 13:05:15.895807 2018] [core:notice] [pid 17294] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

==> /var/log/asterisk/freepbx_security.log <==
[2018-08-15 17:26:32] Authentication failure for administrator from 172.31.241.254
[2018-08-15 17:26:32] Possible proxy detected, forwarded headers foradministrator set to

==> /var/log/asterisk/freepbx.log <==
[2018-Aug-16 12:26:28] [WARNING] (ringgroups/functions.inc.php:483) - Depreciated Function ringgroups_list detected in /var/www/html/admin/modules/ringgroups/functions.inc.php on line 75
[2018-Aug-16 12:26:28] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_getinfo detected in /var/www/html/admin/modules/core/functions.inc.php on line 1077
[2018-Aug-16 12:26:28] [WARNING] (ringgroups/functions.inc.php:483) - Depreciated Function ringgroups_list detected in /var/www/html/admin/modules/core/functions.inc.php on line 1316
[2018-Aug-16 12:26:28] [WARNING] (core/functions.inc.php:6188) - Depreciated Function core_users_list detected in /var/www/html/admin/modules/core/functions.inc.php on line 1671
[2018-Aug-16 12:26:28] [WARNING] (core/functions.inc.php:6188) - Depreciated Function core_routing_list detected in /var/www/html/admin/modules/callrecording/functions.inc.php on line 401
[2018-Aug-16 12:41:05] [WARNING] (ringgroups/functions.inc.php:483) - Depreciated Function ringgroups_list detected in /var/www/html/admin/modules/ringgroups/functions.inc.php on line 75
[2018-Aug-16 12:41:05] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_getinfo detected in /var/www/html/admin/modules/core/functions.inc.php on line 1077
[2018-Aug-16 12:41:05] [WARNING] (ringgroups/functions.inc.php:483) - Depreciated Function ringgroups_list detected in /var/www/html/admin/modules/core/functions.inc.php on line 1316
[2018-Aug-16 12:41:05] [WARNING] (core/functions.inc.php:6188) - Depreciated Function core_users_list detected in /var/www/html/admin/modules/core/functions.inc.php on line 1671
[2018-Aug-16 12:41:05] [WARNING] (core/functions.inc.php:6188) - Depreciated Function core_routing_list detected in /var/www/html/admin/modules/callrecording/functions.inc.php on line 401


ฟ้องเกี่ยวกับฟังก์ชั่น php เยอะแยะแบบนี้ สงสัยจะเป็นเพราะเวอร์ชั่น php ในเครื่องมันจะเก่าไปครับ แต่มีบรรทัดนึงฟ้องเกี่ยวกับ timezone ซึ่งเราพอจะแก้ไขได้โดยการเซ็ต timezone ในไฟล์ /etc/php.ini ครับ แบบนี้

โค้ด: เลือกทั้งหมด
now=$(date +'%s')
cp /etc/php.ini /etc/php.ini.$now
sed -i "s|;date.timezone =|date.timezone =Asia/Bangkok|g" /etc/php.ini
systemctl restart httpd
** หากมีปัญหากับอุปกรณ์ที่ซื้อมาเองหรือบริการที่ทำขึ้นมาเอง ให้โพสต์ถามในเว็บบอร์ดนี้นะครับ **
** งานเร่งด่วนติดต่อว่าจ้างที่เบอร์ 08-5161-9439 อีเมล์ iamaladin@gmail.com ไลน์ NuizVoip ครับ **
nuiz
Diamond Member
 
โพสต์: 6993
ลงทะเบียนเมื่อ: 24 มี.ค. 2010 09:33

ย้อนกลับไปยัง FreePBX - Best GUI For Asterisk

ผู้ใช้งานขณะนี้

กำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และ บุคคลทั่วไป 0 ท่าน