[Webinar] Streamline your web hosting managementRegister Today

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

How to run perl script

Hi all,
      I am trying to migrate a web page to different server. The problem i am having is that for some reason the perl script are not executed, that cretes the web page. You can check teh web site out @
http://ns1.foolhq.com/bugzilla/home.cgi
Here you will see the code. instead of actuall HTML code. I have verified the location of perl, it's correct. Any suggestion??

Thanks in advance.
0
atif555
Asked:
atif555
  • 3
  • 3
  • 2
1 Solution
 
KennyIT Application ExecutiveCommented:
Firstly, you must be sure that the server allows you to run PERL scripts from the directory it is in (/bugzilla). Certain directories may not have execute access.

Secondly, your script has an extension of .cgi . The default extension for PERL scripts is .pl. Perhaps it does not recognise the scripts as PERL scripts because of the extension.

Hope it helps.
0
 
kawinCommented:
Hi atif,
      Your CGI script must put in /cgi-bin or other directory that you give excute permission (modify in httpd.conf ).

      Or use cgi-wrapper to allow other user in host to run their own CGI script (~/public_html/cgi-bin)

zxr250:
      Extension is not matter for CGI (C/Perl/Shell script). In unix if your file was excuteable it can run anyway.
      But if you have server site module like php it difference. It not CGI. File extension is told web server to start module to preprocess those script.

      I don't know about mod_perl (if you use).

Kawin.

0
 
atif555Author Commented:
Thank you Kawin to take the time and answer my question. I do have execution permition set on the directory. The permittion looks like "drwxrwxrwx" I did not understand about setting execution permittion in httpd.conf. Can you please explain this. How do i do this.

Thanks
0
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 
atif555Author Commented:
Adjusted points to 90
0
 
KennyIT Application ExecutiveCommented:
Then, my last guess (I think) would be that the file itself does not have execute permission. Check to make sure that the file also has execute permission. The UNIX default for files is NO execute permission.
0
 
KennyIT Application ExecutiveCommented:
just in case, this is how you add the execute permission to a file in UNIX, I think :

chmod +x home.cgi
or
chmod 0555 home.cgi
0
 
kawinCommented:
Add this to your httpd.conf

<Location /bugzilla>
....

</Location>

Please read for apache document about Location keyword.

It can add "excuteable"..
0
 
atif555Author Commented:
It needed to change permittion in the srm.conf. Anyway, thanks for you help.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

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