CodeIgniter Forums
4.0.3 works but 4.0.4 is broken for me - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: 4.0.3 works but 4.0.4 is broken for me (/showthread.php?tid=77086)

Pages: 1 2


4.0.3 works but 4.0.4 is broken for me - Sepharad - 07-17-2020

Hi, just downloaded ci 4.0.4 and it don't work, throws:

Fatal error: Uncaught Error: Call to undefined function CodeIgniter\locale_set_default() in C:\xampp\htdocs\CodeIgniter4-4.0.4\system\CodeIgniter.php:184 Stack trace: #0 C:\xampp\htdocs\CodeIgniter4-4.0.4\system\bootstrap.php(181): CodeIgniter\CodeIgniter->initialize() #1 C:\xampp\htdocs\CodeIgniter4-4.0.4\public\index.php(36): require('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\CodeIgniter4-4.0.4\system\CodeIgniter.php on line 184

Using XAMPP 7.4.8 tested CI 4.0.3 and it just works. Fresh installation of both.

Any ideas?


RE: 4.0.3 works but 4.0.4 is broken for me - Sepharad - 07-17-2020

Auto-respone: if anyone is using xampp the quick way to fix this is open php.ini and uncomment:

extension=intl

Smile


RE: 4.0.3 works but 4.0.4 is broken for me - John_Betong - 07-17-2020

(07-17-2020, 05:37 PM)Sepharad Wrote: Auto-respone: if anyone is using xampp the quick way to fix this is open php.ini and uncomment:

extension=intl

Smile

Missing function:
// file: ./system/CodeIgniter/CodeIgniter.php
PHP Code:
/**
  * Handles some basic app and environment setup.
*/
public function initialize()
{
  // Set default locale on the server
  // John ADDED FOLLOWING CHECK BECAUSE STILL TO BE SET ON MY SYSTEM  
  if( function_exists('locale_set_default' ) ) :
    locale_set_default($this->config->defaultLocale ?? 'en');
  endif; 
    [/font][/size][/color]


RE: 4.0.3 works but 4.0.4 is broken for me - InsiteFX - 07-18-2020

If you had read the CodeIgniter 4 User Guide Server Requirements

You would have found your answer real fast.


RE: 4.0.3 works but 4.0.4 is broken for me - saeedarcana - 07-18-2020

I undid the comment and got "Whoops! We seem to have hit a snag. Please try again later..." message on the browser, Could you help please

If you could tell me how to debug it please. I didnt see anything wrong in the logs


RE: 4.0.3 works but 4.0.4 is broken for me - John_Betong - 07-18-2020

@saeedarcana,

> I undid the comment and got "Whoops! We seem to have hit a snag. Please try again later..."

Usually to get round this try these three points:

1. ensure .writable folder is writable with file permissions 0777 (must have leading zero)
2. try setting the following in index.php -> $_SERVER['CI_ENVIRONMENT'] = 'development'; and toggle with $_SERVER['CI_ENVIRONMENT'] = 'production';
3. check for funcion_exists(...) in my post #3


RE: 4.0.3 works but 4.0.4 is broken for me - saeedarcana - 07-18-2020

Thanks John, I will try it out


RE: 4.0.3 works but 4.0.4 is broken for me - wdeda - 07-18-2020

(07-17-2020, 08:17 PM)John_Betong Wrote:
(07-17-2020, 05:37 PM)Sepharad Wrote: Auto-respone: if anyone is using xampp the quick way to fix this is open php.ini and uncomment:

extension=intl

Smile

Missing function:
// file: ./system/CodeIgniter/CodeIgniter.php
PHP Code:
/**
  * Handles some basic app and environment setup.
*/
public function initialize()
{
  // Set default locale on the server
  // John ADDED FOLLOWING CHECK BECAUSE STILL TO BE SET ON MY SYSTEM  
  if( function_exists('locale_set_default' ) ) :
    locale_set_default($this->config->defaultLocale ?? 'en');
  endif; 
    [/font][/size][/color]

I removed the comment and it worked fine.
Thank you, John!


RE: 4.0.3 works but 4.0.4 is broken for me - arisroyo - 10-13-2020

Check php version
$php --version
Install sudo apt install php7.X-intl (X sub version of your php 7.2 or 7.4...)


RE: 4.0.3 works but 4.0.4 is broken for me - nfaiz - 10-14-2020

.....