SunQuest
           FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old February 2nd, 2003, 03:39 PM
gashad gashad is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Chicago
Posts: 24 gashad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Frustration with FTP + notepad + php

Hey guys,

Now I know this is not a PHP-specific issue, but I have a really annoying problem!

I'm using LeapFTP + windows notepad to upload php scripts to a server.

Anyway, LeapFTP has an option where you can right click the file that is on the server, goto "edit"... it loads the PHP file in windows notepad. you can edit the file, then save it, go back to leapftp and hit the "upload now" button

Anyway, my php scripts lose all of their formatting & the scripts are broken because it will put stuff on the same line & smush it all together.

so if I have something like
//2-2-03 this script does stuff
require("file.php")

it will convert it to
//2-2-03 this script does stuffrequire("file.php")

and smudge everything together like that.

It does this randomly. sometimes it saves my new lines & spacings fine, but other times it smudges it together.

I have my FTP program to make *.php files upload as ASCII, i'm on windows XP using a cable modem

any suggustions?
-pete

Reply With Quote
  #2  
Old February 2nd, 2003, 04:00 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
shot answer: LeapFTP is ok. Itīs notepadīs fault. try using wordpad instead, it can deal with unix line-ends.

also switching to binary transfer would solve the problem.
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
  #3  
Old February 2nd, 2003, 04:50 PM
cmaxwell cmaxwell is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: UK
Posts: 67 cmaxwell User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 45 m 43 sec
Reputation Power: 6
Pete,

Do you have "Word Wrap" enabled in the Format menu of Notepad? I have never experienced any problems with Notepad when editing PHP files.

You might want to look at a better text editor - one that I would personally recommend is UltraEdit:

http://www.ultraedit.com

Good luck with Notepad, however, and let me know how you get on.

Best Regards,

- Chris

Reply With Quote
  #4  
Old February 3rd, 2003, 08:40 AM
dogmaticbastard dogmaticbastard is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Northwood, OH
Posts: 3 dogmaticbastard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to dogmaticbastard Send a message via Yahoo to dogmaticbastard
I suggest taking a look at Notetab, a freely available and very great text editor that will make you wish Notepad was off your system. Find it and all its wonderful capabilities at URL

Reply With Quote
  #5  
Old February 15th, 2003, 03:32 PM
gashad gashad is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Chicago
Posts: 24 gashad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ASCII or Binary?

sorry for the double post, the devshed forums are acting weird for me.

Last edited by gashad : February 15th, 2003 at 03:38 PM.

Reply With Quote
  #6  
Old February 15th, 2003, 03:33 PM
gashad gashad is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Chicago
Posts: 24 gashad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ASCII or Binary?

M.Hirsch,
You said,
Quote:
also switching to binary transfer would solve the problem.


I thought you're always supposed to have text transfered as ASCII & stuff like images/program files transfered as binary.

Does anyone have more info on that? (or a link to a good article)

Cmaxwell:
It's not wordwrap--It doesn't even have to be w/ a php file, I've had it happen with HTML several times, for instance.

Sometimes I will edit a file, then when I actually save the file, everything gets corrupted.

Thanks,
-Pete

PS: I downloaded NoteTab--it's a nice program!

Reply With Quote
  #7  
Old February 16th, 2003, 02:51 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
Quote:
I thought you're always supposed to have text transfered as ASCII & stuff like images/program files transfered as binary.

Does anyone have more info on that? (or a link to a good article)


if you transfer as ASCII, the line ends are translated, i.e. in windows a line ends with \r\n (13, 10), in unix you only have a \n. Notepad cannot deal with \n only, but wordpad, homesite and many others can.

It used to be (afaik) that unix webservers would require you to send ASCII and translate the line ends because they were not able to deal with the additional #13 . this does not apply to html, but to scripts. But today all script interpreters that i know of donīt care if you are using unix or windows line-ends.

Reply With Quote
  #8  
Old April 4th, 2004, 01:20 PM
jasonturk jasonturk is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 1 jasonturk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I've had the same problem myself. Try using a program like Textpad. A fully working demo version is available. If you save under a PC file format initially in textpad then it will always open proprely in notepad. So you wont have to have notepad on the computer you edit the site from! (:

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > Frustration with FTP + notepad + php


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway