MSSQL strings truncated to 4096 characters in PHP

I found when retrieving long TEXT fields from an MSSQL database using PHP, that the response was truncated to 4096 characters. I found the solution here;

Issuing the query

immediately after connecting to the database fixed the problem.

But I was unable to make the php.ini settings work. I added the two settings

to the php.ini file, and the modified settings were visible in the phpinfo() information:

but the fields were still truncated.

Leave a Reply