xavier8854 has asked for the wisdom of the Perl Monks concerning the following question:
Hello, monks,
Here is the problematic code of my CGI#!/usr/bin/perl -w use strict; use File::Basename; use CGI; use CGI::Carp; use Config::Tiny; chdir dirname($0); my $config = Config::Tiny->read('Config.ini'); croak "Cant read Config.ini" unless $config; .....
This works perfectly in debugger, even from shell, and generates the Web page as expected.
But at runtime in Apache, despite chdir dirname($0), it misearbly croaks
Sure, it is a current directory problem, but what did I miss ?
Thanx in advance, Xav
PS : as a new user, a short introduction : Im a senior IT engineer (systems, networks). Preferred OS FreeBSD. 57 yo, from France
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Config::Tiny croaks at runtime, not in debugger
by haukex (Archbishop) on May 06, 2016 at 15:12 UTC | |
|
Re: Config::Tiny croaks at runtime, not in debugger
by xavier8854 (Novice) on May 17, 2016 at 17:35 UTC | |
by Your Mother (Archbishop) on May 17, 2016 at 17:45 UTC |