Fatal error: Uncaught Error: undefined function CodeIgniter\locale_set_default()

โดย SONGCHAI SAETERN
หลังจากที่ได้ติดตั้ง PHP 8.0 และลองนำ CodeIgniter Framework 4.0.4 มาทดสอบดู ก็ปรากฏ Error ดังนี้




ปัญหาเกิดจากขาด Extension บางตัว ให้แก้ไขที่ไฟล์ php.ini

1. ค้นหา ;extension=intl   จะเห็นว่ามี ; อยู่ด้านหน้า
    ให้เอาคอมเมนต์ออกเหลือเพียง 
    extension=intl

2. ค้นหา extension_dir จากนั้นให้ใส่เป็น PATH เต็มเข้าไปแทน
    เช่น extension_dir = "C:\Apache24\php8\ext"


ให้ทำการ ปิด-เปิด Service ของ Apache ใหม่ (เปิด Command promt แบบ Run as administrator)

C:\> cd C:\Apache24\bin
C:\Apache24\bin> httpd.exe -k restart

ถ้ายังไม่ได้ให้ทำการคัดลอกไฟล์เหล่านี้ไปวางที่ System32


icu*.dll    <-- จะมีหลายตัวด้วยกันที่ขึ้นต้นด้วย icu.......

เอาไปวางที่ C:\Windows\System32 

ถ้ายังรันไม่ได้ให้เอาไปวางที่ C:\Windows\SysWOW64 อีกที่ด้วย




อ้างอิง
https://codeinsane.wordpress.com/2018/05/16/install-apache-and-php/
https://forum.codeigniter.com/thread-77086.html
https://www.php.net/manual/en/install.pecl.windows.php
http://forum.wampserver.com/read.php?2,80704,printview,page=1


PHP CI MANIA - PHP Code Generator 

โปรแกรมช่วยสร้างโค้ด "ลดเวลาการเขียนโปรแกรม"
http://fastcoding.phpcodemania.com/index.php/#purchase-order
ราคาสุดคุ้ม  
http://fastcoding.phpcodemania.com