Author: Wenlong Wu
1. for ms SQL SERVER databases
There are two solutions:
Modify php. ini to achieve this: Open php. ini and you can see two options: mssql. textsize and mssql. textlimit:
; Valid range 0-2147483647. Default = 4096.
; Mssql. textlimit = 4096
; Valid range 0-2147483647. Default = 4096.
; Mssql. textsize = 4096
You can see that the default configuration is 4096 bytes, that is, the common request is truncated to 4 kb. Change it to the appropriate size, remove the semicolon, and then save and restart the WEB server.
From the two options above, we can see that the range is 0-2147483647 bytes. In fact,-1 can also be used. Check the PHP source code and you will find that-1 indicates no limit.
If (MS_ SQL _G (textlimit )! =-1 ){
Sprintf (buffer, "% li", MS_ SQL _G (textlimit ));
If (DBSETOPT (mssql. link, DBTEXTLIMIT, buffer) = FAIL ){
Efree (hashed_details );
Dbfreelogin (mssql. login );
RETURN_FALSE;
}
}
If (MS_ SQL _G (textsize )! =-1 ){
Sprintf (buffer, "set textsize % li", MS_ SQL _G (textsize ));
Dbcmd (mssql. link, buffer );
Dbsqlexec (mssql. link );
Dbresults (mssql. link );
}
Run the set textsize command before querying in PHP: run the command before SELECT.
Mssql_query ("set textsize 65536 ");
From the above PHP source code, we can see that set textsize is actually executed.
II. For Sybase databases
Because this extension is not configurable in php. ini as in SQL SERVER, the preceding method is used only:
Run
Sybase_query ("set textsize 65536 ");