Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 323
  • Last Modified:

configuring perl interpreter on apache server

hello!

i'm developing websites using perl 5.6.1 on our linux apache server 1.3.20.
unfortunately in every perl script i have to add an option (-T or -w or even -(alone)) to perl in the shebang line #!/usr/bin/perl

can anyone tell me how i can configure my perl interpreter or my apache server to avoid this, because it makes the interpreter much slower than without any option.

thanks to all the experts out there!
petschki
0
petschki
Asked:
petschki
  • 3
  • 2
1 Solution
 
linxitCommented:
When you say you HAVE to add an option, what do you mean?

What error message is returned when you don't add the option to the shebang line?

Andy
0
 
petschkiAuthor Commented:
there's a "500 internal server error" an the error_log file says, that the interpreter is not found on the server...
0
 
linxitCommented:
I think I know what the problem is...and it's nothing to do with Perl or Apache.

Are you writing the files in Windows, then uploading them to your Linux server?

If the shebang line ends in the DOS crlf character it shows up in Linux as ^M at the end of the line. So apache is looking for a file called /usr/bin/perl^M. If you put -(anything) after it, perl know how to handle its command-line flags and just ignores the ^M.

To test, run the following command:

dos2unix yourprog.pl > test.pl

and try to run test.pl
0
 
petschkiAuthor Commented:
thanks a lot...
but one question: do you know an editor on windows, which makes the (unix)correct linebreaks?
i'm using macromedia homesite 5.0 and didn't find a possibility

peter
0
 
linxitCommented:
You should be able to set it in Homesite. Try this:

Choose Options > Settings from the menu bar.
Select "File Settings"
Under the "Format when saving" option, select "Unix."

Andy
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now