good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^9: DBI placeholders for spatial databy afoken (Chancellor) |
on Jul 01, 2021 at 05:48 UTC ( [id://11134524]=note: print w/replies, xml ) | Need Help?? |
Of course you won't see the web server environment variables when running code from an SSH shell.
Nonsense. When you run from the web server, i.e. a CGI or something running via mod_perl, you will see exactly the same variables as Perl. There is no way to hide anything. If DBI can see an environment variable, so can any other perl code started by the web server. Depending on how your shared hosting is configured, your CGIs may actually be run via mod_perl, using ModPerl::Registry. Loading Apache::DBI from the webserver may also happen. That changes how DBI->connect() works, as documented in Apache::DBI. The documentation also gives a hint how to detect that situation: $ENV{'MOD_PERL'} is set and $INC{'Apache/DBI.pm'} should exist. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|