Anyone see why a $r = Apache=SCALAR(0x8461790) might not
respond true to $r->can('filename') on Ilya's below FreeBSD
setup?  The relevant ASP code is below.

Ilya, worst case, you can tweak that code to make it 
work for you, for example does a line like 

    unless($r && ($r =~ /^Apache/)) {

work instead ?  This might be a suitable test.

--Josh

sub handler {
    my($package, $r) = @_;
    my $status = 200;

    # allows it to be called as an object method
    ref $package and $r = $package;

    # rarely happens, but just in case
    unless($r && $r->can('filename')) {
        # this could happen with a bad filtering sequence
        warn(<<ERROR);
No valid request object ($r) passed to ASP handler; if you are getting
this error message, you likely have a broken DSO version of mod_perl
which often occurs when using RedHat RPMs.  One fix reported is to
configure "PerlSendHeader On".  Another fix is to compile
statically the apache + mod_perl build as RedHat RPMs have been trouble.
Please check FAQ or mod_perl archives for more information.
ERROR
  ;

Ilya Krel wrote:
> 
> I am running Freebsd 4.2, Summary of my perl5 (5.0 patchlevel 5 subversion
> 3), Apache/1.3.14, mod_perl/1.24  (from ports collection).
> Apache:ASP installed from cpan says:
> Bundle id = Bundle::Apache::ASP
>     CPAN_USERID  CHAMAS (Joshua Chamas <[EMAIL PROTECTED]>)
>     CPAN_VERSION 1.00
>     CPAN_FILE    C/CH/CHAMAS/Apache-ASP-2.07.tar.gz
>     MANPAGE      Bundle::Apache::ASP - Install Apache::ASP and related
> modules
>     CONTAINS     MLDBM Data::Dumper MD5 CGI HTML::Clean Net::SMTP HTTP::Date
> Devel::Symdump Apache::DBI Compress::Zlib Tie::Cache Time::HiRes Apache::ASP
>     INST_FILE    /usr/local/lib/perl5/site_perl/5.005/Bundle/Apache/ASP.pm
>     INST_VERSION 1.00
> 
> when i try to access the examples in site/eg I get thsi in error_log :
> No valid request object (Apache=SCALAR(0x8461790)) passed to ASP handler; if
> you are getting
> this error message, you likely have a broken DSO version of mod_perl
> which often occurs when using RedHat RPMs.  One fix reported is to
> configure "PerlSendHeader On".  Another fix is to compile
> statically the apache + mod_perl build as RedHat RPMs have been trouble.
> Please check FAQ or mod_perl archives for more information.
> 
> any suggestions how to fix it?
> 
> thx

Reply via email to