On Sun, May 27, 2012 at 6:36 PM, Luis Muñoz <luisemu...@gmail.com> wrote:
> Write a small cgi script that dumps the environment and take a look. You > might be surprised > I'll second that. There is a really good chance that Apache is not giving your script the same environment as the shell. And that is why can't find Perl. Here's a snippet about environment variables from the Apache documentation on CGI: Path information and environment When you run a program from your command line, you have certain information that is passed to the shell without you thinking about it. For example, you have a PATH, which tells the shell where it can look for files that you reference. When a program runs through the web server as a CGI program, it may not have the same PATH. Any programs that you invoke in your CGI program (like sendmail, for example) will need to be specified by a full path, so that the shell can find them when it attempts to execute your CGI program. A common manifestation of this is the path to the script interpreter (often perl) indicated in the first line of your CGI program, which will look something like: #!/usr/bin/perl Make sure that this is in fact the path to the interpreter. In addition, if your CGI program depends on other environment variables<http://httpd.apache.org/docs/2.0/howto/cgi.html#env>, you will need to assure that those variables are passed by Apache. -- Robert Wohlfarth
_______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/