Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Trouble with Perl CGI script

by sparkyichi (Deacon)
on Jul 28, 2005 at 14:45 UTC ( #478993=note: print w/ replies, xml ) Need Help??

in reply to Trouble with Perl CGI script

I would verify that your web server is using the same perl install that you are using from the command line.

Another option would be to make a CGI script that will list the your @INC values and compair that to what you get from the command line.


Comment on Re: Trouble with Perl CGI script
Replies are listed 'Best First'.
Re^2: Trouble with Perl CGI script
by chakkaln (Sexton) on Jul 28, 2005 at 14:50 UTC
    Hi Sparky, Good point. I have actually two version of perl. One in usr/bin and the other is usr/local/bin which is the latest version. When running from the commandline, it uses the latter as the path is set that way. How can I tell the same when running it from the browser. Also how do I get the @INC values both from the brwser and the command line Thanks a lot Nagesh
      To get the values in @INC, simply print @INC;. To find out which perl executable is running your script, print $^X;. My guess is that you will have to make configuration changes to the webserver to tell it which version of perl to use, although you would think it would look at the #! line.
        Ya, I think there is a setting in Apache's conf file, but it has been quite some time that I have been mucking with apache.

        Note, that most often when you can run it from the command line and it doesn't work from http, there is usialy a permissions issue. Although I have never experianced issue with modules in my @INC.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2015-11-27 07:22 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (719 votes), past polls