Symfony2 : how to fix the “Warning: SessionHandler::read()” Exception

If you too you got an error like this one :

Warning: SessionHandler::read(): open(\xampp\tmp\sess_hagg7jkmp7l7fmh5ec4k6jmgu0, O_RDWR) failed: No such file or directory (2) in [...]\app\cache\dev\classes.php line 423

I let you know that you just have to add/change these 2 lines in app/config/config.yml to fix it :

        handler_id: session.handler.native_file
        save_path: "%kernel.root_dir%/sessions"

PHP : How to install Intl extension in Xampp ?

The PHP Internationalization extension is used, amongst others, by Symfony (for validators). This extension allows you to write codes like this one :

$formatter = new NumberFormatter('en_US', NumberFormatter::DECIMAL);
echo $formatter->format(1234567.89); // 1,234,567.89

$formatter = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo $formatter->format(1234567.89); // 1 234 567,89

$formatter = new NumberFormatter('en_US', NumberFormatter::CURRENCY);
echo $formatter->getTextAttribute(NumberFormatter::CURRENCY_CODE); // USD

$formatter = new NumberFormatter('pt_BR', NumberFormatter::CURRENCY);
echo $formatter->getTextAttribute(NumberFormatter::CURRENCY_CODE); // BRL

and so much more, including formatting of currency, number and date/time as well as UCA-conformant collations (customizable method to compare two strings).

To activate this extension in Xampp, just edit your php.ini (i.e. in C:\xampp\php directory) and remove the semicolon to uncomment this line :


Eventually don’t forget to restart Apache !