The line-too-long error you mention now is a whole other ballgame from the one before. before, there was no data in the line, now there is too much. Variables are limited in their length to 900-something characters. Anything longer produces this problem. As far as I understand, the only way to get around is to use binary variables to store the stuff you read from the socket. Can't help you there tho.