Re: compile latest CVS
Stas Bekman wrote: You can also try to use the latest src.rpm from rawhide, I'm not sure how recent it is http://fr.rpmfind.net//linux/RPM/rawhide/1.0/i386/RedHat/RPMS/mod_perl-1.99_09-6.i386.html says Jul 16, which is very recent. great, I got the source rpm of the above, after compiling and installing it on my redhat 9 system it works fine :-) I have even got the authCookieLdap module working after playing with compat and cheat a bit on use strict , more on this in my next mail to the list ; subject: Re: problem with method auth_type thanks a lot to all of you .
Re: problem with method auth_type
OK, it works now :-) On my redhat 9 system, I recompiled from rawhide latest source rpm, now I run with: $ rpm -q mod_perl httpd mod_perl-1.99_09-6 httpd-2.0.47-1 by using apache::compat, PerlOptions +GlobalRequest and cheating on the use strict it now works :-), i can authenticate through https to an ldap server through authcookieldap module . I know authcookie is about to be port to mod_perl 2 and apache 2, and I hope it will allowed me to run a cleaner configuration . for those of you interested, here's what I went through: httpd.conf PerlModule Apache2 PerlModule Apache::AuthCookieLDAP PerlSetVar INTAuthPath / PerlSetVar INTAuthLoginScript /perl/login.pl PerlSetVar INTAuthSatisfy Any PerlSetVar INTAuthExpires +2h # These must be set PerlSetVar INTAuthLDAP_DN dc=int-evry,dc=fr PerlSetVar INTAuthLDAP_SecretKeyFile /etc/httpd/conf/ssl.key/ca.key PerlSetVar INTAuthLDAP_User uid PerlSetVar INTAuthDBI_DSN mysql:test #PerlSetVar INTAuthLDAP_filter F=on PerlSetVar INTAuthLDAP_host ldapserver.int-evry.fr PerlSetVar INTAuthLDAP_EncryptionType none PerlSetVar INTAuthLDAP_SessionLifetime 00-24-00-00 # Protected by AuthCookieLDAP. Location /mci PerlOptions +GlobalRequest PerlFixupHandler Apache::DB AuthType Apache::AuthCookieLDAP AuthName INTAuth PerlAuthenHandler Apache::AuthCookieLDAP-authenticate PerlAuthzHandler Apache::AuthCookieLDAP-authorize Limit GET POST require valid-user /Limit /Location Files LOGIN #PerlOptions +GlobalRequest AuthType Apache::AuthCookieLDAP AuthName INTAuth SetHandler perl-script PerlHandler Apache::AuthCookieLDAP-login /Files cheat: $ /etc/init.d/httpd restart Stopping httpd:[FAILED] Starting httpd: [Thu Jul 31 14:47:09 2003] [error] Bareword OK not allowed while strict subs in use at /usr/lib/perl5/site_perl/5.8.0/Apache/AuthCookieLDAP.pm line 755. Bareword FORBIDDEN not allowed while strict subs in use at /usr/lib/perl5/site_perl/5.8.0/Apache/AuthCookieLDAP.pm line 758. Compilation failed in require at (eval 4) line 3. so I commented out use strict; in /usr/lib/perl5/site_perl/5.8.0/Apache/AuthCookieLDAP.pm , :-( Then accessing the /mci ldap protected directory in a navigator, generated the following http error.log [Thu Jul 31 14:49:38 2003] [error] [client 157.159.50.198] Global $r object is not available. Set: PerlOptions +GlobalRequest in httpd.conf at /usr/lib/perl5/site_perl/5.8.0/Apache/AuthCookie.pm line 216. So I added PerlOptions +GlobalRequest in httpd.conf as stated above !. thanks to all of you . PS: Authors of authcookie and authcookieldap, please let me know if you port your modules to apache 2 and mod_perl 2. Stas Bekman wrote: jehan procaccia wrote: hello, I followed the thread : http://www.gossamer-threads.com/archive/mod_perl_C1/modperl_F7/mod_perl_2.0_question_about_$r-%3Econnection-%3Eauth_type_P51273/#51273 While using module AuthCookieLDAP based on AuthCookie I got exactly the same error: Use of uninitialized value. [Wed Jul 23 16:25:54 2003] [error] [client 127.0.0.1] Can't locate object method auth_type via package Apache::Connection at /usr/lib/perl5/site_perl/5.8.0/Apache/AuthCookie.pm line 182.!, referer: http://localhost/ldap I am trying to Authenticate HTTP connection to an openldap Server, using AuthCookie and AuthCookieLDAP, both written for apache 1.3.X and mod_perl 1.X. Here I use Apache 2.0.40 and mod_perl-1.99_07-5 (which is supposed to be mod_perl 2.0 I understood !?) on a RedHat 9 system. Although I added PerlModule Apache::compat and PerlOptions +GlobalRequest in httpd.conf , I still get the above mentioned error :-( Any help ? Thanks. PS: The author of AuthCookie is about to port its module to mod_perl 2.0, maybe that would solve the problem, but when, and why doesn't it work now with Apache::compat ? http://perl.apache.org/docs/2.0/user/porting/compat.html#C__connection_E_gt_auth_type_ Have you tried the latest cvs of mod_perl2? Apache::compat provides the necessary code there: package Apache::Connection; # auth_type and user records don't exist in 2.0 conn_rec struct # 'PerlOptions +GlobalRequest' is required sub auth_type { shift; Apache-request-ap_auth_type(@_) } sub user { shift; Apache-request-user(@_) } For more info see: http://perl.apache.org/download/source.html#Development_mod_perl_2_0_Source_Distribution __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
problem with method auth_type
hello, I followed the thread : http://www.gossamer-threads.com/archive/mod_perl_C1/modperl_F7/mod_perl_2.0_question_about_$r-%3Econnection-%3Eauth_type_P51273/#51273 While using module AuthCookieLDAP based on AuthCookie I got exactly the same error: Use of uninitialized value. [Wed Jul 23 16:25:54 2003] [error] [client 127.0.0.1] Can't locate object method auth_type via package Apache::Connection at /usr/lib/perl5/site_perl/5.8.0/Apache/AuthCookie.pm line 182.!, referer: http://localhost/ldap I am trying to Authenticate HTTP connection to an openldap Server, using AuthCookie and AuthCookieLDAP, both written for apache 1.3.X and mod_perl 1.X. Here I use Apache 2.0.40 and mod_perl-1.99_07-5 (which is supposed to be mod_perl 2.0 I understood !?) on a RedHat 9 system. Although I added PerlModule Apache::compat and PerlOptions +GlobalRequest in httpd.conf , I still get the above mentioned error :-( Any help ? Thanks. PS: The author of AuthCookie is about to port its module to mod_perl 2.0, maybe that would solve the problem, but when, and why doesn't it work now with Apache::compat ?
compile latest CVS
hello I just donwloaded latest cvs as stated in : http://perl.apache.org/download/source.html#Development_mod_perl_2_0_Source_Distribution Now I don't really understand what directory is supposed to contain the MP_AP_PREFIX variable ? Nothing is not a solution: [EMAIL PROTECTED] /usr/local/src/Mod_perl/modperl-2.0] $ perl Makefile.PL !!! Unable to determine server version, aborting. !!! Please specify MP_APXS or MP_AP_PREFIX. When I point it to apache 2.0.47 sources in configure ok apparently: [EMAIL PROTECTED] /usr/local/src/Mod_perl/modperl-2.0] $ perl Makefile.PL MP_AP_PREFIX=/usr/src/redhat/BUILD/httpd-2.0.47/ Reading Makefile.PL args from @ARGV MP_AP_PREFIX = /usr/src/redhat/BUILD/httpd-2.0.47/ Configuring Apache/2.0.47 mod_perl/1.99_10-dev Perl/v5.8.0 generating script t/TEST ... But after while compiling : [EMAIL PROTECTED] /usr/local/src/Mod_perl/modperl-2.0] $ make cd src/modules/perl make -f Makefile.modperl make[1]: Entering directory `/usr/local/src/Mod_perl/modperl-2.0/src/modules/perl' I get hundreds of error about ap* header files apparently; In file included from /usr/src/redhat/BUILD/httpd-2.0.47/include/httpd.h:72, from modperl_apache_includes.h:11, from mod_perl.h:4, from mod_perl.c:1: /usr/src/redhat/BUILD/httpd-2.0.47/include/ap_config.h:58:17: apr.h: No such file or directory In file included from /usr/src/redhat/BUILD/httpd-2.0.47/include/ap_config.h:59, from /usr/src/redhat/BUILD/httpd-2.0.47/include/httpd.h:72, from modperl_apache_includes.h:11, from mod_perl.h:4, from mod_perl.c:1: /usr/src/redhat/BUILD/httpd-2.0.47/srclib/apr-util/include/apr_hooks.h:58:17: apu.h: No such file or directory However, apr.h for example is here: $ locate apr.h /usr/include/httpd/apr.h /usr/include/apr-0/apr.h /usr/src/redhat/BUILD/apr-0.9.3/include/apr.h.in /usr/src/redhat/BUILD/apr-0.9.3/include/apr.hnw /usr/src/redhat/BUILD/apr-0.9.3/include/apr.hw /usr/src/redhat/BUILD/apr-0.9.3/include/apr.h /usr/src/redhat/BUILD/apr-0.9.3/test/test_apr.h /usr/src/redhat/BUILD/httpd-2.0.47/srclib/apr/test/test_apr.h /usr/src/redhat/BUILD/httpd-2.0.47/srclib/apr/include/apr.h.in /usr/src/redhat/BUILD/httpd-2.0.47/srclib/apr/include/apr.hw /usr/src/redhat/BUILD/httpd-2.0.47/srclib/apr/include/apr.hnw /usr/src/redhat/BUILD/httpd-2.0.45/srclib/apr/include/apr.h.in /usr/src/redhat/BUILD/httpd-2.0.45/srclib/apr/include/apr.hnw /usr/src/redhat/BUILD/httpd-2.0.45/srclib/apr/include/apr.hw /usr/src/redhat/BUILD/httpd-2.0.45/srclib/apr/test/test_apr.h How can I compile mod_perl 2.0 ? mybe I should use MP_APXS instead, but again what directory should I point it to ? thanks .
Re: compile latest CVS
You guessed very well ! now it compiles with no problem, so on a redhat system use: [EMAIL PROTECTED] /usr/local/src/Mod_perl/modperl-2.0] $ perl Makefile.PL MP_APXS=/usr/sbin/apxs MP_APR_CONFIG=/usr/bin/apr-config I'll continue with my AuthCookie now ... good weekend ! Stas Bekman wrote: jehan procaccia wrote: hello I just donwloaded latest cvs as stated in : http://perl.apache.org/download/source.html#Development_mod_perl_2_0_Source_Distribution Now I don't really understand what directory is supposed to contain the MP_AP_PREFIX variable ? It's the path where Apache was installed to. I'm not on RH so I'm not sure where it installs it to. But from looking at the RH rpms, it spreads things across different dirs. There is a RH rpm package which includes the build instructions specific to RH, just grab the src.rpm from here: http://fr.rpmfind.net/linux/rpm2html/search.php?query=mod_perlsubmit=Search+... next look at the spec file, it says: # Compile the module. %{__perl} Makefile.PL /dev/null \ PREFIX=$RPM_BUILD_ROOT/usr INSTALLDIRS=vendor \ MP_APXS=%{_sbindir}/apxs MP_APR_CONFIG=%{_bindir}/apr-config \ CCFLAGS=$RPM_OPT_FLAGS -fPIC make So I suppose that if you have installed the Apache rpm from RH you should say at least: perl Makefile.PL MP_APXS=/usr/sbin/apxs MP_APR_CONFIG=/usr/bin/apr-config adjust the paths to these scripts if my guess was wrong. You can use locate(1) to find them. You can also try to use the latest src.rpm from rawhide, I'm not sure how recent it is http://fr.rpmfind.net//linux/RPM/rawhide/1.0/i386/RedHat/RPMS/mod_perl-1.99_09-6.i386.html says Jul 16, which is very recent. __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: compile latest CVS
Jérôme Augé wrote: You don't need the full Apache sources, on redhat you just need the 'httpd' and 'httpd-devel' package, then MP_APXS should point to your apxs, on redhat 8 it is: $ perl Makefile.PL MP_APXS=/usr/sbin/apxs Regards, Jérôme Indeed, it works fine now with: [EMAIL PROTECTED] /usr/local/src/Mod_perl/modperl-2.0] $ perl Makefile.PL MP_APXS=/usr/sbin/apxs MP_APR_CONFIG=/usr/bin/apr-config thanks . --