Problem with MSSQL and data getting corrupted on select - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Problem with MSSQL and data getting corrupted on select (/showthread.php?tid=27642) |
Problem with MSSQL and data getting corrupted on select - El Forum - 02-16-2010 [eluser]Unknown[/eluser] Hi all, I just discovered a very unfortunate bug in my CodeIgniter application and I'm looking to you for help resolving it. I'm running CI 1.7.2 on a WampServer talking to a MSSQL database and up until now, everything has been working fine. But here's what's happening. I have a simple form where I enter text and save what is essentially a blog (a title, body, status, etc.). On save this data goes into a record in a MSSQL database. Data is saving fine, but if the body field gets too long (over about 4kb), when I do a select to retrieve that record, the content of the body field gets corrupted. I know the issue has nothing to do with the data that is being saved. If I print_r the result of my select query what I see is very odd. The first 4k characters look exactly as I saved them, but after that I see some gibberish special characters along with some readable text that looks like this: �����)������G���������������������������������)���/** * Fetch Field Names * * Generates an array of column names * * @access public * @return array */�����a��������U�&.���$�����p�������������C:\wamp\www\ssh\system\database\DB_result.php����������a���a����U�&.�������1�������������C:\wamp\www\ssh\system\database\DB_result.php���������9���a������K ������/��������������result_id�����9���9���T�� �����0��H��ث� Does anyone know what is going on? Thank you. Josh Problem with MSSQL and data getting corrupted on select - El Forum - 03-02-2010 [eluser]Unknown[/eluser] Problem solved. One of the odbc settings in php.ini was setting the limit to 4096kb. |