Date: Thu, 21 Oct 2004 00:56:42 -0700 From: Martin Paredes <mapsware@prodigy.net.mx> To: nocturnal <nocturnal@swehack.se>, freebsd-questions@freebsd.org Subject: Re: Binary/ASCII File upload issues Message-ID: <200410210056.42320.mapsware@prodigy.net.mx> In-Reply-To: <41739027.6040903@swehack.se> References: <41739027.6040903@swehack.se>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 18 October 2004 02:43, nocturnal wrote: > if i do file index.php on a file i uploaded that works just > fine with php ran as cgi i get "/path/index.php: a > /usr/local/bin/php script text executable" and if i do file > index.php on a customers index.php file which i think they > uploaded using binary transfer mode i get "script text > executable/bin/php" only, the second file doesn't work using > php as cgi, i get an internal server error, i know how to > fix this but i'm wondering if anyone could explain why this > happens on freebsd and if it's related to the ftp transfer if you transfer a file from unix to unix system, always use binary. but if you transfer from window to unix, you need to know if the file is text or binary In windows, make a file that contain the next line and transfer in binary Line1 Line2 In the unix edit the file with vi an you will see Line1^M Line2 In windows, the new line is conformed with 2 characters (10 and 13) and in unix with 1 character (13) when you tranfer in ascii, the strings [10][13] are converted to [13] maybe this extra character is the problem. maps
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410210056.42320.mapsware>