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 200
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
Change the setting in php.ini.
Section: sqlsrv
Directive: sqlsrv.ClientBufferMaxKBSize.
You can also change the settings during runtime if you do not require production server to have the php.ini changed (Check if this is applicable with your hosting).
Update the code with following lines:
ini_set('memory_limit','256M'); // This also needs to be increased in some cases. Can be changed to a higher value as per need)
ini_set('sqlsrv.ClientBufferMaxKBSize','524288'); // Setting to 512M
ini_set('pdo_sqlsrv.client_buffer_max_kb_size','524288'); // Setting to 512M - for pdo_sqlsrv
To check if your server supports this, try printing the values after setting the above.
echo ini_get('memory_limit');
echo ini_get('sqlsrv.ClientBufferMaxKBSize');
echo ini_get('pdo_sqlsrv.client_buffer_max_kb_size');
The new values should be the ones we had set in ini_set(). Else, the server does not support runtime configuration changes.