Class yii\i18n\formatter does not exist

Hello Guyz,

I am having this error in production server:

The application is working fine on my local host but the error only appears in the production. I replaced my whole application on the server but still same error.

I have added in config folder web.php file the following code in components:


'formatter' => [

        'class' => 'yii\i18n\formatter',

        'thousandSeparator' => '.',

        'decimalSeparator' => ',',

        'currencyCode' => 'EUR'

    ],     

I need to fix it quickly but I don’t understand where to start from. I am using it only to show currency symbols in some grids. My last resort would be to remove the currency formatter if it doesn’t get solved.

Does it depends on the PHP version as well?

Edit: Some info after using phpinfo()

Localhost:

PHP Version 5.4.27

System Windows NT…

ICU version 49.1.2

Production:

PHP Version 5.4.39-0+deb7u2

System Linux

ICU doesn’t exsist it seems. Can’t find it by using phpinfo()

Thanks in advance.

Hi!

I guess your dev machine is a windows?

And production a linux?

Try it case-sensitive with uppercase F:


'formatter' => [

        'class' => 'yii\i18n\Formatter',

        'thousandSeparator' => '.',

        'decimalSeparator' => ',',

        'currencyCode' => 'EUR'

    ],     



… Regarding this:

So you basically saying:

You are developing applications for a target system whose requirements & specifications you don’t know?

Brave… but also not very "wise".

What would you do now if the server was not even able to run your project?

Just a tip for the future:

Inform yourself about the target system BEFORE even start making any further plans.

Regarding the php version.

Just google: detect php version. ;)

Regards

Hey, I am no pro developer just doing my small project for the company. The IT department is outsourced to other country so I couldn’t ask anyone about it. But I have edited my post to include system requirements using phpinfo()

Thanks for helping out.

Just to avoid misunderstanding on my side.

Is your problem solved by proposed solution?

Regards

Hey much thanks to you. It did solve the problem. It got me scared. Linux is too strict.

Thanks again.