|
Posted by Jψrn Dahl-Stamnes on 02/26/07 13:43
Jerry Stuckle wrote:
> JΓΈrn Dahl-Stamnes wrote:
>> Jerry Stuckle wrote:
>>
>>> Well, first of all, you shouldn't be using addslashes. You should be
>>> using mysql_real_escape_string(), especially since this is binary data.
>>
>> Try that to - does not work.
>>
>>> And when you say the data is different - exactly what is different about
>>> the two? There could be lots of things going on here, and without
>>> knowing what's different, it's impossible to say.
>>
>> I downloaded the same file from the same client to both the test- and the
>> prod-server. The filesize is 7 bytes larger on the prod-server. Doing a
>> diff on the two files (from the prod and the test-server) creates A LOT
>> of output.
>>
>>> For instance - once uploaded, are the files exactly the same (before you
>>> do anything to them)?
>>
>> Exactly the same.
>>
>>> Also, what charset is being used by MySQL?
>>
>> The data is stored in BLOB, which is, according to the manuals, pure
>> binary. No character set is used. Please correct me if I'm wrong.
>> I'm using "DEFAULT CHARACTER SET latin1 COLLATE latin1_danish_ci" when
>> creating the table.
>>
>
> I guess first of all I'm confused. Are you DOWNloading or UPloading the
> files? There is a difference - and it's important!
I'm uploading the file from the client to the server.
However... I began to suspect that the problem was in the network. It turned
out to be a problem in my firewall, since both the prod server and the cold
backup for the prod server was behind a fire wall (client -> fw -> server),
while the test-server was on the same net as the client.
So, after modifying the firewall, it worked out just fine!!
Then, my code is OK and the problem has been solved. Thanks a lot to all
replies.
--
JΓΈrn Dahl-Stamnes
http://www.dahl-stamnes.net/dahls/
Navigation:
[Reply to this message]
|