1

I've gone through nearly every solution I could find in regards to how to treat the newline issues associated with moving from Windows to Linux with a variety of programs yet I still receive server errors.

How I work now is that I have a guest machine in Virtualbox running CentOS. I avoided compatibility issues for a long time by simply running NetBeans in the guest; however, I run this on a laptop with limited memory and while CentOS runs fine for my purposes NetBeans slows to a crawl - I can only disable so many features before its stops being and IDE and becomes a glorified text-only editor. This prompted me to try to find a solution for the compatibility again.

I've tried dos2unix on CentOS with no avail. I've tried programs that can save in the appropriate format (NotePad++ for example) with no luck. I've tried NetBeans loading an existing file, reading that it will respect the existing newline. I've also tried the NetBeans plugin 'Show and Change Line Endings' - a very popular solution - and it still doesn't work (both loading & creating new files.) I uninstalled & reinstalled NetBeans and while PHP files will throw an error, a new HTML file will give me a "Forbidden" page and existing files will throw an error.

I'm pretty much at my wits end given that I cannot find any other compatibility issue aside from the newline, and any amount of searching produces only results regarding newline. I feel like I am missing something here, but even if I take an existing working file and just save it under Window's with the supposed solutions the file breaks.

4

2 回答 2

0

我想我理解你遇到的导致错误的行尾问题。

在 OS X 的 Coda2 ( http://www.panic.com ) 中,它将突出显示不同的新行结尾并更正它们。

我相信可用于 Windows 和 Linux 的 Sublime ( http://www.sublimetext.com/2 ) 也会这样做。

于 2013-05-03T21:18:09.237 回答
0

发现从 Windows 移动到 CentOS 的文件只继承了 root 权限;使用“chmod”更改权限以允许所有用户读取文件允许使用的内容。

例如:sudo chmod 754 mypage.html

于 2013-05-07T03:30:17.293 回答