PHP Bug - No log handling enabled - turning on stderr logging.




Khi bạn cài đặt PHP trên máy PC của mình và khi chạy một trang PHP bất kỳ nào đó thì cố thể sẽ gặp thông báo "No log handling enabled - turning on stderr logging" kèm theo trên trang PHP bạn đang truy cập.

Bài viết này sẽ hướng dẫn bạn cách xử lý vấn đề này.






Phần bên dưới là hình ảnh và các cảnh báo của PHP mà ta gặp phải trong trường hợp này.
 No log handling enabled - turning on stderr logging
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none)
Cannot find module (UCD-DISKIO-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (MTA-MIB): At line 0 in (none)
Cannot find module (NETWORK-SERVICES-MIB): At line 0 in (none)
Cannot find module (LM-SENSORS-MIB): At line 0 in (none)
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-SCHEDULE-MIB): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (IPV6-ICMP-MIB): At line 0 in (none)
Cannot find module (IPV6-MIB): At line 0 in (none)
Cannot find module (IPV6-TCP-MIB): At line 0 in (none)
Cannot find module (IPV6-UDP-MIB): At line 0 in (none)
Cannot find module (IP-FORWARD-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-EXTEND-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
Cannot find module (NET-SNMP-VACM-MIB): At line 0 in (none)



Nguyên nhân dẫn tới vấn đề là do khi cài đặt PHP bạn vô tình cài đặt thêm các phần mở rộng(Extensions), mà các phần mở rộng này thành thường phải kết hợp với một ứng dụng, hay dịch vụ nào đó.

Nhưng các ứng dụng này không được cài đặt và thiết lập trên PC của bạn, nên khi PHP kết nối(connect) với các ứng dụng hay dịch vụ này sẽ không tìm thấy các thông tin kết nối và dẫn tới các cảnh báo lỗi trên.

Một trường hợp ta dễ nhận thấy nhất là khi cài đặt bạn chọn cài đặt phần mở rộng(Extensions) cơ sở dữ liệu Oracle trong PHP nhưng trên PC của bạn thì lại không có cơ sở dữ liệu Oracle này thì sẽ khi chạy PHP bạn sẽ gặp thông báo liên quan tới kết nối của PHP với Oracle.

Để xử lý trường hợp này bạn chỉ việc chạy lại tiếng trình cài đặt PHP và thiệt lập lại cho phù hợp.


Nhấn "Next" để tiếp tục tiến trình thiết lập lại phần mở rộng(Extensions).


Chọn "Change" để tiếp tục.


Giữ nguyên thiết lập và chọn "Next" để tiếp tục.


Loại bỏ các thiết lập cài đặt sau:
  • PostgreSQL
  • Shared Memo....
  • SNMP
  • SOAP
  • SQLite
  • SQLite 3
Tiếp theo nhấn "Next" để tiếp tục quá trình thiết lập.



Chọn "Change" để tiếp hành thiết lập cài đặt.


Chờ quá trình cài đặt kết thúc.


Nhấn "Finish" để kết thúc quá trình thiết lập lại phần mở rộng(Extension).


Hình bết dưới là kết quả sau khi thiết lập lại phần mở rộng(Extension).


Mọi đóng góp ý kiến xin phản hồi(comments) tại đây.













No comments:

Post a Comment