?
Solved

configuring perl interpreter on apache server

Posted on 2003-02-24
5
Medium Priority
?
321 Views
Last Modified: 2010-03-04
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
Comment
Question by:petschki
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:linxit
ID: 8008148
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
 

Author Comment

by:petschki
ID: 8008190
there's a "500 internal server error" an the error_log file says, that the interpreter is not found on the server...
0
 
LVL 2

Accepted Solution

by:
linxit earned 200 total points
ID: 8008346
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
 

Author Comment

by:petschki
ID: 8008526
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
 
LVL 2

Expert Comment

by:linxit
ID: 8009000
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month7 days, 20 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question