I'm trying to fill a HTML table with some SQL Server 2008 r2 data, the controller (php_sqlsrv) works fine, the tables are filled very well, but when I try to retrieve a 2000 or more rows (maybe less) it crashes and shows this message:
SQL Error: Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -59 [code] => -59 [2] => Memory limit of 10240 KB exceeded for buffered query [message] => Memory limit of 10240 KB exceeded for buffered query ))
How can I fix this? Is this a PHP or a sqlsrv problem? Can I fix this from the SQL Server Management Studio?
Change the setting in php.ini.
Section: sqlsrv
Directive: sqlsrv.ClientBufferMaxKBSize.
add two lines in php.ini
extension=php_pdo_sqlsrv_55_ts.dll
extension=php_sqlsrv_55_ts.dll
client_buffer_max_kb_size = '50240'
sqlsrv.ClientBufferMaxKBSize = 50240
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With