Ctrl M chars all over the place

Installation issues with WoWRoster

Ctrl M chars all over the place

Postby Sprakeloos » Sat Jun 28, 2008 12:02 am

I'm trying to install roster 2.0 on my Debian Linux system but I get ctrl M chars in each and every php and html file at the end of each line.
Normally I would do a find/replace in vi but with such a huge number of files affected it will be alot of work :(

Almost forgot, this is happening after a binary upload with Filezilla.
I tried both packs with and without images.
Last edited by Sprakeloos on Sat Jun 28, 2008 12:10 am, edited 1 time in total.
User avatar
Sprakeloos
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Fri Aug 11, 2006 6:35 pm

Ctrl M chars all over the place

Postby Diska » Sat Jun 28, 2008 12:40 am

That's because the files are in DOS format. Most programs should not have troubles reading those files, including Apache.

Proper editors should also have no trouble handling those files, I'm sure that vi has a switch somewhere to convert the files.

You could also install the package tofrodos and then use to command dos2unix to convert the files to Unix format.

Last but not least, .php and .html files are plain-text, so they ought to be transferred in ASCII mode.
User avatar
Diska
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 179
Joined: Tue Jul 04, 2006 2:05 pm

Re: Ctrl M chars all over the place

Postby Sprakeloos » Sat Jun 28, 2008 12:56 am

It's not as simple as it sounds unfortunately.
Apache (at least on Linux) does have a problem with ctrl M inside files and converting all files 'one by one' isn't something I'm looking forward to.
Regarding the .php and the .html files, they're inside an archive which ought to be transferred in binary mode and not in ascii.
If the archive is transferred in ascii you can't unpack it.

In the meantime I've found a solution :
Download the .zip file and unpack it on the Windows PC.
Transfer all unpacked files from the Windows PC to the server in binary mode.
This will take a while since we're talking about 4880 files but it works :D
User avatar
Sprakeloos
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Fri Aug 11, 2006 6:35 pm

Ctrl M chars all over the place

Postby Diska » Sat Jun 28, 2008 1:04 am

Or try this: find /var/www/roster -type -f -iname "*.php" -exec fromdos {} \;

Ofcourse adapt the path to what's needed and do the same for .html


I didn't realise the .html and .php files were inside an archive btw, but you must've guessed that :)
And weird, I was really sure that Apache didn't mind files in dos format... (I'm running a server on Debian myself)
Last edited by Diska on Sat Jun 28, 2008 1:06 am, edited 2 times in total.
User avatar
Diska
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 179
Joined: Tue Jul 04, 2006 2:05 pm

Re: Ctrl M chars all over the place

Postby zanix » Sat Jun 28, 2008 5:33 am

Sprakeloos wrote:I'm trying to install roster 2.0 on my Debian Linux system but I get ctrl M chars in each and every php and html file at the end of each line.

Sorry, I must have fell asleep on the keyboard again :roll:



I pack up Roster releases on Windows, but the files should be Unix format
I use notepad++ to edit files, and when I updated the comment headers on almost every file, I tried to remember to set them to Unix format
I may have missed a few
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to Installation

Who is online

Users browsing this forum: No registered users and 0 guests

cron