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:[EMAIL PROTECTED]
> Sent: Friday, June 27, 2003 1:48 PM
> To: [EMAIL PROTECTED]
> 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;
> }
>
>

Reply via email to