You can also change the settings at run time if you do not want the production server to modify php.ini (check if this is applicable for your hosting).
Update the code with the 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 installation 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 set in in__set (). In addition, the server does not support configuration changes at run time.
source share