Solved

Hiding CGI-Perl Code...How?

Posted on 1998-03-19
2
289 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 90 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
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 modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

734 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