Microsoft SQL Server text data column and PHP length problems

I’ve had this problem before: PHP truncates results from a SQL Server text field to 4096 characters. (This is running PHP under Apache on Windows.) To save myself having to work out the right Google terms again, this is the solution: change the following in php.ini (note that ini_set doesn’t appear to work:

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

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

Advertisements
This entry was posted in Programming. Bookmark the permalink.

One Response to Microsoft SQL Server text data column and PHP length problems

  1. Alex says:

    At work with sql files i usually use next software-sql server database repair,tool is free as far as i know,it repair data from corrupted databases in the MS SQL Server format (files with the *.mdf extension),supports data extraction via the local area network,can save recovered data as SQL scripts, it is also possible to split data into files of any size,compatible with all supported versions of Microsoft Windows, such as Windows 98, Windows Me, Windows NT 4.0, Windows 2000, Windows XP, Windows XP SP2, Windows 2003 Server, Windows Vista,tool supports the following database formats: Microsoft SQL Server 7.0, 2000, 2005,also can repair .mdf files of Microsoft SQL Server 2005, repair mdf file of Microsoft SQL Server 2005 (64-bit).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s