CPAN module Apache::Emulator
David Wheeler [EMAIL PROTECTED] 09/03/03 05:46am May I suggest that you post a note to the modperl list announcing Apache::Emulator. I think that the folks there might be interested in your work. A couple of years ago, I produced a module that emulated a few of the Apache::Request methods from a CGI environment. The only reason for doing this was that I was writing an adserver (boo hiss) that I wanted to run on both Apache and Netscape webservers, but didn't want to write code in CGI. I released the code to CPAN as Apache::Emulator within a rarely used Adserver distribution. My code wasn't complete, or by any means pleasant, but, I guess it was a good idea because Jorg Walter finished off the job with his excellent, and comprehensive Apache::Fake distrubution. Recently, Adam Kennedy has expressed an interest in adding a few methods to Apache::Emulator, and I dusted off the distribution for him (separating the code from the Adserver I'd written). I think he would like to have Apache::Emulator be a slimmed down version of Apache::Fake, keeping only the most popular features. I'm glad that somepone has taken an interest. I think this repackaging is what raised the interest of a few mod_perl developers. However, at the moment, there is nothing new here. Nigel [EMAIL PROTECTED] -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Preloading modules and Perl 5.6.1 vs 5.8.0
e-mol Development Team wrote: diff -u 5.6.1.txt 5.8.0.txt The two builds are quite different, I have pointed out below at least a few major differences. [EMAIL PROTECTED] src]# diff -u 5.6.1.txt 5.8.0.txt --- 5.6.1.txt 2003-09-03 14:07:02.0 -0400 +++ 5.8.0.txt 2003-09-03 14:04:21.0 -0400 @@ -1,40 +1,58 @@ -Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: +Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: -osname=linux, osvers=2.4.2-2,archname=i686-linux +osname=linux, osvers=2.4.20-2.48smp, archname=i386-linux-thread-multi +uname='linux str' +config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -g -Dmyhostname=localhost [EMAIL PROTECTED] -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.0 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr' I'm not quite following, why 5.6.1 was built with -Dusethreads -Duseithreads but below it says: usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef When you run configure it makes config.sh that has many lines set to 'undef' I am not sure if this is at all related. hint=recommended, useposix=true, d_sigactionÞfine -usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef -useperlio=undef d_sfio=undef uselargefilesÞfine usesocks=undef -use64bitint=undef use64bitall=undef uselongdouble=undef +usethreadsÞfine use5005threads=undef' useithreadsÞfine usemultiplicity +useperlio= d_sfio=undef uselargefilesÞfine usesocks=undef +use64bitint=undef use64bitall=un uselongdouble +usemymalloc=, bincompat5005=undef OK, so try building 5.8.0 with -Uusethreads (unless you are going to use ithreads) This is going to be the next thing I try. I am 99.9% sure we do not need ithreads. Compiler: -cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITSd', -optimize='-O2', -cppflags='-fno-strict-aliasing -I/usr/local/include' -ccversion='', gccversion='egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)', gccosandvers='' -intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder34 +cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITSd -I/usr/include/gdbm', Hmm, where did you get these perl from? did you build them yourself? Why -DDEBUGGING is enabled? You certaintly don't want this to be enabled in production. You have it in both perls. Both these perls where build from source downloaded from perl.org. I have no idea why -DDEBUGGING is enabled but I agree we do not need it. +optimize='', +cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm' +ccversion='', gccversion='3.2.2 20030213 (Red Hat Linux 8.0 3.2.2-1)', gccosandvers='' +gccversion='3.2.2 200302' +intsize=e, longsize= , ptrsize=p, doublesize=8, byteorder34 d_longlongÞfine, longlongsize=8, d_longdblÞfine, longdblsize -ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 -alignbytes=4, usemymalloc=n, prototypeÞfine +ivtype='long' +k', ivsize=4' +ivtype='long' +known_ext, nvtype='double' +o_nonbl', nvsize=, Off_t='', lseeksize=8 +alignbytes=4, prototypeÞfine Linker and Libraries: -ld='cc', ldflags =' -L/usr/local/lib' +ld='gcc' +l', ldflags =' -L/usr/local/lib' +ldf' libpth=/usr/local/lib /lib /usr/lib -libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt -lutil -perllibs=-lnsl -ldl -lm -lc -lposix -lcrypt -lutil -libc=/lib/libc-2.1.3.so, so=so, useshrplibúlse, libperl=libperl.a +libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil +perllibs +libc=/lib/libc-2.3.1.so, so=so, useshrplib=true, libperl=libper Your 5.6.1 is built as a static perl, whereas 5.8.0 as a dynamic. I build a static perl 5.8.0 last night, did not seem to change anything. +gnulibc_version='2.3.1' Dynamic Linking: -dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' -cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' +dlsrc=dl_dlopen.xs, dlext=so', d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE' +cccdlflags='-fPIC' +ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5', lddlflags='s Unicode/Normalize XS/A' I think next I may try and see if perl 5.6.1 can be build on the 5.8.0 system and see what this leads to. I wonder if it could be the
Re: [mp2] executing subprocesses from mod_perl
On Yesterday at 2:06pm, SB=Stas Bekman [EMAIL PROTECTED] wrote: SB SB Also you may want to use Apache::SubProcess to stress it out and see SB if there is something that we need to fix, if it's not used we might SB not be aware of existings bugs that the tests don't catch. You can SB always switch to IPC::Run if you encounter some problems. SB Apache::SubProcess it is then. I will keep the list posted in case of problems. -- Haroon Rafique [EMAIL PROTECTED] -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
[mp2] Failed to obtain the MPM name
Hi - 1) Downloaded (via CVS) latest mod_perl source (9/4/2003) 2) Cannot configure: perl Makefile.PL MP_AP_PREFIX=/usr/local/apache2/ MP_INST_APACHE2=1 Reading Makefile.PL args from @ARGV MP_AP_PREFIX = /usr/local/apache2 MP_INST_APACHE2 = 1 Configuring Apache/2.0.47 mod_perl/1.99_10-dev Perl/v5.8.0 Failed to obtain the MPM name at lib/Apache/Build.pm line 185. 3) Apache2 (2.0.47) configuration (Apache works) $BASE_DIR/$SOURCE_DIR/configure \ --enable-layout=SuSE \ --enable-auth_digest=shared \ --enable-dav=shared \ --enable-dav_fs=shared \ --enable-deflate=shared \ --enable-rewrite=shared \ --enable-so \ --enable-speling=shared \ --enable-ssl \ --with-z=/usr/local/src/zlib/zlib-1.1.4 \ --with-ssl=/usr/ \ --with-mpm=worker | tee -a $log 4) OS: SuSE 8.2 Linux (with current patches). 5) A quick search of the archives was fruitless - the Changes file mentions some changes in this area, but I don't understand them enough to solve this problem. Likewise for the source of Build.pm. *NOTE* CVS source downloaded 7/12/2003 works fine (with same Apache configuration on same machine). Aloha = Beau; == please visit == http://beaucox.com = main site http://howtos.beaucox.com = howtos http://PPM.beaucox.com = perl PPMs http://CPAN.beaucox.com = CPAN == thank you == -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Preloading modules and Perl 5.6.1 vs 5.8.0
I think next I may try and see if perl 5.6.1 can be build on the 5.8.0 system and see what this leads to. I wonder if it could be the newer gcc or glibc? This is quite possible, since the sharing mostly comes from your OS, not specificly from Perl. You may also want to try the latest perl-5.8.1 snapshot, while you are at it, as it'll be released rsn. __ 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 -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: [mp2] Failed to obtain the MPM name
Beau E. Cox wrote: Hi - 1) Downloaded (via CVS) latest mod_perl source (9/4/2003) 2) Cannot configure: perl Makefile.PL MP_AP_PREFIX=/usr/local/apache2/ MP_INST_APACHE2=1 Reading Makefile.PL args from @ARGV MP_AP_PREFIX = /usr/local/apache2 MP_INST_APACHE2 = 1 Configuring Apache/2.0.47 mod_perl/1.99_10-dev Perl/v5.8.0 Failed to obtain the MPM name at lib/Apache/Build.pm line 185. This is a recent change where we extract the MPM name to know whether to require ithreads enabled Perl or not. 3) Apache2 (2.0.47) configuration (Apache works) $BASE_DIR/$SOURCE_DIR/configure \ --enable-layout=SuSE \ that's probably the problem. You can use MP_AP_PREFIX= only if you install all apache files under the same tree, which is the default layout. Otherwise you should use the MP_APXS option pointing to apxs, which will know the rest of the details about the layout. Please check if it works for you. I've already adjusted the install docs to mention MP_APXS, I suppose we need to put it as the very first one. __ 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 -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Preloading modules and Perl 5.6.1 vs 5.8.0
After some thinking time I decided to compile perl 5.8.0 on the older system that did have 5.6.1. It would seem it has nothing to do with perl 5.8.0. I compiled perl 5.8.0 on the older system and preloading worked just like it should. Now I know that it does not have anything to do with perl or mod_perl but rather the newer gcc and glibc on the newer system. New system: gcc-3.2.2 glibc-2.3.2 Old system glibc-2.2.4 gcc-2.96 Has anyone else had problems with gcc-3.2.2 or glibc-2.3.2 and shared memory? Next I am going to try perl 5.8.1 snapshot to see what happens. Aaron Thul e-mol Development Team http://www.e-mol.com/?layout=emol103 [EMAIL PROTECTED] wrote: I think next I may try and see if perl 5.6.1 can be build on the 5.8.0 system and see what this leads to. I wonder if it could be the newer gcc or glibc? This is quite possible, since the sharing mostly comes from your OS, not specificly from Perl. You may also want to try the latest perl-5.8.1 snapshot, while you are at it, as it'll be released rsn. ___ Sent through e-mol. E-mail, Anywhere, Anytime. http://www.e-mol.com -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Preloading modules and Perl 5.6.1 vs 5.8.0
e-mol Development Team wrote: After some thinking time I decided to compile perl 5.8.0 on the older system that did have 5.6.1. It would seem it has nothing to do with perl 5.8.0. I compiled perl 5.8.0 on the older system and preloading worked just like it should. Now I know that it does not have anything to do with perl or mod_perl but rather the newer gcc and glibc on the newer system. New system: gcc-3.2.2 glibc-2.3.2 Old system glibc-2.2.4 gcc-2.96 Has anyone else had problems with gcc-3.2.2 or glibc-2.3.2 and shared memory? Ask at the glibc list? or may be p5p, as there are quite a few knowledgeable folks over there... Next I am going to try perl 5.8.1 snapshot to see what happens. Probably nothing will change on the sharing front, but you will get a better perl ;) __ 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 -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
FW: $r-headers_out Location and Set-Cookie
Title: FW: $r-headers_out Location and Set-Cookie [Note: reposting, the original post appears to have dropped through the cracks] Geoffrey Young wrote: That's when you use Apache::compat, doing the mp1 syntax. In mp2-speak that would be: $r-err_headers_out-add('Set-Cookie' = $packed_cookie); $r-headers_out-set('Location' = $url); $r-status(REDIRECT); notice that you don't need to call $r-send_http_header, it doesn't exist in mp2. not to mention it's entirely unnecessary (and undesirable) to send headers on error responses such as redirects. Why? Appendix A.7 from the Stas' Practical mod_perl book states: You should use err_headers_out( ), not headers_out( ), when you want to send cookies in a REDIRECT response or in any other non-2XX response And gives the following recipe: Example A-3. redirect_cookie.pl use Apache::Constants qw(REDIRECT OK); my $r = shift; # prepare the cookie in $cookie $r-err_headers_out-add('Set-Cookie' = $cookie); $r-headers_out-set(Location = $location); $r-status(REDIRECT); $r-send_http_header; return OK; How would you have written it? and you should never set $r-status from a handler - for Registry scripts it's ok, since we use it as a hack to get around some things, but handlers should never manipulate the value of $r-status. Why is that? -- Garrett Goebel IS Development Specialist ScriptPro Direct: 913.403.5261 5828 Reeds Road Main: 913.384.1008 Mission, KS 66202 Fax: 913.384.2180 www.scriptpro.com garrett at scriptpro dot com
Re: FW: $r-headers_out Location and Set-Cookie
Garrett Goebel wrote: [Note: reposting, the original post appears to have dropped through the cracks] not only did I get two of these already, but I also posted a reply :) --Geoff -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: SubRequest in Filter MP2 [QUESTION]
Hello.. Just Forwarding this to the list Having no idea as to how the internals of modperl and apache actually work, this may seem like a bit of a dumb suggestion. When doing a subrequest from within a filter, the most ideal situation would be to have access to the output from within the same filter. I don't know how this would be best done, but one example i can think of would be maybe to be given access to file handle which can be read from. The data from the subrequest can then be processed and incorporated as required. The reason I have ended up fiddling around with subrequests in filters is because i was originally writing a few extensions for SSI in MP1. My original plan was to create a small library of includable objects such as hit counters, fortune generators and photo albums etc The idea then was that other people with local access to my server can create simple html files that contain SSI directives to include the various objects. It was all going extremely well, until I tried to set a cookie from within a subrequest. After that, i ran into a whole load of trouble trying to capture the output from a subrequest, and ended up turning to mp2 I was wondering if there are any other avenues I should explore in order to set up such a system. Thank you for spending time on this problem I appreciate it greatly - On Thu, 2003-09-04 at 14:21, Geoffrey Young wrote: see Apache::SSI for mp1 - it does exactly what you are trying to do and is subclassable, so you can add your own tags/functionality if you want. After that, i ran into a whole load of trouble trying to capture the output from a subrequest see recipe 5.7 in the mod_perl developer's cookbook for that, or look at the Apache::SSI source, which does it a different way. -- Craig Shelley [EMAIL PROTECTED] Homepage: http://www.microtron.org.uk -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
RE: FW: $r-headers_out Location and Set-Cookie
Title: RE: FW: $r-headers_out Location and Set-Cookie Geoffrey Young wrote: Garrett Goebel wrote: [Note: reposting, the original post appears to have dropped through the cracks] not only did I get two of these already, but I also posted a reply :) My bad. It was an old thread and I didn't scan far enough through the list archives. Problem must be at the company mail server. I've been getting infrequent diagnostic messages from various mailing list daemons. Apologies... -- Garrett Goebel IS Development Specialist ScriptPro Direct: 913.403.5261 5828 Reeds Road Main: 913.384.1008 Mission, KS 66202 Fax: 913.384.2180 www.scriptpro.com garrett at scriptpro dot com
Cookie Code
The code I've been using to handle cookies ate it's self when I start using ModPerl. I've set my script directory to PerlHandler Apache::PerlRun while I converts scripts. I'm sending 3 cookies. The first one goes properly. The second two get print to the screen. Same script run under normal perl works fine. Suggestions? Here the tester code I have for the cookies: @cookies=('session_id', $sessionid, 'URL',$http_referer, 'COMMENT', $cooknot); print Content-type: text/html\n; while( ($cookie,$value) = @cookies ) { print 'Set-Cookie: ' . $cookie . '=' . $value . ';'; if ($Cookie_Exp_Date) { print ' expires=' . $Cookie_Exp_Date . ';'; } if ($Cookie_Path) { print ' path=' . $Cookie_Path . ';'; } if ($Cookie_Domain) { print ' domain=' . $Cookie_Domain . ';'; } if ($Secure_Cookie) { print ' secure'; } print \n; } print \n\n; print test; _ Use custom emotions -- try MSN Messenger 6.0! http://www.msnmessenger-download.com/tracking/reach_emoticon -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Can't get a mod_perl.so...
I've read the documentation several times and searched the web, but can't find an answer to my problem. I can't get a mod_perl.so. I used several different configure combinations from what I had read in the documentation. What I am using right now is: perl Makefile.PL PREP_HTTPD=1 EVERYTHING=1 I then run make. I don't get any errors. I also don't have a mod_perl.so anywhere on my system. I tried the make install as one forum said that it is created when you do the make install. This wasn't the case for me. I still don't have a mod_perl.so. There are no errors anywhere. I'm using mod_perl 1.28 source. I'm running Apache 1.3.26 on Linux 2.4.18 (Slackware 8). I really appreciate any help anybody can give me. Thanks! Rich -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
RE: Can't get a mod_perl.so...
Title: RE: Can't get a mod_perl.so... Rich Kosiba wrote: I've read the documentation several times and searched the web, but can't find an answer to my problem. I can't get a mod_perl.so. I believe you are looking for libperl.so -- Garrett Goebel IS Development Specialist ScriptPro Direct: 913.403.5261 5828 Reeds Road Main: 913.384.1008 Mission, KS 66202 Fax: 913.384.2180 www.scriptpro.com garrett at scriptpro dot com
Re: Can't get a mod_perl.so...
I still don't have a mod_perl.so. There are no errors anywhere. I'm using mod_perl 1.28 source. I'm running Apache 1.3.26 on Linux 2.4.18 (Slackware 8). you only get a shared object file if you compile mod_perl as a DSO, which is not the default with mod_perl 1.28. to check whether mod_perl is installed, try running /usr/local/apache/bin/httpd -l and check for mod_perl.c at the bottom. if you want mod_perl as a dso use USE_DSO=1 besides the documentation on perl.apache.org you can find additional installation instructions at http://www.modperlcookbook.org/chapters/ch01.pdf HTH --Geoff -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Can't get a mod_perl.so...
> I've read the documentation several times and searched > the web, but can't find an answer to my problem. I > can't get a mod_perl.so. I believe you are looking for libperl.so Even so (pun intended)... I don't get a libperl.so anywhere. I was looking for any/all .so files among the source files and have only Leak.so and Symbol.so. I checked the whole system for libperl.so and don't have that either. Thanks! Rich
apache2, mod_perl: problem with CGI
Hi folks, Just trying to get up and running with Apache/2.0.47 (Win32) mod_perl/1.99_10-dev Perl/v5.8.0 Server Have installed AS Perl 5.8 and the mod_perl ppm that Randy provides the world with. Running my mod_perl code using the ModPerl::Registry handler. Now everything is fine until I put the following in my code: use CGI(); my $q = CGI-new(); From that point on I get a servererror and the following entry in the apache logfile: [Fri Sep 05 00:17:12 2003] [error] 1688: ModPerl::Registry: Can't locate object method request via package Apache at C:/Perl/lib/CGI.pm line 269. Now it is getting late here and I really want to go to sleep. Could somebody enlighten me here what is going on Many thanks in advance Bart ~~ Bart Terryn - Systems Manager - Grafikon ~~ Steenbruggedijk, 1 8020 Oostkamp - Belgium phone: +32 50 367200 fax: +32 50 367230 ~~ A man who does not read good books has no advantage over the man who cannot read them ~~ -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: apache2, mod_perl: problem with CGI
[please don't reply to another thread when starting a new one. don't be surprised if your question is ignored if you do that.] Just trying to get up and running with Apache/2.0.47 (Win32) mod_perl/1.99_10-dev Perl/v5.8.0 Server Have installed AS Perl 5.8 and the mod_perl ppm that Randy provides the world with. Running my mod_perl code using the ModPerl::Registry handler. Now everything is fine until I put the following in my code: use CGI(); my $q = CGI-new(); From that point on I get a servererror and the following entry in the apache logfile: [Fri Sep 05 00:17:12 2003] [error] 1688: ModPerl::Registry: Can't locate object method request via package Apache at C:/Perl/lib/CGI.pm line 269. upgrade your CGI.pm to 2.93 or higher. __ 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 -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Can't get a mod_perl.so...
I still don't have a mod_perl.so. There are no errors anywhere. I'm using mod_perl 1.28 source. I'm running Apache 1.3.26 on Linux 2.4.18 (Slackware 8). you only get a shared object file if you compile mod_perl as a DSO, which is not the default with mod_perl 1.28. to check whether mod_perl is installed, try running /usr/local/apache/bin/httpd -l and check for mod_perl.c at the bottom. if you want mod_perl as a dso use USE_DSO=1 besides the documentation on perl.apache.org you can find additional installation instructions at http://www.modperlcookbook.org/chapters/ch01.pdf Nope. :-( That has probably gotten me closer (it's trying to compile as a DSO now) but I'm still not getting the libperl.so file. I see this in the output from make (these first two lines are the only references to libperl.so in the output from make): rm -f libperl.so cc -shared -L/usr/local/lib -o libperl.so mod_perl.lo perlxsi.lo perl_config.lo perl_util.lo perlio.lo mod_perl_opmask.lo Apache.lo Constants.lo ModuleConfig.lo Log.lo URI.lo Util.lo Connection.lo Server.lo File.lo Table.lo -rdynamic -L/usr/local/lib /usr/lib/perl5/i386-linux/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/i386-linux/CORE -lperl -lnsl -ldl -lm -lc -lcrypt -lutil === src/modules/perl === src/modules That looks like it should be building libperl.so. There aren't any errors, I just still don't have a libperl.so. I'm now using the following line to configure it; perl Makefile.PL APACHE_SRC=../apache_1.3.26_modperl/ APACHE_PREFIX=/usr/local/apache EVERYTHING=1 USE_DSO=1 USE_APACI=1 APACI_ARGS='--enable-module=rewrite, --enable-module=info, --enable-module=expires, --disable-module=userdir' DO_HTTPD=1 That's taken more or less directly from the modperlcookbook.org chapter 1 that you gave me above. This has me totally lost. I've never had something compile with no errors, but I don't get a file. If I don't get any errors, that usually means the file is there. Thanks! Rich -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Can't get a mod_perl.so...
perl Makefile.PL APACHE_SRC=../apache_1.3.26_modperl/ APACHE_PREFIX=/usr/local/apache EVERYTHING=1 USE_DSO=1 USE_APACI=1 APACI_ARGS='--enable-module=rewrite, --enable-module=info, --enable-module=expires, --disable-module=userdir' DO_HTTPD=1 when I use those options, I end up with /usr/local/apache/libexec/libperl.so but only after I install the package - it's not in my mod_perl source tree. --Geoff -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: [mp2] Failed to obtain the MPM name
- Original Message - From: Stas Bekman [EMAIL PROTECTED] To: Beau E. Cox [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, September 04, 2003 6:45 AM Subject: Re: [mp2] Failed to obtain the MPM name Beau E. Cox wrote: Hi - 1) Downloaded (via CVS) latest mod_perl source (9/4/2003) 2) Cannot configure: perl Makefile.PL MP_AP_PREFIX=/usr/local/apache2/ MP_INST_APACHE2=1 Reading Makefile.PL args from @ARGV MP_AP_PREFIX = /usr/local/apache2 MP_INST_APACHE2 = 1 Configuring Apache/2.0.47 mod_perl/1.99_10-dev Perl/v5.8.0 Failed to obtain the MPM name at lib/Apache/Build.pm line 185. This is a recent change where we extract the MPM name to know whether to require ithreads enabled Perl or not. 3) Apache2 (2.0.47) configuration (Apache works) $BASE_DIR/$SOURCE_DIR/configure \ --enable-layout=SuSE \ that's probably the problem. You can use MP_AP_PREFIX= only if you install all apache files under the same tree, which is the default layout. Otherwise you should use the MP_APXS option pointing to apxs, which will know the rest of the details about the layout. Please check if it works for you. I've already adjusted the install docs to mention MP_APXS, I suppose we need to put it as the very first one. __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker Yep - MP_APXS=... works, thanks Stas. Aloha = Beau; == please visit == http://beaucox.com = main site http://howtos.beaucox.com = howtos http://PPM.beaucox.com = perl PPMs http://CPAN.beaucox.com = CPAN == thank you == -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Can't get a mod_perl.so...
Geoffrey Young wrote: perl Makefile.PL APACHE_SRC=../apache_1.3.26_modperl/ APACHE_PREFIX=/usr/local/apache EVERYTHING=1 USE_DSO=1 USE_APACI=1 APACI_ARGS='--enable-module=rewrite, --enable-module=info, --enable-module=expires, --disable-module=userdir' DO_HTTPD=1 when I use those options, I end up with /usr/local/apache/libexec/libperl.so but only after I install the package - it's not in my mod_perl source tree. It's never in the mod_perl source, it's in the apache_1.3.26_modperl/src/modules/perl dir. mod_perl copies its src/modules/perl to the apache source dir and compiles it there. __ 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 -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: [mp2] Failed to obtain the MPM name
Beau E. Cox wrote: $BASE_DIR/$SOURCE_DIR/configure \ --enable-layout=SuSE \ that's probably the problem. You can use MP_AP_PREFIX= only if you install all apache files under the same tree, which is the default layout. Otherwise you should use the MP_APXS option pointing to apxs, which will know the rest of the details about the layout. Please check if it works for you. I've already adjusted the install docs to mention MP_APXS, I suppose we need to put it as the very first one. Yep - MP_APXS=... works, thanks Stas. I have updated the install docs to reflect the ever-changing reality... __ 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 -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Can't get a mod_perl.so...
On Thursday, September 4, 2003, at 09:23 PM, Stas Bekman wrote: perl Makefile.PL APACHE_SRC=../apache_1.3.26_modperl/ APACHE_PREFIX=/usr/local/apache EVERYTHING=1 USE_DSO=1 USE_APACI=1 APACI_ARGS='--enable-module=rewrite, --enable-module=info, --enable-module=expires, --disable-module=userdir' DO_HTTPD=1 when I use those options, I end up with /usr/local/apache/libexec/libperl.so but only after I install the package - it's not in my mod_perl source tree. It's never in the mod_perl source, it's in the apache_1.3.26_modperl/src/modules/perl dir. mod_perl copies its src/modules/perl to the apache source dir and compiles it there. Not there either, but I did the install and it showed up in /usr/local/apache/libexec. (Except that it decided to overwrite my apache binary and config files. Fortunately we had backups and put them back.) Now I have a new problem. When I run apache with the LoadModule perl_module libexec/libperl.so line, none of my sites are accessible. Also, the AddModule mod_perl.c line gives me a warning that mod_perl.c is already added. As soon as I comment those two lines and restart apache, the sites load again. :-/ Rich -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
[mp2] ModPerl-Registry/t/bad_scritps.t returns 403 not 500
-8-- Start Bug Report 8-- 1. Problem Description: a. ModPerl-Registry/t/bad_scritps.t returns 403 not 500. b. Console log (verbose): *** setting ulimit to allow core files ulimit -c unlimited; ./TEST -verbose 'bad_scripts.t' *** root mode: changing the files ownership to 'nobody' (65534:65533) *** sudo -u '#65534' /usr/bin/perl -e 'print -r /usr/local/src/modperl2/modperl-2.0/ModPerl-Registry/t -w _ -x _ ? OK : NOK' *** result: OK /usr/local/apache2/sbin/httpd -d /usr/local/src/modperl2/modperl-2.0/ModPerl-Registry/t -f /usr/local/src/modperl2/modperl-2.0/ModPerl-Registry/t/conf/httpd.conf -DAPA CHE2 -DPERL_USEITHREADS using Apache/2.0.47 (worker MPM) waiting for server to start: . waiting for server to start: ok (waited 36 secs) server localhost:8529 started bad_scripts1..1 # Running under perl version 5.008 for linux # Current time local: Thu Sep 4 16:19:34 2003 # Current time GMT: Fri Sep 5 02:19:34 2003 # Using Test.pm version 1.24 # testing : the script hasn't declared its private $r # Failed test 1 in bad_scripts.t at line 13 # expected: 500 # received: 403 not ok 1 FAILED test 1 Failed 1/1 tests, 0.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed --- bad_scripts.t11 100.00% 1 *** server localhost:8529 shutdown !!! error running tests (please examine t/logs/error_log) c. Error log: [Thu Sep 04 16:19:03 2003] [info] Init: Initializing OpenSSL library [Thu Sep 04 16:19:03 2003] [info] Init: Seeding PRNG with 0 bytes of entropy [Thu Sep 04 16:19:03 2003] [info] Init: Generating temporary RSA private keys (512/1024 bits) [Thu Sep 04 16:19:03 2003] [info] Init: Generating temporary DH parameters (512/1024 bits) [Thu Sep 04 16:19:03 2003] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] [Thu Sep 04 16:19:03 2003] [info] Init: Initializing (virtual) servers for SSL [Thu Sep 04 16:19:03 2003] [info] Server: Apache/2.0.47, Interface: mod_ssl/2.0.47, Library: OpenSSL/0.9.7b [Thu Sep 04 16:19:04 2003] [info] Init: Initializing OpenSSL library [Thu Sep 04 16:19:04 2003] [info] Init: Seeding PRNG with 0 bytes of entropy [Thu Sep 04 16:19:04 2003] [info] Init: Generating temporary RSA private keys (512/1024 bits) [Thu Sep 04 16:19:04 2003] [info] Init: Generating temporary DH parameters (512/1024 bits) [Thu Sep 04 16:19:04 2003] [info] Init: Initializing (virtual) servers for SSL [Thu Sep 04 16:19:04 2003] [info] Server: Apache/2.0.47, Interface: mod_ssl/2.0.47, Library: OpenSSL/0.9.7b [Thu Sep 04 16:19:04 2003] [notice] Digest: generating secret for digest authentication ... [Thu Sep 04 16:19:33 2003] [notice] Digest: done [Thu Sep 04 16:19:33 2003] [notice] Apache/2.0.47 (Unix) mod_perl/1.99_10-dev Perl/v5.8.0 mod_ssl/2.0.47 OpenSSL/0.9.7b DAV/2 configured -- resuming normal operations [Thu Sep 04 16:19:33 2003] [info] Server built: Jul 12 2003 04:49:30 [Thu Sep 04 16:19:33 2003] [debug] /usr/local/src/apache2/httpd-2.0.47/server/mpm/worker/worker.c(1736): AcceptMutex: sysvsem (default: sysvsem) [Thu Sep 04 16:19:34 2003] [error] file permissions deny server execution/usr/local/src/modperl2/modperl-2.0/ModPerl-Registry/t/cgi-bin/r_in herited.pl [Thu Sep 04 16:19:34 2003] [warn] child process 18911 still did not exit, sending a SIGTERM [Thu Sep 04 16:19:34 2003] [info] removed PID file /usr/local/src/modperl2/modperl-2.0/ModPerl-Registry/t/logs/httpd.pid (pid=18909) [Thu Sep 04 16:19:34 2003] [notice] caught SIGTERM, shutting down d. Appears harmless - installed anyway and all my tests OK. 2. Used Components and their Configuration: *** mod_perl version 1.9910 *** using /usr/local/src/modperl2/modperl-2.0/lib/Apache/BuildConfig.pm *** Makefile.PL options: MP_APXS= /usr/local/apache2/sbin/apxs MP_COMPAT_1X = 1 MP_GENERATE_XS = 1 MP_LIBNAME = mod_perl MP_USE_DSO = 1 MP_USE_STATIC = 1 *** /usr/local/apache2/sbin/httpd -V Server version: Apache/2.0.47 Server built: Jul 12 2003 04:49:30 Server's Module Magic Number: 20020903:4 Architecture: 32-bit Server compiled with -D APACHE_MPM_DIR=server/mpm/worker -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT=/usr/local/apache2 -D SUEXEC_BIN=/usr/local/apache2/bin/suexec -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_ERRORLOG=logs/error_log -D AP_TYPES_CONFIG_FILE=/etc/httpd/mime.types -D SERVER_CONFIG_FILE=/etc/httpd/httpd.conf *** /usr/bin/perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: osname=linux, osvers=2.4.20, archname=i586-linux-thread-multi uname='linux d20 2.4.20 #1 smp thu oct 10 18:10:26 utc 2002 i686 unknown
cookie managerment
hi, in mod_perl how do i detect if users choose to reject the cookie being sent to them and/or having the cookie disable in browser ? (not javascript or other client-side scripting) so that i can print a error message remind user to enable cookie. Regards, Qiang __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Cookie Code
On Thu, 2003-09-04 at 16:56, Tim Edwards wrote: I'm sending 3 cookies. The first one goes properly. The second two get print to the screen. Same script run under normal perl works fine. Suggestions? Show us the mod_perl part of your apache config. - Perrin -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html