codeigniter4 / CodeIgniter4

Open Source PHP Framework (originally from EllisLab)
https://codeigniter.com/
MIT License
5.39k stars 1.9k forks source link

Bug: migration error Class 'Locale' not found #6557

Closed smartyoon closed 2 years ago

smartyoon commented 2 years ago

PHP Version

7.4, 8.0, 8.1

CodeIgniter4 Version

4.2.6

CodeIgniter4 Installation Method

Composer (as dependency to an existing project)

Which operating systems have you tested for this bug?

macOS

Which server did you use?

fpm-fcgi

Database

mysql8

What happened?

When I enter the migration command, I get an error.

Class 'Locale' not found

at SYSTEMPATH/CodeIgniter.php:181

Backtrace: 1 ROOTPATH/spark:83 CodeIgniter\CodeIgniter()->initialize()

Steps to Reproduce

php spark migration status

Expected Output

[Error]

Class 'Locale' not found

at SYSTEMPATH/CodeIgniter.php:181

Backtrace: 1 ROOTPATH/spark:83 CodeIgniter\CodeIgniter()->initialize()

Anything else?

No response

kenjis commented 2 years ago

Duplicate of #4775, #3294 See https://codeigniter4.github.io/CodeIgniter4/intro/requirements.html#server-requirements

smartyoon commented 2 years ago

The module installation is already complete. Installed to suit the conditions.

[PHP Modules] bcmath bz2 calendar Core crypto ctype curl date dom exif fileinfo filter ftp gd gettext hash iconv imagick intl json libxml mbstring mcrypt mysql mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar readline Reflection session SimpleXML soap sockets sodium SPL sqlite3 standard tokenizer xml xmlreader xmlwriter xsl Zend OPcache zip zlib

kenjis commented 2 years ago

@smartyoon How did you get the info?

smartyoon commented 2 years ago

@kenjis PHP Modules is information that you have installed yourself.

kenjis commented 2 years ago

@smartyoon No, no. My question is: How did you get the output?

kenjis commented 2 years ago

Try:

$ php74 spark migrate status
smartyoon commented 2 years ago

@kenjis You are a genius!! Problem solved. Thanks!

kenjis commented 2 years ago

As you know, at least you have two php commands, php and php74. And these are not the same.