Hi I've got this simple module:

#file:Apache2/AMFTest.pm;
#--------------------------------

#
# Created by Idel Fuschini
# Date: 01/08/10
# Site: http://www.apachemobilefilter.org
# Mail: idel.fusch...@gmail.com

package Apache2::AMFTest;

  use strict;
  use warnings;
  use Apache2::AMFCommonLib ();
  use Cache::Memcached;
  use Apache2::RequestRec ();
  use Apache2::RequestUtil ();
  use Apache2::SubRequest ();
  use Apache2::Log;
  use Apache2::Filter ();
  use Apache2::Connection ();
  use APR::Table ();
  use Apache2::Const -compile => qw(OK REDIRECT DECLINED);
  use constant BUFF_LEN => 1024;
  use vars qw($VERSION);
  $VERSION= "3.50";
  #
  # Define the global environment
  #
  my $memd = new Cache::Memcached {
    'debug' => 2,
    'compress_threshold' => 10_000,
    'enable_compress' => 1,
  };
my $server="localhost:11211";
my @Server = split(/,/, $server);
  $memd->set_servers(\@Server);
  $memd->set('AMFtest','test');
 if ($memd->get('AMFtest')) {
   print "OK: >".$memd->get('AMFtest')."<\n";
 } else {
   print "KO";
   exit;
}

sub handler    {
    my $f = shift;
    my $user_agent=$f->headers_in->{'User-Agent'}|| '';
    my $x_user_agent=$f->headers_in->{'X-Device-User-Agent'}|| '';
    $f->log->warn("AMFTest - User_Agent:$user_agent");
    $f->log->warn("AMFTest - Try to connect");
    my $result=$memd->get('AMFtest');
    $f->log->warn("AMFTest - Finish to connect the result is:".$result);
    return Apache2::Const::DECLINED;
}

And this is the error log:

[Thu Jan 19 12:43:58 2012] [warn] Init: Session Cache is not configured
[hint: SSLSessionCache]
Cache::Memcache: set AMFtest = test (set AMFtest 0 0 4
test)
processing socket GLOB(0x209264b0)
MemCache: got AMFtest = test
processing socket GLOB(0x209264b0)
MemCache: got AMFtest = test
[Thu Jan 19 12:43:58 2012] [notice] Digest: generating secret for digest
authentication ...
[Thu Jan 19 12:43:58 2012] [notice] Digest: done
Cache::Memcache: set AMFtest = test (set AMFtest 0 0 4
test)
processing socket GLOB(0x20236b40)
MemCache: got AMFtest = test
processing socket GLOB(0x20236b40)
MemCache: got AMFtest = test
[Thu Jan 19 12:43:59 2012] [notice] Apache/2.2.21 (Unix) mod_ssl/2.2.21
OpenSSL/1.0.0e DAV/2 mod_perl/2.0.5 Perl/v5.8.8 configured -- resuming
normal operations
[Thu Jan 19 12:44:59 2012] [warn] [client 10.5.31.85] AMFTest -
User_Agent:Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101
Firefox/9.0.1
[Thu Jan 19 12:44:59 2012] [warn] [client 10.5.31.85] AMFTest - Try to
connect
[Thu Jan 19 12:44:59 2012] [error] [client 10.5.31.85] No map found
matching for GLOB(0x202fee10) at
/usr/lib/perl5/site_perl/5.8.8/Cache/Memcached.pm line 717.\n

So outside the handler is connecting correctly, but when inside the handler
I've got this problem (the line in red color), I don't think is a memcached
problem.

The version of S.O. is:

Red Hat Enterprise Linux Server release 5.6 (Tikanga)


thanks
Idel
=====================
E-Mail: idel.fusch...@gmail.com
Web Site: http://www.idelfuschini.it
AMF project:  http://www.apachemobilefilter.org
AMF wiki: Apache Mobile Filter - http:/wiki.apachemobilefilter.org
------
La presente comunicazione ed i suoi allegati e' destinata esclusivamente
ai destinatari. Qualsiasi suo utilizzo, comunicazione o diffusione non
autorizzata
e' proibita. Se ha ricevuto questa comunicazione per errore, la preghiamo
di darne
immediata comunicazione al mittente e di cancellare tutte le informazioni
erroneamente acquisite. (Rif. D.Lgs. 196/2003). Grazie

This message and its attachments are intended only for use by the
addressees. Any use,
re-transmission or dissemination not authorized of it is prohibited. If you
received
this e-mail in error, please inform the sender immediately and delete all
the material.
(Rif. D.Lgs. 196/2003). Thank you.

Reply via email to