Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Trouble with Perl CGI script

by sparkyichi (Deacon)
on Jul 28, 2005 at 14:45 UTC ( [id://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.

Sparky
FMTEYEWTK

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.

        Sparky
        FMTEYEWTK

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2024-04-23 14:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found