Here's my deal: I have a site running PHP 5 (5.2.5) on a Windows server that talks to the MSSQL 2005 database for data. I am accessing the database using the latest version of ADODB. I have a table with a unique identifier and a text box. All this works well and well until the text field reaches a certain size (until it was possible to determine the exact cut-off point).
The problem occurs when I try to get a row from a database with a length of about 5 million characters. This extraction works fine if I do it through SQL management studio and returns all the data.
The SQL server does not return an error message when the query is executed via PHP, but it does not return any real data.
I played with the usual suspects, for example, raising the mssql.textlimit and textize parameters, for example:
ini_set("mssql.textlimit",2147483647 );
ini_set("mssql.textsize",2147483647 );
I also tried sending the request "set textsize 2147483647" unchanged.
If I take a data substring, I could theoretically combine all this together, but the substring returns a varchar, which is limited to 8000 characters, and as such would require something like 875 queries to get the full amount, which is actually not a great idea.
Does anyone have any idea? +
source
share