Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Help required for CGI Script

by Corion (Pope)
on Dec 27, 2012 at 09:39 UTC ( #1010476=note: print w/ replies, xml ) Need Help??


in reply to Help required for CGI Script
in thread CGI Script Working fine from my command prompt but Shows Internal server error when called through browser

Likely, the user your CGI script runs as is not the user you are using from the command line. Or maybe the web server user does not have access to the autostatus program because $ENV{PATH} is set up differently under your web server than it is for your command prompt. You never check the result/error status of your backtick call.

As a first and easy try, I would attempt to give the full path to autostatus instead of hoping that $ENV{PATH} is set up as it is for your shell account.


Comment on Re: Help required for CGI Script
Select or Download Code
Re^2: Help required for CGI Script
by Anonymous Monk on Dec 27, 2012 at 10:07 UTC
    I have given the full path , still that doesnot work.

      You will need to do more debugging. Find out what user your CGI gets run as. Find out what the error code is when you try to launch the autostat program. Find out whether the launched program outputs an error message. Such an error message could end up in the web server error log for example. Compare the rest of the environment of the CGI script to the environment of the shell.

        can you please tell me how OR WHAT COMMANDS to use

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1010476]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2014-07-12 11:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (239 votes), past polls