in reply to CGI script connecting via terminal but not via browser
Oops, never mind my original answer; I missed the line where you said the actual variables were filled in there.
It would seem there's a difference in the environment when it's run as a CGI by apache. You can compare by writing a simple CGI that reports on the environment and info on perl, like this:
#!/bin/sh perl -v echo ============================= set echo ============================= whoami echo ============================= pwd
Running that from the terminal and through a browser should help you spot any differences that might affect your script. The perl -v line especially will show if your script could be picking up different modules in either case.
Aaron B.
Available for small or large Perl jobs; see my home node.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CGI script connecting via terminal but not via browser
by nkrgupta (Novice) on Sep 18, 2012 at 10:33 UTC | |
by aaron_baugher (Curate) on Sep 18, 2012 at 12:09 UTC | |
by nkrgupta (Novice) on Sep 18, 2012 at 12:28 UTC |