Monday, May 22, 2017

Laravel 4.2 Eloquent only returning 1MB data

I have a mediumtext field in my mySQL database and it only return 1MiB data (a string with length 1048576) with the later part of the string trimmed when I query the database. A common solution I found online is adding this option to database.php config file.

'options'   => array(
    PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => false,
    PDO::MYSQL_ATTR_MAX_BUFFER_SIZE => 16777216
)

However, it still only returns 1MiB of data. What else can be the reason causing the problem?



via cytsunny

Advertisement