How to fix stream_set_chunk_size(): The chunk size cannot be larger than 2147483647

If you have this error:

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

there are 2 options how to fix it, one of the mentioned options should work.

 

Option 1:

In the php.ini file you have a large value for the memory_limit parameter. Try to reduce it, for example:

memory_limit = 256M

Option 2:

In the database connection settings (in Laravel: config / database.php) change:

'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',

To:

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

Comments

No comments yet, you can leave yours: