FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 6th, 2012, 12:09 PM
Jeska Jeska is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 3 Jeska User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 44 sec
Reputation Power: 0
Question Right-Click -> Save-As causing corrupt(?) file

[editing to clarify]
I am generating a csv file with PHP with a .txt extension on a CentOS server.

If I FTP this file down using either ASCII or Binary mode, it works fine. If I right-click and Save As from my browser (happens in IE and Firefox), it blows up my merge document (Word 2007).

The good file and the bad one are exactly the same size. I've done a byte by byte value comparison and the files are identical. To make the bad file good, all I have to do is open it in GVim and save it. Saving it in Notepad does not make it good.

I'm baffled as to what is wrong with this file when downloading through the browser that is not wrong when using FTP. It does not appear to be an end-of-lines problem as I have tried a number of combinations.

Any ideas?

Reply With Quote
  #2  
Old April 6th, 2012, 11:03 PM
E-Oreo's Avatar
E-Oreo E-Oreo is offline
Lost in code
Dev Shed God 7th Plane (8000 - 8499 posts)
 
Join Date: Dec 2004
Posts: 8,063 E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)  Folding Points: 945 Folding Title: Novice Folder
Time spent in forums: 2 Months 1 Day 6 h 49 m 31 sec
Reputation Power: 7104
Do the two files have an identical md5 checksum?
__________________
PHP FAQ
How to program a basic, secure login system using PHP
Connect with me on LinkedIn


Quote:
Originally Posted by Spad
Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

Reply With Quote
  #3  
Old April 9th, 2012, 08:56 AM
Jeska Jeska is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 3 Jeska User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 44 sec
Reputation Power: 0
Quote:
Originally Posted by E-Oreo
Do the two files have an identical md5 checksum?

The md5 checksums are identical in both text and binary mode.
Inspection with od says the files are identical.
Diff says the files are identical.
A C program that does a byte by byte inspection says the files are identical.

I'm at a loss as to what's going on.

Reply With Quote
  #4  
Old April 9th, 2012, 09:44 AM
Jeska Jeska is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 3 Jeska User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 44 sec
Reputation Power: 0
I found the problem. Windows was helping me. They're very helpful.

It noticed that the file "came from another computer" and silently blocked it to "protect" me. To make the file not blow things up, I had to go to it's properties and click the Unblock button.

Since the metadata is stored outside the file, the files themselves were identical.

Thanks for your help!

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > Right-Click -> Save-As causing corrupt(?) file

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap