Re: [PHP] Unix file vs. Mac file formats
On 9 May 2001 10:15:19 -0700, [EMAIL PROTECTED] ("Hoover, Josh") wrote: > because (correct me if I'm wrong), Macs use a different character for > carriage returns than Windows and/or Unix. There are two characters to delimit end of lines - Carrage Return (CR) and Line Feed (LF), which dates back to when printers needed to be told to return the print head back to the start of the line and to move the paper down a line. Sadly for us, this has resulted in a somewhat confused standard, with Windows using CRLF, Unix using LF and Macs using CR. If you upload via FTP using ASCII mode, this will probably be handled automagically for you, btw. -- Thomas 'Freaky' Hurst - [EMAIL PROTECTED] - http://www.aagh.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Unix file vs. Mac file formats
PHP at least used to execute Mac formatted files, but it sounds like people are definitely having some serious problems with 4.0.5 with Mac formatted files. The problems I had expereinced with Mac files with PHP was that PHP would report line numbers incorrectly on parse errors, etc. This was because (correct me if I'm wrong), Macs use a different character for carriage returns than Windows and/or Unix. Either way, you definitely should tell BBedit (or whatever program you write your code in) to save files as Unix file types. This will solve problems for any version of PHP. Also, here is a Mac utility that may help out Jon and others with batch converting Mac text files to Unix ones: http://hotfiles.zdnet.com/cgi-bin/texis/swlib/hotfiles/info.html?fcode=MC170 56&b=mac Josh Hoover KnowledgeStorm, Inc. [EMAIL PROTECTED] Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here > In my experience PHP never has properly executed files in the Mac file > format. We also use Macs to code php here, but we have bbedit > set to as Unix > file type.
Re: [PHP] Unix file vs. Mac file formats
on 5/9/01 9:42 AM, jon mclaughlin at [EMAIL PROTECTED] wrote: > Help! > > Does anyone have any tips on how to deal with this problem I'm having: > PHP 4.0.5 (on Redhat Linux as an Apache module) won't properly execute > included files that are saved in the Mac file format instead of a Unix file > format. (they use different characters to signify an end of line) > > The problem seems to arise with all code after a comment line declared with > //. The code actually seems to display on the screen as HTML text. Changing > the file to a Unix file format solves it. > > I'm trying to avoid changing all the files as we're moving dozens of sites > from a previous Linux server with PHP v4.0.3pl1 to this new server. This > problem doesn't happen on the old server. > > Is it an issue with the new version? Is there some sort of configuration > switch I should be looking at? Any suggestions? > > Thanks! > > ..jon In my experience PHP never has properly executed files in the Mac file format. We also use Macs to code php here, but we have bbedit set to as Unix file type. There are several scripts out in the net both perl and bash that can do this conversion for you, directory wide. Then tell your Mac programmers to change their prefs and all should be well. -- Dave Goodrich Director of Interface Development Reality Based Learning Company 9521 NE Willows Road, Suite 100 Redmond, WA 98052 Toll Free 1-877-869-6603 ext. 237 Fax (425) 558-5655 [EMAIL PROTECTED] http://www.rblc.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Unix file vs. Mac file formats
Help! Does anyone have any tips on how to deal with this problem I'm having: PHP 4.0.5 (on Redhat Linux as an Apache module) won't properly execute included files that are saved in the Mac file format instead of a Unix file format. (they use different characters to signify an end of line) The problem seems to arise with all code after a comment line declared with //. The code actually seems to display on the screen as HTML text. Changing the file to a Unix file format solves it. I'm trying to avoid changing all the files as we're moving dozens of sites from a previous Linux server with PHP v4.0.3pl1 to this new server. This problem doesn't happen on the old server. Is it an issue with the new version? Is there some sort of configuration switch I should be looking at? Any suggestions? Thanks! ..jon -- ..::.:..::.::.:.:..::..:::...:.:.::.::.::.:.. jon mclaughlin digitalnoise.com a division of PLATFORM.NET .:.:.:..::.:.:::..:::...:.:.::.::.:.::.:. p:646.613.3510 c:917.612.8261 f:646.613.3599 e:[EMAIL PROTECTED] ..::.:..::.::.:.:::...:.:.::.::..:..::.:.::.: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]