Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload contains garbage in code #2612

Closed
cyberduck opened this issue Sep 26, 2008 · 2 comments
Closed

Upload contains garbage in code #2612

cyberduck opened this issue Sep 26, 2008 · 2 comments

Comments

@cyberduck
Copy link
Collaborator

f5c22dd created the issue

I upload a PHP page which already exists on the server. It asks if I want to replace it so I click OK. I then test the newly uploaded page by accessing it from the Web browser and it gives a PHP error. After looking at the page (downloading it from the server to my desktop), I noticed it had some PHP code thrown in the middle of the page (which actually belongs at the bottom of the page), thus throwing a PHP syntax error. The code was correct on my local machine before I uploaded it. But after it was uploaded something got mixed up along the way.

To fix, I have to first delete the file from the server and then upload it again. It seems to be fine after doing that.

This doesn't always happen, but I have had it happen on at least 2 occasions. (It may be after the server failed to login the first time to the SSH account, but I haven't been able to confirm that).

@cyberduck
Copy link
Collaborator Author

f5c22dd commented

I have not confirmed this, but it may be due to the fact that some of the files have Windows line feed/breaks, while others Unix or Mac.

It's really be doing it a lot lately, and very very annoying. The only work-around is to delete the file from the server first.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Maybe the line ending conversion is the culprit. Then make sure to Binary as the transfer mode in the FTP Preferences.

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants