Welcome Guest, Not a member yet? Register   Sign In
Problem with MSSQL and data getting corrupted on select
#1

[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
#2

[eluser]Unknown[/eluser]
Problem solved. One of the odbc settings in php.ini was setting the limit to 4096kb.




Theme © iAndrew 2016 - Forum software by © MyBB