Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Hiding CGI-Perl Code...How?

Posted on 1998-03-19
2
Medium Priority
?
310 Views
Last Modified: 2013-12-25
Sometimes I notice servers screw up on calls to CGI-Perl programs and instead of them launching the perl script, they actually show you the perl code like a text file being viewed in the broweser.

I'd hate for this to happen to my CGI-Perl code and would love to take any measures to prevent this.  What options do i have?

I've heard of using FILTER:: to hide your source code, but I really don't know much else than the name.  I've also heard of converting the perl source code into byte-code or C and compiling.  

Please, any help you can give me on hiding the contents of my perl code would be GREATLY APPRECIATED!

Thanks.
0
Comment
Question by:mirror
[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
2 Comments
 
LVL 2

Accepted Solution

by:
haystor earned 180 total points
ID: 1832177
There are two possible causes of this:
one would be a runaway ", or '  during a print.  This should be easy enough to track down if you actually test your program after writing it.

The other cause would be not setting up the cgi-bin directory as a cgi directory.  If this is not done, and depending on the extension, and how the server handles it, it could be displayed as text/html.

Once you have your scripts running ok, you only need to worry about the first one.  Most runaway quotes will be caught at comile time by Perl.  However it is possible for the quotes to be just wrong enough to print your statement and continue printing your code beyond that.  There is no way around this, other than running your script, and viewing it yourself.

0
 
LVL 1

Expert Comment

by:thufir
ID: 1832178
The other possibility that occasionally happens is that the script isn't set executable.  ALWAYS be sure to run "chmod 755" on the script files.  I've had that happen on occasion...if it's not executable, the source will show in the browser.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

618 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