|
Joined: Nov 2002
Posts: 30
Junior Member
|
Junior Member
Joined: Nov 2002
Posts: 30 |
I have a UBB board running on a server of a friend. He has installed the whole set of programs to get the webserver running, on a Linux machine. I got an account on the server to down and upload files. Now I have this strange problem: When I download cgi files from the server and open them on my pc with notepad, the text in the files is messed up. I get rectangels instead of hard returns.. So when I use the multihack program to install hacks with, I only get errors because certain lines are not recognized.. Now I can open up the cgi files with wordpad MFC or any other program. The rectangles are gone! so I save the file in wordpad MFC.. multihack works now.. I install the hacks.. upload them to the server... and boom.. board crashes.. internal server error.. somehow the cgi files are changed so that linux can't read them anymore! Anybody got a clue how to fix this? I down and upload the files with smartftp.. ASCI file mode checked on. thanks for any help 
|
|
|
|
Joined: Nov 2001
Posts: 1,704
Moderator / Da Masta
|
Moderator / Da Masta
Joined: Nov 2001
Posts: 1,704 |
Obviously you're doing the right thing locally... Have you tried using a different FTP program?
|
|
|
|
Joined: Nov 2002
Posts: 30
Junior Member
|
Junior Member
Joined: Nov 2002
Posts: 30 |
Okay I have installed flash FXP.. set the data transfer to ASCI mode.. downloaded one of the *.cgi files.. opened it with notepad.. still the same problem 
|
|
|
|
Joined: May 2000
Posts: 1,356
Addict
|
Addict
Joined: May 2000
Posts: 1,356 |
Notepad is a silly program, it can not read unix line endings. Open the file in Wordpad or an advanced text editor like TextPad...
Try this, open the file in wordpad and save it as "text only"... Also dont forget to send them in ascii to server and chmod if necessary
|
|
|
|
Joined: Nov 2002
Posts: 30
Junior Member
|
Junior Member
Joined: Nov 2002
Posts: 30 |
Okay I opened the a *.cgi file in wordpad MFC
when I choose save as I can choose between:
rtf textdocument textdocument ms-dos unicode textdocument
which one?
|
|
|
|
Joined: May 2000
Posts: 1,356
Addict
|
Addict
Joined: May 2000
Posts: 1,356 |
|
|
|
|
Joined: Jun 2001
Posts: 729
Coder
|
Coder
Joined: Jun 2001
Posts: 729 |
"Text Only" would be considered a text document 
|
|
|
|
Joined: May 2000
Posts: 1,356
Addict
|
Addict
Joined: May 2000
Posts: 1,356 |
Btw, what do you mean by "MFC" ?
|
|
|
|
Joined: Nov 2002
Posts: 30
Junior Member
|
Junior Member
Joined: Nov 2002
Posts: 30 |
well when I choose open with in XP I get the option wordpad MFC not good  ??
|
|
|
|
Joined: Nov 2002
Posts: 30
Junior Member
|
Junior Member
Joined: Nov 2002
Posts: 30 |
I opened up a file *.cgi and saved it as text only in wordpad. but I know already it is going wrong since the file size is now changed... had that problem before..
|
|
|
|
Joined: Jun 2001
Posts: 729
Coder
|
Coder
Joined: Jun 2001
Posts: 729 |
If you open a file up that is taken from your server in Notepad it will not be easy to read as all the lines will run into each other.
Wordpad will properly format and retain the formating of the file. The file size WILL increase.
Remember you have to re-upload the file in the proper format. If you are unsure just open the file in an editor on your server, enter a space on the first line, press the back button to remove it and save. This will change the file formating properly.
|
|
|
|
Joined: Nov 2002
Posts: 30
Junior Member
|
Junior Member
Joined: Nov 2002
Posts: 30 |
quote: Originally posted by 1QuickSI: Remember you have to re-upload the file in the proper format. If you are unsure just open the file in an editor on your server, enter a space on the first line, press the back button to remove it and save. This will change the file formating properly. hehe well that is kind of the problem.. I'm not able to get them in proper format (so linux can read them).. the server is extern so I cannot open a file on my server.. Now I have even edited the cgi file with an cgi editor.. but even that won't help a thing..
|
|
|
|
Joined: Jun 2001
Posts: 729
Coder
|
Coder
Joined: Jun 2001
Posts: 729 |
Can you telnet or have access vis SSH?
The problem is that the file is not being uploaded properly to the server.
What CGI editor are you using? It is it on the server or workstation?
I only use VI or PICO
|
|
|
|
Joined: Nov 2002
Posts: 30
Junior Member
|
Junior Member
Joined: Nov 2002
Posts: 30 |
Thnx for all the help so far guys... I have been playing around with it, and found out that multihack has this option to choose what kind of line ending you want. option is called end of line terminator.. 2 options CR/LF and LF. If I choose for only LF the files are exported in the correct way... Now I only need to upload them to check if they work... but suppose to! 
|
|
|
|
Joined: Aug 2000
Posts: 335
Member
|
Member
Joined: Aug 2000
Posts: 335 |
Just noting that Windows uses CR/LF and Linux uses LF. And Mac, I think, uses CR, but my Mac knowledge is not up-to-date.
|
|
|
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
OSX, being a Unix, uses LF. Older Macs use CR.
UBB.classic: Love it or hate it, it was mine.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 449
Joined: February 2008
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|