in reply to Perl - open with Apache
How does Apache invoke the script? mod_perl? CGI? FastCGI? It may simply be a setting in the configuration of one of these within Apache. If you just have a script which only prints those diagnostics and then exits, doing literally nothing else, then you can confirm that the PWD is being set outside the script itself. I would warn() instead of print() for this (so it will appear in the error log) but YMMV:
#!/usr/bin/env perl use strict; use warnings; warn "Directory is " . `pwd`; warn "Contents are \n" . `ls -al`; exit;
If that confirms it you might also want to dump %ENV to see what else might be going on.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl - open with Apache
by djneely (Initiate) on Feb 04, 2020 at 17:57 UTC |