1
toonstruck
Xoops Files Corrupting when Uploading via FTP
  • 2005/8/26 17:37

  • toonstruck

  • Just popping in

  • Posts: 12

  • Since: 2004/12/1


I mentioned this problem when upgrading to 2.2. Now I realize the problem wasnt just a one time occurence. When upgrading to 2.2.3, Im getting the same thing.

When I try to upload php files that already exist on the webserver (trying to overwrite new xoop patch over existing installation), it sometimes mixes the old and new PHP files together- therefore corrupting them.

I've tried three different FTP programs now. Have you ever heard of a problem like this? I can't figure out what is going on. The funniest thing is, this is only happening with XOOPS patches. I've never experienced this with the forum software I'm running or various other PHP packages.

2
jdseymour
Re: Xoops Files Corrupting when Uploading via FTP

Check your FTP program, make sure it is uploading the PHP files in binary mode, if not the files will be corrupt on transfer.

3
toonstruck
Re: Xoops Files Corrupting when Uploading via FTP
  • 2005/8/26 19:19

  • toonstruck

  • Just popping in

  • Posts: 12

  • Since: 2004/12/1


No.. im using ascii..

It literally is leaving only a line or two of the old php code in there. And that does not happen all the time. very odd.

4
jdseymour
Re: Xoops Files Corrupting when Uploading via FTP

PHP files should be uploaded as binary, not ascii. Try to re upload in binary mode.

Also check the permissions for the files, they should be chmod 644.

5
Peekay
Re: Xoops Files Corrupting when Uploading via FTP
  • 2005/8/26 21:38

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


AFAIK, although it doesn't normally make a difference, PHP files should ideally be uploaded in ascii mode. The reason is that different platforms use different line feed characters. Window systems use LF + CR (line feed + carriage return), Macs use a single CR and Linux systems use a single LF.

For example, if a PHP file has been created in a Mac text editor and zipped using a Mac archive utility, when you decompress it and view it using a PC text editor like notepad (not a dedicated PHP file editor) the 'foreign' line feed chars appear as little black or white blocks. The line breaks are destroyed.

If you then upload the file in binary mode to a Unix server, the format (or lack of it) is preserved. In my experience this can, on rare occasions, cause a script not to work. If you upload using ascii mode, the line feed characters in the files are automatically converted to the format of the target server OS.

Having said that, I'm afraid I have never experienced the FTP process blending files together instead of overwriting them.
A thread is for life. Not just for Christmas.

Login

Who's Online

169 user(s) are online (100 user(s) are browsing Support Forums)


Members: 0


Guests: 169


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits