Clinton Gormley wrote:
On Mon, 2007-07-30 at 18:21 +0800, Ken Perl wrote:
I've configured  the Apache::DBI in httpd.conf like this,

PerlModule Apache::DBI

I didn't have  Apache::DBI->connect_on_init($data_source, $username,
$auth, \%attr) in startup.pl since we don't use startup.pl. and the
doc says to config it in httpd.conf is OK.

my question is I can not find any persistent connections for my CGI
script. any usage error here?

Persistent connections will not work for straight CGI scripts, because
CGI is not persistent.

For each CGI request, a new perl interpreter is loaded, your script is
compiled, run, and the Perl process exits.

mod_perl IS persistent, as are your CGI scripts run via
ModPerl::Registry etc.

You don't need connect_on_init to work, but you do need mod_perl

Clint
Mr Gormley,

You're being semantically picky with this guy, and innacurately so.
An apache registry script *is* a CGI script. So is an ASP page, a PHP script, and any other interpreted way fo dealing with CGI input.

CGI stands for 'Common Gateway Interface and describes the method of transferring information to a form to the server. A CGI script is therefore a script designed to deal with CGI input, which means it doesn't matter if it's in Perl or not, and it doesn't matter if it's an Apache Registry script or a standalone non-mod_perl Perl script that's doing the work. All that matters is that it can read CGI input (or at least the subset that it's designed to deal with) and that it is interpreted at runtime (as mod_perl registry CGI scripts are).

The guy also obviously most likely has mod_perl because he is using the PerlModule directive in his conf *and* because he's using a startup.pl file.

--
Dodger

Reply via email to