stream_set_chunk_size(): The chunk size cannot be larger than 2147483647 in laravel

Viewed 1204

I am trying to install Craftable and when I run php artisan craftable:install command it throws the error:

In StreamHandler.php line 144: stream_set_chunk_size(): The chunk size cannot be larger than 2147483647

Please help me out to solve this issue.

3 Answers

A temporary solution would be going to your config/database.php and change the charset and collation from utf8mb4 to utf8.

'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',

This happens because utf8mb4 uses 4 bytes per character, and the email column has a 255 character length which is greater than the limit 767 bytes. 255 x 4bytes = 1020b.

I was facing the same problem while performing php artisan migration command & It resolved by correcting the memory_limit parameter in Xampp php.ini file.

Thanks

You can try to change memory_limit in php.in file XAMPP . I can solved same problem.

Related