[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modperl
Subject: RE: Problem with PerlTransHandler
From: <csebe () fx ! ro>
Date: 2003-06-27 13:39:12
[Download RAW message or body]
Have you tried to comment out the 2 DBI lines like this:
#my $dbh = DBI->connect('dbi:mysql:db', 'user', 'pswd');
#$dbh->disconnect;
and is still not working? You really need the database connection?
Lian
> -----Original Message-----
> From: Sergey V. Stashinskas [mailto:sergei_stashinsk@mail.ru]
> Sent: Friday, June 27, 2003 1:48 PM
> To: modperl@perl.apache.org
> Subject: Problem with PerlTransHandler
>
>
> Hi all,
>
> Excuse me for my poor English because I'm from Russia.
>
> I have the problem with url translation.
> There are 2 scripts to do it.
> 1st script work perfectly, but 2nd failed.
> Only difference between them is string "my $dbh = DBI->connect...";
> I use Apche::DBI but without this module the same thing happens.
> Why?
>
> 1st:
> package Apache::StripSession
> use strict;
> use Apache;
> use Apache::Constants qw(:common);
>
> sub handler {
> my $r = shift;
>
> return DECLINED unless $r->uri =~ /^\/session\/([a-zA-Z0-9]{32})(.*)/;
>
> $r->subprocess_env(SESSION => $1);
> $r->uri($2);
>
> return DECLINED;
> }
>
> 2nd:
> package Apache::StripSession;
> use strict;
> use Apache;
> use Apache::Constants qw(:common);
>
> sub handler {
> my $r = shift;
>
> my $dbh = DBI->connect('dbi:mysql:db', 'user', 'pswd');
> $dbh->disconnect;
> return DECLINED unless $r->uri =~ /^\/session\/([a-zA-Z0-9]{32})(.*)/;
>
> $r->subprocess_env(SESSION => $1);
> $r->uri($2);
>
> return DECLINED;
> }
>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic