Error running the application locally.
Closed this issue · 2 comments
After following the set of instruction, the application is not running.
below is the error -
php version 7.4 -
Error -
PHP Fatal error: Uncaught Error: Call to undefined function CodeIgniter\locale_set_default() in /basic-ecommerce/system/CodeIgniter.php:184
Stack trace:
#0 /basic-ecommerce/system/bootstrap.php(181): CodeIgniter\CodeIgniter->initialize()
#1 /basic-ecommerce/spark(44): require('/home/aqsa/Desk...')
#2 {main}
thrown in /basic-ecommerce/system/CodeIgniter.php on line 184
I found my temporary solution in without updating the PHP Version in Xampp.
Go to C:\xampp\htdocs\projectfolder\system\CodeIgniter.php - line 184 and change the next line.
Before:
locale_set_default($this->config->defaultLocale` ?? 'en');
After:
if( function_exists('locale_set_default' ) ) :
locale_set_default($this->config->defaultLocale ?? 'en');
endif;
I haven't really been working working PHP for a long time now.
But thanks for this, I'll push the fix