วันนี้ได้ทำการจัดการเรื่อง error ของ php ไม่ให้แสดงบนหน้าเวป แต่ไปเก็บไว้ที่ file แทน ทำให้เพิ่มความปลอดภัยของเวปไซต์เราและยังสามารถทำการ debug โปรแกรมได้ง่ายด้วย
จาก WikiBall
ปิดไม่ให้แสดง error
# supress php errors php_flag display_startup_errors off php_flag display_errors off php_flag html_errors off
แสดง error ใน logs file
# enable PHP error logging php_flag log_errors on php_value error_log /home/path/public_html/domain/PHP_errors.log
จัดการ permission ของ logs
# prevent access to PHP error log <Files PHP_errors.log> Order allow,deny Deny from all Satisfy All </Files>

0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.