Session
hi, Is there Session module that has capability more like ASP::Session rather than Apache::Session.(I mean hanlidng the cookies too, Joshua is it easy to extract Session functionality from ASP as a standalone module :")). OR what mostly the MASON people use to handle Sessions. Thanx = [EMAIL PROTECTED] =
Re: Win32+PerlModule works !!!
Thanks a lot, Randy!!! I recompiled mod_perl with that flag, and now PerlModule/PerlRequire/Use ... work! Apache comes up, and everything seems fine so far! But I don't know how this flag influences whatever. Apache loads all APache modules twice. This flag disables all PerlRequire and PerlModule statements on the first load, so they can succeed on the second load. Without that flag, the second load fails. If that works for all Win32-systems and has no bad side-effect, I suggest that it should be inserted into the distributed 'mod_perl.h'-file - thinking I'm not the only one having this problem ... I have suggest to make this default for NT when I send this patch to Doug, but he decided, to make it conditional. Gerald
Re: EmbPerl use HTML::Embperl failed ( just Win95 )
I copied both Apache and Perl from NT to Win95 after I recompiled mod_perl with the PERL_STARTUP_DONE_CHECK flag and it worked! PerlModule/PerlRequire and use let Apache start - fine ! It works on NT and Win95. I was so happy about it that I thought the other problem is solved too - but it was not! On NT batch EmbPerl is running - but not on Win95! Same old message: Can't load 'C:/perl561/site/5.00561/lib/MSWin32-x86/auto/HTML/Embperl/Embperl.dll' for module HTML::Embperl: load_file:Eine DLL-Initialisierungsroutine ist fehlgeschlagen at C:/perl561/5.00561/lib/MSWin32-x86/DynaLoader.pm line 72. at embp.pl line 1 BEGIN failed--compilation aborted at embp.pl line 1. I have no idea what could be wrong else! So I inspected Dynaloader.pm at line 72 but no chance ... Are you sure you are having the correct ApacheCore.dll in your PATH on Win95? Gerald
Re: Hanging processes [LONG with debugging output]
In message [EMAIL PROTECTED], Doug MacEac hern writes: (gdb) longmess at /opt/local/perl/Apache/Constants.pm line 19 Apache::Constants::AUTOLOAD() called at /opt/local/perl/Apache/Regis try hmm, add this to .gdbinit: define perl_get_sv set $sv = perl_get_sv($arg0, 0) printf "%s\n", $sv ? ((XPV*) ((SV*)$sv)-sv_any)-xpv_pv : "undef" end and run: (gdb) perl_get_sv("Apache::Constants::AUTOLOAD") what does that print? gdb'd several different hanging processes to make sure that this is repeatable. The only changes were expected (eval # and scalar ref in 'longmess'): Dont know if this information helps or not, but setting MaxRequestsPerChild to 1 prevents these processes from appearing - setting it even to 2 is enough for them to start hanging. Thanks, - Tony wrist:root[23]# gdb /opt/apache/bin/httpd.debug 752 GNU gdb 4.18 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.7"... /opt/local/apache/bin/752: No such file or directory. Attaching to program `/opt/apache/bin/httpd.debug', process 752 Reading symbols from /usr/lib/libsocket.so.1...done. Reading symbols from /usr/lib/libnsl.so.1...done. Reading symbols from /usr/lib/libdl.so.1...done. Reading symbols from /usr/lib/libm.so.1...done. Reading symbols from /usr/lib/libc.so.1...done. Reading symbols from /usr/lib/libcrypt_i.so.1...done. Reading symbols from /usr/lib/libmp.so.2...done. Reading symbols from /usr/lib/libgen.so.1...done. Reading symbols from /usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1...done. Reading symbols from /opt/local/lib/perl5/auto/Data/Dumper/Dumper.so...done. Reading symbols from /opt/local/lib/perl5/auto/B/B.so...done. Reading symbols from /opt/local/lib/perl5/auto/Fcntl/Fcntl.so...done. Reading symbols from /opt/local/lib/perl5/auto/DB_File/DB_File.so...done. Reading symbols from /opt/local/perl/auto/Time/HiRes/HiRes.so...done. Reading symbols from /usr/lib/nss_files.so.1...done. Reading symbols from /opt/local/lib/perl5/auto/IO/IO.so...done. Reading symbols from /opt/local/lib/perl5/auto/Socket/Socket.so...done. Symbols already loaded for /usr/lib/libsocket.so.1 Symbols already loaded for /usr/lib/libnsl.so.1 Symbols already loaded for /usr/lib/libdl.so.1 Symbols already loaded for /usr/lib/libm.so.1 Symbols already loaded for /usr/lib/libc.so.1 Symbols already loaded for /usr/lib/libcrypt_i.so.1 Symbols already loaded for /usr/lib/libmp.so.2 Symbols already loaded for /usr/lib/libgen.so.1 Symbols already loaded for /usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1 Symbols already loaded for /opt/local/lib/perl5/auto/Data/Dumper/Dumper.so Symbols already loaded for /opt/local/lib/perl5/auto/B/B.so Symbols already loaded for /opt/local/lib/perl5/auto/Fcntl/Fcntl.so Symbols already loaded for /opt/local/lib/perl5/auto/DB_File/DB_File.so Symbols already loaded for /opt/local/perl/auto/Time/HiRes/HiRes.so Symbols already loaded for /usr/lib/nss_files.so.1 Symbols already loaded for /opt/local/lib/perl5/auto/IO/IO.so Symbols already loaded for /opt/local/lib/perl5/auto/Socket/Socket.so 0x168c74 in Perl_sv_2cv (sv=0x257708, st=0xffbeefc4, gvp=0xffbeefc8, lref=1) at sv.c:3971 3971*st = GvESTASH(gv); (gdb) source /opt/local/src/info_services/mod_perl-1.21/.gdbinit (gdb) curinfo 20:/opt/local/perl/Apache/Constants.pm (gdb) longmess at /opt/local/perl/Apache/Constants.pm line 20 Apache::Constants::AUTOLOAD() called at /opt/local/perl/Apache/Registry.pm line 43 Apache::Registry::handler('Apache=SCALAR(0x769970)') called at (eval 73) line 0 eval {...} called at (eval 73) line 0 (gdb) perl_get_sv("Apache::Constants::AUTOLOAD") Apache::Constants::OPT_EXECCGI (gdb) quit The program is running. Quit anyway (and detach it)? (y or n) y Detaching from program: /opt/apache/bin/httpd.debug LWP1
RE: again - more then one PerlTransHandler
well, you are missing something :) p 73: "Apache will walk through the registered uri_translate handlers until one returns a status other than DECLINED." thus I suspect that SimpleTranslation::handler is returning OK, so your request never gets to FancyTranslation::handler HTH --Geoff -Original Message- From: Evgenii Bazarov [mailto:[EMAIL PROTECTED]] Sent: Monday, December 13, 1999 8:42 AM To: [EMAIL PROTECTED] Subject: again - more then one PerlTransHandler Hi everybody, Sorry for the poor wording of my question. Once again: I am trying to install and use more then one translation handler. I tried two approaches to specifying handlers in the Apache config file (both recommended in the "Eagle" book.) First, have both handlers on the same line, e.g. in httpd.conf PerlTransHandler SimpleTranslation::handler FancyTranslation::handler In this case Apache spits out error: Syntax error on line 29 of /etc/httpd/conf/perl.conf PerlTransHandler takes one argument, the Perl Translation handler routine name. and exits. Secondly I tried to put two lines in config: PerlTransHandler SimpleTranslation::handler PerlTransHandler FancyTranslation::handler In this case, only second handler gets invoked. Am I missing something?!!! Evg Hi! I tried to set more then one PerlTransHandler but if I specify both on the same line, Apache says "syntax error", otherwise it see only the last one. Apache 1.3.6 on Linux with mod_perl 1.19 According to "Apache Modules" book it should be possible... Any advice will be highly appreciated! Cheers, Evg Get free email and a permanent address at http://www.netaddress.com/?N=1
perl-script breaks cgi?
I just ran into a problem I don't understand: I was testing a PerlAccessHandler on a cgi (not modperl) directory like this: Directory /my/user/directory SetHandler perl-script PerlAccessHandler My::Access /Directory when I tried to access a cgi script and got passed the access control I got a message box saying: Unknown File Type You have started to download a file of type application/x-httpd-cgi However when I comment out the SetHandler everything works as intented. Can anyone explain this to me or point me to somewhere where this is explained. (It is probably something very simple, but I must be overlooking it.) Thank you very much, Kees
all protected but one...
Hi all, What is the best way to have a Location directive apply to an entire site except for a single directory? This relates to Apache::AuthenCookie. I'm trying to "require valid-user" for the entire site except for a directory ("/register"). Thanks... Rob
Re: perl-script breaks cgi?
Kees Vonk 7249 24549 wrote: I just ran into a problem I don't understand: I was testing a PerlAccessHandler on a cgi (not modperl) directory like this: Directory /my/user/directory SetHandler perl-script PerlAccessHandler My::Access /Directory What about the normal cgi stuff such as: ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin/" Directory "/home/httpd/cgi-bin" AllowOverride None Options None Order allow,deny Allow from all /Directory are these correctly set ? - by the looks of it you are being given the file - it is not being executed by apache, hence this appears not to be a mod_perl problem. Greg ps could be completely wrong! when I tried to access a cgi script and got passed the access control I got a message box saying: Unknown File Type You have started to download a file of type application/x-httpd-cgi However when I comment out the SetHandler everything works as intented. Can anyone explain this to me or point me to somewhere where this is explained. (It is probably something very simple, but I must be overlooking it.) Thank you very much, Kees
RE: perl-script breaks cgi?
I just ran into a problem I don't understand: I was testing a PerlAccessHandler on a cgi (not modperl) directory like this: Directory /my/user/directory SetHandler perl-script PerlAccessHandler My::Access /Directory Don't use SetHandler for a PerlAccessHandler, it's only for PerlHandlers. when I tried to access a cgi script and got passed the access control I got a message box saying: Unknown File Type You have started to download a file of type application/x-httpd-cgi However when I comment out the SetHandler everything works as intented. Can anyone explain this to me or point me to somewhere where this is explained. (It is probably something very simple, but I must be overlooking it.) Thank you very much, Kees -- Eric
Re: all protected but one...
What is the best way to have a Location directive apply to an entire site except for a single directory? Set the site-wide handler in a Location "/" and override the handler for the "register" dir by setting the default handler in Location "/register". Unfortuntaly, I don't know the name of the default handler. ELB -- Eric L. Brine | Chicken: The egg's way of making more eggs. [EMAIL PROTECTED] | Do you always hit the nail on the thumb? ICQ# 4629314 | An optimist thinks thorn bushes have roses.
Re: Win32+PerlModule works !!!
Have you been able to install it as a NT Service? I can only run 1.3.9/1.2.21 from the command line. 1.3.6/1.2.21 are working fine. :( I hate NT. John [EMAIL PROTECTED]
Re: again - more then one PerlTransHandler
It works perfectly well for me. I have modperl 1.21, apache 1.3.9 on RedHad linux (5.2). I install any number of TransHandlers and as long as each one of them returns DECLINED they are all executed. I tried both ways (one line and multiple lines) and everything has worked. Probably you just need to make sure that you used EVERYTHING=1 when you compiled modperl. That's what I had and nothing else. Andrei On Mon, Dec 13, 1999 at 06:41:45AM -0700, Evgenii Bazarov wrote: Hi everybody, Sorry for the poor wording of my question. Once again: I am trying to install and use more then one translation handler. I tried two approaches to specifying handlers in the Apache config file (both recommended in the "Eagle" book.) First, have both handlers on the same line, e.g. in httpd.conf PerlTransHandler SimpleTranslation::handler FancyTranslation::handler In this case Apache spits out error: Syntax error on line 29 of /etc/httpd/conf/perl.conf PerlTransHandler takes one argument, the Perl Translation handler routine name. and exits. Secondly I tried to put two lines in config: PerlTransHandler SimpleTranslation::handler PerlTransHandler FancyTranslation::handler In this case, only second handler gets invoked. Am I missing something?!!! Evg Hi! I tried to set more then one PerlTransHandler but if I specify both on the same line, Apache says "syntax error", otherwise it see only the last one. Apache 1.3.6 on Linux with mod_perl 1.19 According to "Apache Modules" book it should be possible... Any advice will be highly appreciated! Cheers, Evg Get free email and a permanent address at http://www.netaddress.com/?N=1 --
Re: all protected but one...
On Dec 15, 1999 at 09:56:03 -0400, Eric L. Brine twiddled the keys to say: What is the best way to have a Location directive apply to an entire site except for a single directory? Set the site-wide handler in a Location "/" and override the handler for the "register" dir by setting the default handler in Location "/register". Unfortuntaly, I don't know the name of the default handler. SetHandler default-handler Rick Myers[EMAIL PROTECTED] The Feynman Problem 1) Write down the problem. Solving Algorithm 2) Think real hard. 3) Write down the answer.
Re: again - more then one PerlTransHandler
- Original Message - From: "Andrei A. Voropaev" [EMAIL PROTECTED] To: "Evgenii Bazarov" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, December 15, 1999 10:18 AM Subject: Re: again - more then one PerlTransHandler It works perfectly well for me. I have modperl 1.21, apache 1.3.9 on RedHad linux (5.2). I install any number of TransHandlers and as long as each one of them returns DECLINED they are all executed. I tried both ways (one line and multiple lines) and everything has worked. Probably you just need to make sure that you used EVERYTHING=1 when you compiled modperl. That's what I had and nothing else. Andrei Out of curiosity, would it be PERL_STACKED_HANDLERS=1 specifically? -Jay J On Mon, Dec 13, 1999 at 06:41:45AM -0700, Evgenii Bazarov wrote: Hi everybody, Sorry for the poor wording of my question. Once again: I am trying to install and use more then one translation handler. I tried two approaches to specifying handlers in the Apache config file (both recommended in the "Eagle" book.) First, have both handlers on the same line, e.g. in httpd.conf PerlTransHandler SimpleTranslation::handler FancyTranslation::handler In this case Apache spits out error: Syntax error on line 29 of /etc/httpd/conf/perl.conf PerlTransHandler takes one argument, the Perl Translation handler routine name. and exits. Secondly I tried to put two lines in config: PerlTransHandler SimpleTranslation::handler PerlTransHandler FancyTranslation::handler In this case, only second handler gets invoked. Am I missing something?!!! Evg Hi! I tried to set more then one PerlTransHandler but if I specify both on the same line, Apache says "syntax error", otherwise it see only the last one. Apache 1.3.6 on Linux with mod_perl 1.19 According to "Apache Modules" book it should be possible... Any advice will be highly appreciated! Cheers, Evg Get free email and a permanent address at http://www.netaddress.com/?N=1 --
Re: troubleshooting seg fault/child exit
This is going to be long. It's also incomplete because I want to run one more test that came to me this AM. -- Output of perl -v: This is perl, version 5.005_02 built for PA-RISC2.0 Copyright 1987-1998, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5.0 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. -- Ouptut of perl -V: Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration: Platform: osname=hpux, osvers=11.00, archname=PA-RISC2.0 uname='hp-ux hpprobe b.11.00 a 9000800 869669421 two-user license ' hint=recommended, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='cc', optimize=' ', gccversion= cppflags='-D_HPUX_SOURCE -Aa -I/usr/local/include' ccflags ='-D_HPUX_SOURCE -Aa -I/usr/local/include' stdchar='unsigned char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=undef, longlongsize=, d_longdbl=define, longdblsize=16 alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries: ld='ld', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib/pa1.1 /lib /usr/lib /usr/ccs/lib libs=-lnsl -lnm -lndbm -ldld -lm -lc -lndir -lcrypt -lcl libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-B,deferred ' cccdlflags='+z', lddlflags='-b -L/usr/local/lib' Characteristics of this binary (from libperl): Built under hpux Compiled at Nov 30 1999 15:00:56 %ENV: PERL_AIOC="/sp1/perl_aioc" @INC: /usr/local/lib/perl5/5.00502/PA-RISC2.0 /usr/local/lib/perl5/5.00502 /usr/local/lib/perl5/site_perl/5.005/PA-RISC2.0 /usr/local/lib/perl5/site_perl/5.005 . -- mod_perl version: 1.21 configure is run as follows (building out of /usr/local/src): perl Makefile.PL \ APACHE_SRC=../apache_1.3.9 \ DO_HTTPD=1 \ USE_APACI=1 \ PREP_HTTPD=1 \ EVERYTHING=1 -- apache version: 1.3.9 configure for mod_perl-enabled apache as follows: CC=cc EXTRA_CFLAGS=+e ./configure \ --activate-module=src/modules/perl/libperl.a \ --disable-module=auth \ --disable-module=autoindex \ --disable-module=imap -- make test: passes 100% as follows: (numerous skippings of unchanged .pm and .h files deleted for brevity) cp t/conf/mod_perl_srm.conf t/conf/srm.conf ../apache_1.3.9/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t httpd listening on port 8529 will write error_log to: t/logs/error_log letting apache warm up...done /usr/bin/perl t/TEST 0 still waiting for server to warm up...ok ok ok modules/actions.ok modules/cgi.ok modules/constants...ok modules/cookie..skipping test on this platform modules/fileok modules/httpdconf...ok modules/include.ok modules/log.ok modules/module..skipping test on this platform modules/perlrun.ok modules/perlrunxs...skipping test on this platform modules/psections...skipping test on this platform modules/request.skipping test on this platform modules/sandwichskipping test on this platform modules/src.ok modules/ssi.ok modules/stage...skipping test on this platform modules/status..ok modules/symbol..skipping test on this platform modules/uri.ok modules/utilok internal/apiok internal/auth...ok internal/croak..ok internal/dirmagic...ok internal/error..ok internal/headersok internal/hooks..ok internal/http-get...ok internal/http-post..ok internal/proxy..ok internal/redirect...ok internal/rwrite.ok internal/stackedok internal/table..ok internal/taint..ok All tests successful, 8 tests skipped. Files=36, Tests=370, 26 wallclock secs (18.47 cusr + 1.30 csys = 19.77 CPU) kill `cat t/logs/httpd.pid` rm -f t/logs/httpd.pid rm -f t/logs/error_log -- mod_perl-enabled apache started up as follows: /isg/WWW/bin/httpd_perl -X -d/isg/WWW -f conf/modperl.conf no errors on startup. Only notation in its error log is that it is starting up server configuration as follows: --cut here-- ServerType standalone Port90 Useraisgadm Group staff ServerAdmin [EMAIL PROTECTED] # -- do NOT perform a reverse DNS lookup on the incoming conx # HostNameLookups off # -- ServerRoot: where the server's config, error, and log files are kept # ServerRoot /isg/WWW AccessConfig/dev/null ResourceConfig /dev/null # -- Log file locations/settings # ErrorLoglogs/error.modperl TransferLog logs/access_modperl PidFile logs/modperl.pid ScoreBoardFile
Re: Core dump on graceful restart.
Doug MacEachern wrote: On Tue, 14 Dec 1999, C. R. Oldham wrote: My Apache core dumps on graceful restart. if you can reproduce the core dump and run: % gdb httpd core (gdb) where (gdb) where #0 0x80f4d4b in do_clean_objs () #1 0x80f4ccf in visit () #2 0x80f4df2 in Perl_sv_clean_objs () #3 0x80c2418 in perl_destruct () #4 0x8062920 in perl_shutdown () #5 0x8063aee in perl_child_exit () #6 0x80638ee in perl_child_exit_cleanup () #7 0x807ae79 in run_cleanups () #8 0x807939d in ap_clear_pool () #9 0x807941f in ap_destroy_pool () #10 0x8086900 in clean_child_exit () #11 0x8089949 in child_main () #12 0x8089db1 in make_child () #13 0x8089f2c in startup_children () #14 0x808a58d in standalone_main () #15 0x808adcc in main () #16 0x400d77a2 in __libc_start_main () from /lib/libc.so.6 the results of that might help. do you have PerlFreshRestart On, by chance? I did, but after reading the guide I turned it off. I'm still seeing the problem though. -- | Charles R. (C. R.) Oldham | NCA Commission on Schools| | [EMAIL PROTECTED] | Arizona St. Univ., PO Box 873011,| | V:480/965-8700 F:480/965-9423 | Tempe, AZ 85287-3011 _ | | "I like it!"--Citizen G'Kar | #include disclaimer.h X_|
Re: Hanging processes [LONG with debugging output]
(gdb) perl_get_sv("Apache::Constants::AUTOLOAD") Apache::Constants::OPT_EXECCGI what I was about to suggest trying is already in the modperl cvs Changes: preload Apache::Constants::OPT_EXECCGI() for Apache::{Registry,PerlRun} thanks to Chris Remshaw for spotting this w/ Apache::DProf so try the cvs snapshot, or in a PerlRequire file, preload it like so: Apache::Constants::OPT_EXECCGI();
RE: Win32+PerlModule works !!!
Have you been able to install it as a NT Service? I can only run 1.3.9/1.2.21 from the command line. 1.3.6/1.2.21 are working fine. :( I hate NT. Did you try to compile mod_perl with #define PERL_STARTUP_DONE_CHECK 1 at the top of the mod_perl.h? This may solve your problem. Gerald
mod_perl and proxying
Hi all, On my system I have a global PerlHandler module that processes all incoming requests. Within itself, the module filters out requests that are not of particular MIME types or requests containing '/resources/' in their uris and lets them to be processed by their intended handlers (by returning DECLINED). What I want to add next is the logic to proxy all POST requests for .xml files to a different invocation of the server running under a different user/group so that the files can be updated with POSTed data. For this job I decided to use the rewerite module with the following rule: RewriteCond %{REQUEST_METHOD} ^POST$ RewriteRule ^(.*\.xml.*)$ http://localhost:8088$1 [P] The problem is that my main PerlHandler gets called right after the rewrite module is done and I end up with the following error message in the error log: File does not exist: proxy:http://localhost:8088/data.xml I've tried returning DECLINED from the handler to let the proxy module to kick in (with return DECLINED if $r-filename =~ m/^proxy:/;), but I still get the same error message. In the configuration file, the rewrite rule come before the mod_perl handler is set. Am I trying to do the impossible? Or am I simply missing something obvious? Thanks in advance for comments Dmitry
Re: Win32+PerlModule works !!!
Did you try to compile mod_perl with #define PERL_STARTUP_DONE_CHECK 1 at the top of the mod_perl.h? This may solve your problem. Yes, without that define, DBI breaks and I can't run from the command line without -X Very frustrating, but no more so than the typical experience of using NT. John [EMAIL PROTECTED]
Article about Apache/mod_perl handler (german)
Everybody who is interested in some basic knowledge about Apache stages and mod_perl handlers, may take a look at my article in german iX magazin 1/2000. It's also available in the web unter http://www.heise.de/ix/artikel/2000/01/156/ Gerald - Gerald Richterecos electronic communication services gmbh Internetconnect * Webserver/-design/-datenbanken * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925151 WWW:http://www.ecos.de Fax: +49 6133 925152 -
RE: Win32+PerlModule works !!!
Yes, without that define, DBI breaks and I can't run from the command line without -X Very frustrating, but no more so than the typical experience of using NT. Did you first uninstall the old one (Apache -u), before installing the new one? Does the error log contains any hints? Gerald
RE: mod_perl and proxying
File does not exist: proxy:http://localhost:8088/data.xml I've tried returning DECLINED from the handler to let the proxy module to kick in (with return DECLINED if $r-filename =~ m/^proxy:/;), but I still get the same error message. setting the right handler again, may help: if ($r-filename =~ m/^proxy:/) { $r-handler('proxy-server'); return DECLINED ; } Gerald - Gerald Richterecos electronic communication services gmbh Internetconnect * Webserver/-design/-datenbanken * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925151 WWW:http://www.ecos.de Fax: +49 6133 925152 -
RE: mod_perl and proxying
Just tried it; didn't help. The error message is still there. Is it possible that the proxy setup is somehow screwed up? I checked and rechecked and everything seems fine: mod_proxy is loaded, ProxyRequests is turned on. I can't think of anything else to check. Regards Dmitry At 12:37 PM 12/15/99 , Gerald Richter wrote: setting the right handler again, may help: if ($r-filename =~ m/^proxy:/) { $r-handler('proxy-server'); return DECLINED ; } File does not exist: proxy:http://localhost:8088/data.xml I've tried returning DECLINED from the handler to let the proxy module to kick in (with return DECLINED if $r-filename =~ m/^proxy:/;), but I still get the same error message.
Re: Win32+PerlModule works !!!
FWIW, I have Randy Kobes' modperl/apache distribution installed on NT 4.0 as a service. It appears to execute successfully using ODBC against an Access database locally and a DB2 database on a remote machine. John D Groenveld [EMAIL PROTECTED] on 12/15/99 03:28:23 PM To: "Gerald Richter" [EMAIL PROTECTED] cc: [EMAIL PROTECTED] (bcc: John Arnold/DTC) Subject: Re: Win32+PerlModule works !!! Did you try to compile mod_perl with #define PERL_STARTUP_DONE_CHECK 1 at the top of the mod_perl.h? This may solve your problem. Yes, without that define, DBI breaks and I can't run from the command line without -X Very frustrating, but no more so than the typical experience of using NT. John [EMAIL PROTECTED]
Re: Session
raptor wrote: hi, Is there Session module that has capability more like ASP::Session rather than Apache::Session.(I mean hanlidng the cookies too, Joshua is it easy to extract Session functionality from ASP as a standalone module :")). OR what mostly the MASON people use to handle Sessions. There is no nice way to lift the Apache::ASP::Session out of the ASP framework, since the event handling is all held outside of the module. If you want the $Session without the events, just use Apache::Session. Below is some init code that may help with your cookie issues, but you will have to undo the ASP dependent code obvi. I don't know how using Apache::Session plugs into Mason to make the $Session available in any script, but if you have a pre-content handler init the Session, you could set $main::Session, and have that available from anywhere in perl. -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051 ## use Secret to generate your MD5 hexhash $MD5 = new MD5(); sub Secret { my $self = shift; my $md5 = $Apache::ASP::MD5; $md5-reset; $md5-add($self . $self-{remote_ip} . rand() . time() . $md5 . $self-{global} . $self-{'r'} . $self-{'mtime'}); $md5-hexdigest(); } # combo get / set $SessionCookieName = 'session-id'; $SessionIDLength = 32; sub SessionId { my($self, $id) = @_; if($id) { $self-{session_id} = $id; my $secure = $self-{secure_session} ? '; secure' : ''; $self-{r}-header_out ('Set-Cookie', "$Apache::ASP::SessionCookieName=$id; path=$self-{cookie_path}".$secure ); } else { # if we have already parsed it out, return now # quick session_id caching, mostly for use with # cookie less url building $self-{session_id} return $self-{session_id}; my $cookie = $self-{r}-header_in("Cookie") || ''; my(@parts) = split(/\;\s*/, $cookie); for(@parts) { my($name, $value) = split(/\=/, $_, 2); if($name eq $SessionCookieName) { $id = $value; $self-{dbg} $self-Debug("session id from cookie: $id"); last; } } if(! $id $self-{session_url}) { $id = delete $self-{Request}{QueryString}{$SessionCookieName}; # if there was more than one session id in the query string, then just # take the first one ref($id) =~ /ARRAY/ and ($id) = @$id; $id $self-{dbg} $self-Debug("session id from query string: $id"); } # SANTIZE the id against hacking if($id) { if(length($id) == $SessionIDLength and $id =~ /^[0-9a-z]+$/) { $self-{session_id} = $id; } else { $self-Log("passed in session id $id failed checks sanity checks"); $id = undef; } } if($id) { $self-{session_id} = $id; } } $id; }
How to use perl with apache??
Hi, I have come to know that if i want to use perl for my dynamic web-pages, i have to configure my apache with mod_perl module. I would really appreciate if someone can provide me some help on how to do it or install perl module for apache??? (pardon my proper english) All i am trying to achieve is, configure my apache so that I can write perl scripts that can generate dynamic web-pages (just like CGI stuff). Thanx in advance Raj Jangalwamailto:[EMAIL PROTECTED] Dev. Support Team ETSD 250 Vesey Street WFC-NT 11th Fl. New York, NY 10281-1315 === Phone :-212-449-4753 Alpha pager :- 1-888-MERRIL-0
Re: How to use perl with apache??
I have come to know that if i want to use perl for my dynamic web-pages, i have to configure my apache with mod_perl module. I would really appreciate if someone can provide me some help on how to do it or install perl module for apache??? (pardon my proper english) All i am trying to achieve is, configure my apache so that I can write perl scripts that can generate dynamic web-pages (just like CGI stuff). Please read the material at perl.apache.org, try the perl.apache.org/guide first Thanx in advance Raj Jangalwa mailto:[EMAIL PROTECTED] Dev. Support Team ETSD 250 Vesey Street WFC-NT 11th Fl. New York, NY 10281-1315 === Phone :- 212-449-4753 Alpha pager :- 1-888-MERRIL-0 ___ Stas Bekmanmailto:[EMAIL PROTECTED] http://www.stason.org/stas Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC perl.apache.orgmodperl.sourcegarden.org perlmonth.comperl.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
Re: Problems building
Hi all, On 14 Dec 1999, Greg Stark wrote: I think the interdependence with the apache tree and the mod_perl tree just makes things too complicated. I'm not unfamiliar with complicated building software -- even fairly complex software, but mod_perl just plain won that weekend, I conceded defeat. It doesn't help that there are at least two completely different ways to build each. I would suggest narrowing it down to just one right way to build apache. If the shared module can't be made rock solid then I suppose one way for shared module and one for compiling statically into apache. But I would suggest throwing out the PREP_HTTPD and DO_HTTPD stuff and the option to not use apaci. Hear, hear. Is there an echo in here? 73 Ged.
Re: Problems building
On Wed, 15 Dec 1999, you wrote: Hi all, On 14 Dec 1999, Greg Stark wrote: I think the interdependence with the apache tree and the mod_perl tree just makes things too complicated. I'm not unfamiliar with complicated building software -- even fairly complex software, but mod_perl just plain won that weekend, I conceded defeat. It doesn't help that there are at least two completely different ways to build each. I would suggest narrowing it down to just one right way to build apache. If the shared module can't be made rock solid then I suppose one way for shared module and one for compiling statically into apache. But I would suggest throwing out the PREP_HTTPD and DO_HTTPD stuff and the option to not use apaci. Hear, hear. Is there an echo in here? Yes, here's one: I'm strongly opposed to this suggestion. I have always built mod_perl + apache in one single step (perl Makefile.PL EVERYTHING=1 DO_HTTPD=1 make install), I like the fact that I install just the binary httpd wherever I feel like, I don't want it to go away. If you're concerned about the two different ways to build, hop on over to Apache-land, they started it :-) -- Eric
Re: EmbPerl use HTML::Embperl failed ( just Win95 )
- Original Message - From: Gerald Richter [EMAIL PROTECTED] To: Rolf Ohnmacht [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, December 15, 1999 12:43 PM Subject: Re: EmbPerl use HTML::Embperl failed ( just Win95 ) Same old message: Can't load 'C:/perl561/site/5.00561/lib/MSWin32-x86/auto/HTML/Embperl/Embperl.dll' for module HTML::Embperl: load_file:Eine DLL-Initialisierungsroutine ist fehlgeschlagen at C:/perl561/5.00561/lib/MSWin32-x86/DynaLoader.pm line 72. at embp.pl line 1 BEGIN failed--compilation aborted at embp.pl line 1. I have no idea what could be wrong else! So I inspected Dynaloader.pm at line 72 but no chance ... Are you sure you are having the correct ApacheCore.dll in your PATH on Win95? Gerald Yes, I'm sure! I copied the whole Apache ( and Perl ) tree from NT to Win95 and verified that there is no other ApacheCore.dll left on the file system that could be erranously taken. Apache and Perl are now exactly identical on both systems. Could it be that there are other libraries in the path killing the chain? In other words: what's the minimal allocation of libs I have to use after booting to make sure that it lies not on my Win95 configuration? If I can exclude side effects by others there could be a light on horizon ... Rolf
Re: Win32+PerlModule works !!!
- Original Message - From: John D Groenveld [EMAIL PROTECTED] To: Rolf Ohnmacht [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, December 15, 1999 4:24 PM Subject: Re: Win32+PerlModule works !!! Have you been able to install it as a NT Service? I can only run 1.3.9/1.2.21 from the command line. 1.3.6/1.2.21 are working fine. :( I hate NT. John No, because on the Apache installation guide it was described that one should have a special "install shield" tool to get the NT Service to work. But I start Apache from a simple command shell and I like it much more than do some "clicky-clicky" to get into the services folder and do other clicks to stop/start/restart the server. Using command-lines it's only Ctr-C and DblClick! This is one of many reasons I like Apache: I spent some time with IIS and ASP and hated IIS because of its overdimensionaled graphical interface. Then I went to Apache and found that the whole thing can be done within one editable config file - http.conf ... Why do you wish to have the Apache as NT Service to run? If you have good arguments, let me know! Rolf
'var' instead of var ... (getting crazy)
Dear Folks, a kind of weird problem is making me crazy: i wrote two scripts, all under mod_perl and they seem to be ok. One calls the other one and passes some arguments to it through the query_string (url_params); well, the latter usually reads this query_string in correctly, like this: record=32lang=it as i can see calling $query-query_string(), having defined $query as a "new CGI" (CGI.pm). So far so good, BUT, SOMETIMES (random?) query_string is read like: 'record=32lang=it' which makes the script crash because in this case $language = $query-url_param('lang') comes out to be "it'", instead of "it", (unless i write $language =~ s/'// , of course, but i refuse to!), and my script is instructed not to deal with "it'" language...! 8| More: this behaviour --a variable read as "'name'" instead of "name"-- doesn't only happen with query string params but also with other variables, rather often, like $query-remote_host() or whatever you like... Where could my (possibly idiotic) error be? Finally, I can't understand if it's a modperl's (?) problem (PerlWarns is On but _nothing_ is printed) or rather a CGI.pm's strange behaviour, so I hope not to bother you too much (i apologize). Thank you very much! Andrea Brugiolo Andrea Brugiolo University of Padova C.A.B. Inter Library Servicetel +39 049 8273673, fax +39 049 8273651 Inter Department Library of Psychology tel +39 049 8276477 http://bibliomedia.psy.unipd.it[EMAIL PROTECTED]
Re: Problems building
Hi there, Good to hear from you again. On Wed, 15 Dec 1999, Eric Cholet wrote: I'm strongly opposed to this suggestion. I have always built mod_perl + apache in one single step (perl Makefile.PL EVERYTHING=1 DO_HTTPD=1 make install), I like the fact that I install just the binary httpd wherever I feel like, I don't want it to go away. Perhaps I should have snipped the message to which I was replying a little. I have no problem with that, in fact I do the same thing now. If you're concerned about the two different ways to build, hop on over to Apache-land, they started it :-) I'm only concerned that some people seem to be getting in a muddle! I might be talking through my hat but it seems that a lot of troubles at build time are caused by dependencies on the directory structure that haven't been ironed out yet. 73 Ged.
Re: 'var' instead of var ... (getting crazy)
the [query_string (url_params)] usually reads this query_string in correctly, like this: record=32lang=it BUT, SOMETIMES (random?) query_string is read like: 'record=32lang=it' Where could my error be? Do you have any mod_perl handlers that work at an earlier phase of the request? Maybe they add the quotes by accident. Is the requested proxied from a front-end or is mod_rewrite used? The quotes may be introduced there by accident. ELB -- Eric L. Brine | Chicken: The egg's way of making more eggs. [EMAIL PROTECTED] | Do you always hit the nail on the thumb? ICQ# 4629314 | An optimist thinks thorn bushes have roses.