Question: I am connecting to an mssql db on a Windows Server using the FREETDS driver for Linux via PHP.

The web server running the application in running OPENSuSE, Apache2 with PHP, FreeTDS drivers to connect to the Windows box, which it does fine.

I can execute the stored procedure and view the data that it produces, but the outputted data for each array value seems to stop at 64512 bytes (checked using strlen in PHP) - is this a problem on the PHP side or the MS side? Does anyone know how I can fix it?

Answer: 
Have you checked your config file and increased the text size? See the [FAQ](http://freetds.schemamania.org/faq.html#textdata)

```
1> set textsize 10000
2> go

```

> 
> See also the text size option in freetds.conf
> 
> 
>
Or you can add these values in .htaccess:

```
php_value mssql.textlimit 10000000

php_value mssql.textsize 10000000

```

I had the same problem and I fixed it by increasing the value for mssql.textlimit and mssql.textsize to an arbitrary value.