« NASA & Google Team Together at AMES | Main | Knowledge Management from a government contractor done wrong »

Micorosft SQL Server and PHP Text Size limitations

Recently I had to debug why I was unable to insert more then 4096 characters of information into a text field of my MSSQL database from a PHP script I was running. After some googling I saw people reference setting the TEXTSIZE attribute. This did not seem to do the trick for me. After some stumbling around I dicivered the problem lies in the php.ini file. You need to set the folllowing variables as shown below.

; Valid range 0 - 2147483647. Default = 4096.
mssql.textlimit = 2147483647

; Valid range 0 - 2147483647. Default = 4096.
mssql.textsize = 2147483647

Bug Fixed

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)