500 Internal Server Error - with a twist

Please support our Perl advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: May 2007
Posts: 2
Reputation: TysonDude is an unknown quantity at this point 
Solved Threads: 0
TysonDude TysonDude is offline Offline
Newbie Poster

Re: 500 Internal Server Error - with a twist

 
0
  #11
May 31st, 2007
I had this same problem. I used a program called EditPlus and it created the same problem for me. I never could solve it with EditPlus, but I have figured it out in Komodo.

Perhaps you have already figured this out or don't need a solution any more, but I wanted to post my solution here in case anyone else stumbles across this post. Hopefully it will help you out.

I believe the cause is Windows adding in line breaks. Since these line breaks are invisible in editors, there are no apparent problems. But when the compiler attempts to run the program, an internal server error occurs.

Here is what I did:
1. With the file open, select "Edit => Current File Settings..."
2. Next to Line Endings, change "DOS/Windows (\r\n)" to "UNIX (\n)"
3. Unclick the box next to "Preserve existing line endings"
4. Reupload (remote save) the file

This should hopefully solve your problem, as it did mine.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 66
Reputation: lordspace is an unknown quantity at this point 
Solved Threads: 4
lordspace's Avatar
lordspace lordspace is offline Offline
Junior Poster in Training

Re: 500 Internal Server Error - with a twist

 
0
  #12
Jun 5th, 2007
a nice trick is to use this:

use CGI::Carp qw(fatalsToBrowser);

Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 2
Reputation: TysonDude is an unknown quantity at this point 
Solved Threads: 0
TysonDude TysonDude is offline Offline
Newbie Poster

Re: 500 Internal Server Error - with a twist

 
0
  #13
Jun 5th, 2007
Originally Posted by lordspace View Post
a nice trick is to use this:

use CGI::Carp qw(fatalsToBrowser);
This is definately helpful code, but it unfortunately does not help in this scenario. I believe it is because the line breaks cause the error before the program can be compiled.
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 898
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 67
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: 500 Internal Server Error - with a twist

 
0
  #14
Jun 5th, 2007
Nearly all FTP applications silently convert the line endings when you upload a file from a local computer to a remote computer. So if you upload from windows to Unix or Linux there should be nothing to worry about. You should upload in ASCII (text) mode though for text files.

Some FTP applications you choose the remote computer type from a list and some do the checking automatically and convert the line endings as needed.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Perl
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC