All -

 I'm now trying to get Lincoln Stein's
Apache::TicketTool module to run (as described in
Writing Apache Modules with Perl and C
(http://www.modperl.com/book/chapters/ch6.html#Cookie_Based_Access_Control)

My Dynamic mod_perl2.0.1 was built on solaris 2.8.
>From apache error_log:
[Wed Jul 06 11:26:52 2005] [notice] Apache/2.0.54
(Unix) DAV/2 mod_perl/2.0.1 Perl/v5.8.6 configured

Here is the beginning of the TicketTool package
---------------------------------------------
package Apache::TicketTool;
 
 use strict;
 use Tie::DBI ();
 use CGI::Cookie ();
 use MD5 ();
 use LWP::Simple ();
 use Apache::File ();
 use Apache::URI ();
 
 my $ServerName = Apache->server->server_hostname;
 
 my %DEFAULTS = (
    'TicketDatabase' => 'mysql:test_www',
    'TicketTable'    => 'user_info:user_name:passwd',
    'TicketExpires'  => 30,
    'TicketSecret'   =>
'http://$ServerName/secret_key.txt',
    'TicketDomain'   => undef,
 );

The problem I'm having is with the differences between
mod_perl_2.x and the mod_perl_1.x release (which
apparently this code was based on). Does anyone know
how to get the server_hostname from mod_perl_2.x in a
way similar to the code here
"Apache->server->server_hostname;" ? I see that from a
request object I could get a server object and from
that possibly the server_hostname, but at the point in
the code - we have not yet asked for a request object.

Also looking for the equivalent mod_perl_2.x packages
to Apache::File and Apache::URI. 

Any help is appreciated.

 -thanks
 Ray Licon

Reply via email to