The situation is this:
our database are images in base64 in a field of type text
when getting fields from PHP typical request — field image is clipped to 4096 bytes.
How to get a field of normal length?
Installed in php.ini
mssql.textlimit = 2147483647
mssql.textsize = 2147483647
— does not help...
Have found this solution:
$q = $db->query ('SET TEXTSIZE 2147483647');
ini_set ('mssql.textlimit' , '2147483647');
ini_set ('mssql.textsize' , '2147483647');
$q = $db->query("select CONVERT(TEXT, img) from [shop].[dbo].[news_image] WHERE id = $id");
$res = $q->fetchAll();
the result is the same — returns only 4096 bytes, i.e. the early part of the picture.
Did anyone with this and how did you decide on?
It has now been decided by the stored procedure which collects all of the temp table and returns, and then the script glues the line — well, it's the decision to put it mildly I was not very impressed with :)