All code collapses to one line after remote upload

I am developing a Wordpress plugin using PhpStorm.  I have been using PhpStorm with "Automatic Upload" to upload changes to a remote server.  Everything is fine as long as I continue to upload and download files inside PhpStorm, but any time I try to use something like Filezilla to download the files, all of the code for all of the files I have edited in PhpStorm at one time have been collapsed onto line 1.  Example:

<?phpglobal $wpsc_cart, $wpdb, $wpsc_checkout, $wpsc_gateway, $wpsc_coupons;global $current_user;$wpsc_checkout = new wpsc_checkout();$wpsc_gateway = new wpsc

I have also attached a file with the problem to this topic.

Any ideas on how to resolve and prevent this issue?  Thanks everyone.



Attachment(s):
wpsc-products_page.php.zip
5 comments
Comment actions Permalink

Hi Brad,

Try forcing binary transfer mode in FileZilla -- so far (my guess) it looks like line endings got changed when transferred in ASCII mode while PhpStorm still remembers what line ending was used in previous version of that file (although I'm not sure whay it affects "all of the files").

0
Comment actions Permalink

This didn't seem to make a difference.  In Filezilla, I changed Settings -> Transfers -> File Types -> Select "Binary" for "Default transfer type"

Is there any settings in PhpStorm I can use to prevent this in the future?  Thanks for your help!

0
Comment actions Permalink
Is there any settings in PhpStorm I can use to prevent this in the future?

Dunno ... honestly. I've no real idea anymore on what happened there (my original though was about line ending change during file transfer .. but looks like I was wrong).

0
Comment actions Permalink

Correction: This suggestion, to turn on Binary, DID work.  I'm not sure what I did incorrectly in the first attempt, but it definitely worked trying it again today.  It'd be great to find a solution to implement on PhpStorm's end, but this is a perfectly workable solution it looks like.  Thanks!

0

Please sign in to leave a comment.