Here's my deal: I've got a site running PHP 5 (5.2.5 specifically) on a windows server, that's talking to a MSSQL 2005 database for it's data. I'm accessing the database using the latest version of the ADODB framework. I have a table with a unique id and a text field. This all works well and good until the text field reaches a certain size (haven't been able to determine the exact cutoff point yet)
The issue comes when I'm trying to retrieve a string from the database that's roughly 5 million character long. This retrieve works fine if I do it through the SQL Management studio and returns all the data.
The SQL server isn't returning any error message when the query is run through PHP, but it's not returning any of the actual data.
I've played around with the usual suspects, like upping the mssql.textlimit and textsize config options like so:
ini_set("mssql.textlimit",2147483647 );
ini_set("mssql.textsize",2147483647 );
I've also tried sending a query of "set textsize 2147483647" with no change.
If I take a substring of the data I could theoretically piece it all together, but substring returns a varchar which is limted to 8000 characters and as such would require something like 875 queries to get the full amount which isn't really a great idea.
Anybody have any ideas? +