Welcome Guest, Not a member yet? Register   Sign In
4.0.3 works but 4.0.4 is broken for me
#1

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?
Reply
#2

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

extension=intl

Smile
Reply
#3

(This post was last modified: 07-17-2020, 08:20 PM by John_Betong.)

(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]
Reply
#4

If you had read the CodeIgniter 4 User Guide Server Requirements

You would have found your answer real fast.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

(This post was last modified: 07-18-2020, 07:33 AM by saeedarcana.)

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
Reply
#6

@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
Reply
#7

Thanks John, I will try it out
Reply
#8

(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!
Reply
#9

(This post was last modified: 10-13-2020, 07:45 PM by arisroyo.)

Check php version
$php --version
Install sudo apt install php7.X-intl (X sub version of your php 7.2 or 7.4...)
There are those who tell lies with meaning behind them and those meaning less lies!
Reply
#10

(This post was last modified: 10-14-2020, 04:46 AM by nfaiz.)

.....
Reply




Theme © iAndrew 2016 - Forum software by © MyBB