Apache-DBI

 view release on metacpan or  search on metacpan

traces.txt  view on Meta::CPAN


                      Traces of the ApacheDBI modules

The traces are supposed to serve as a reference, to check the local setup.
They also serve as specification for regression testing of the modules.

Note: 

  - in order to see the traces in the error_log, you need to enable full debug output
    by setting $Apache::DBI::DEBUG = 2 and $Apache::AuthDBI::DEBUG = 2.
  - make sure, that the output of the same server is observed (check process id !)
    unless AuthDBI is tested and the usage of shared memory is configured.
  - here we show only the traces of one specific module, 
    in reality the traces are a mix of all used modules and of all servers
  - in all auth-traces the REQUEST has been deleted 
  - $; appears as '{'


1. Apache::DBI
--------------

1.1. normal persistent database connection

     new connect:

     1150 Apache::DBI             need ping: yes
     1150 Apache::DBI             new connect to 'dbname=template1{{{AutoCommit=1{PrintError=1'
     1150 Apache::DBI             disconnect (overloaded) 

     re-use of connection:

     1151 Apache::DBI             need ping: yes
     1151 Apache::DBI             already connected to 'dbname=template1{{{AutoCommit=1{PrintError=1'
     1151 Apache::DBI             disconnect (overloaded) 


1.2. PerlCleanupHandler: check if a rollback is initiated when using a connection with 
     AutoCommit = 0 (data_source: dbi:Pg(AutoCommit=>0):dbname=template1):

     1150 Apache::DBI             push PerlCleanupHandler 
     1150 Apache::DBI             need ping: yes
     1150 Apache::DBI             new connect to 'dbname=template1{{{AutoCommit=0{PrintError=1'
     1150 Apache::DBI             disconnect (overloaded) 
     1150 Apache::DBI             PerlCleanupHandler 
     1150 Apache::DBI             PerlCleanupHandler rollback for dbname=template1{{{AutoCommit=0{PrintError=1 


1.3. PerlChildInitHandler: check if a pre-configured connection in startup.pl is initiated.

     the following entries are supposed to appear in the error_log once for every server:

     1033 Apache::DBI             PerlChildInitHandler 
     1033 Apache::DBI             need ping: yes
     1033 Apache::DBI             new connect to 'dbname=template1{httpd{www{AutoCommit=1{PrintError=1'


1.4. timeout for ping: set PingTimeOut > 0 and verify, that the first database access shows 
     'need ping: yes' (unless a database handle has been created upon server startup). 
     The second access immediately afterwards shows 'need ping: no' and the third access after 
     timeout seconds again shows 'need ping: yes'. Always watch the same server !
     De-activate ping with setting timeout = -1 and check for 'need ping: no'.


1.5. After having initiated a persistent connection check the perl-status menu-item
     'DBI connections' ( http://localhost/perl-status?DBI ). Be sure, to check a server,
     which has a database handle !

     Datasource                 Username

     dbname=test_auth


-------------------------------------------------------------------


2. Apache::AuthDBI::authen
--------------------------

2.1. normal authentication, setCacheTime(60), no cleanup handler

     ==========
     25362 Apache::AuthDBI::authen request type = >initial main< 
     25362 Apache::AuthDBI::authen get_basic_auth_pw: res = >401<, password sent = ><
     -------------- here the password requester of the browser pops up --------
     ==========
     25364 Apache::AuthDBI::authen request type = >initial main< 
     25364 Apache::AuthDBI::authen get_basic_auth_pw: res = >0<, password sent = >support<
     25364 Apache::AuthDBI::authen user sent = >support<
     25364 Apache::AuthDBI::authen Config{ pwdcasesensitive } = on
     25364 Apache::AuthDBI::authen Config{ pwd_whereclause  } = 
     25364 Apache::AuthDBI::authen Config{ placeholder      } = off
     25364 Apache::AuthDBI::authen Config{ log_field        } = 
     25364 Apache::AuthDBI::authen Config{ uid_field        } = userid
     25364 Apache::AuthDBI::authen Config{ authoritative    } = on
     25364 Apache::AuthDBI::authen Config{ data_source      } = dbi:Pg:dbname=test_auth
     25364 Apache::AuthDBI::authen Config{ grp_field        } = groupid
     25364 Apache::AuthDBI::authen Config{ encrypted        } = on
     25364 Apache::AuthDBI::authen Config{ pwd_field        } = passwd
     25364 Apache::AuthDBI::authen Config{ nopasswd         } = off
     25364 Apache::AuthDBI::authen Config{ grp_table        } = groups
     25364 Apache::AuthDBI::authen Config{ pwd_table        } = users
     25364 Apache::AuthDBI::authen Config{ password         } = 
     25364 Apache::AuthDBI::authen Config{ log_string       } = 
     25364 Apache::AuthDBI::authen Config{ uidcasesensitive } = on
     25364 Apache::AuthDBI::authen Config{ username         } = 
     25364 Apache::AuthDBI::authen Config{ grp_whereclause  } = 
     25364 Apache::AuthDBI::authen passwd not found in cache 
     25364 Apache::AuthDBI::authen statement: SELECT passwd FROM users WHERE userid = 'support'
     25364 Apache::AuthDBI::authen passwd = >su7/poGcpDQWY<
     25364 Apache::AuthDBI::authen user support: password match for >su7/poGcpDQWY< 
     25364 Apache::AuthDBI::authen return OK


2.2. normal authentication as above, check if cached password is used

     discard all traces up to the Config section



( run in 1.957 second using v1.01-cache-2.11-cpan-5b529ec07f3 )