简体   繁体   中英

Retrieving an xml string more than 65536 Characters in length via mssql_execute in PHP from a remote server

I'm working on a linux server (OPENSuSE // Apache 2 // PHP5) that connects to an MSSQL db on a Windows server and executes a stored procedure to retrieve an xml string which is passed back to the linux server as part of an array.

It works for the most part, but I'm now seeing issues with one or two rows where the xml is more than 65536 characters in length - they seem to be being curtailed - is this an issue which can be fixed in php.ini or is it a problem with the set up of the mssql server?

I may not have given enough information so please ask away and I'll provide as much as I can.

Thanks

Rather than storing the values as text, store them in a blob (or other binary format), and compress them first (http://us3.php.net/manual/en/function.gzcompress.php)

The blob doesn't have a max length, so you wont run into issues, and you'll save on back and forth by compressing the data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM