Re: [Mason] ANNOUNCE: Mason 1.15
On Mon, Oct 14, 2002 at 11:50:09AM +0400, Oleg Bartunov wrote: On Mon, 14 Oct 2002, Dave Rolsky wrote: Eventually, we'll fork the code base again and start breaking things in preparation for an eventual 1.20 (or maybe some other version number cause we might get to 1.20 just by small bugfix/doc/performance releases), which will incorporate new features such as .NET compliance, full support for _all_ XML specs, and a special NP-problem solving module, plus a brand new set of ginsu knives. Dave, just interesting. What does ginsu knives means :? If you haven't had prolonged exposure to US TV you can't understand this reference. My memory is quite vague about it but I think they used to throw in a set of free ginsu knives (think sushi) for people who would buy some crap on the TV shopping program. The general idea of ginsu knives is to entice prospects (mason users) to adopt a product (Mason 1.15) more readily by adding to the package an unrelated free bonus (Dave's joke about ginsu knives ;-).
Re: SSL Installation Questions - Help
On Sat, Mar 09, 2002 at 10:12:32AM -0800, Kirk Rogers wrote: Hi all, So I went ahead and tried to install apache-ssl and am following the instructions to the T. I've acquired: mod_perl-1.26.tar.gz openssl-0.9.6c.tar.gz apache_1.3.22.tar.gz apache_1.3.22+ssl_1.47.tar.gz Man this is terrible. Having to compile, install, integrate everything yourself is a huge waste of time. Your are duplicating all the efforts put in by the distributions, for zero added value. Plus you've got an upgrade nightmare waiting for you. -- THESEE: Vous deviez le rendre moins volage ; Comment souffriez-vous cet horrible partage ? (Phèdre, J-B Racine, acte 5, scène 3)
Re: can't start apache-1.3.20 with mod_perl and Mason
* On Wed, Jul 11, 2001 at 08:09:20AM -0700, Doug MacEachern wrote: libperld would help, all i can tell is that something in %SIG is being caught, which normally shouldn't happen at startup. are you assigning anything to %SIG ? you could also try this to get the perl filename:line where the segv happens: (gdb) source mod_perl-x.xx/.gdbinit (gdb) curinfo OK, I rebuilt a debugging libperl and here is the gdb output: styx:~# gdb apache (no debugging symbols found)...(gdb) run -X Starting program: /usr/sbin/apache -X (no debugging symbols found)...(no debugging symbols found)... [repeated many times] Subroutine div redefined at /usr/share/perl/5.6.1/Exporter.pm line 57. at /usr/lib/perl/5.6.1/POSIX.pm line 18 Subroutine status_mason redefined at /usr/lib/perl5/Apache/Status.pm line 50. (no debugging symbols found)... Program received signal SIGSEGV, Segmentation fault. 0x402d1287 in S_new_he () at hv.c:26 26 PL_he_root = HeNEXT(he); (gdb) bt #0 0x402d1287 in S_new_he () at hv.c:26 #1 0x402d1bf9 in Perl_hv_store (hv=0x8ab7adc, key=0x4034e8e1 $, klen=1, val=0x87f069c, hash=37) at hv.c:411 #2 0x402d1644 in Perl_hv_fetch (hv=0x8ab7adc, key=0x4034e8e1 $, klen=1, lval=1) at hv.c:210 #3 0x40276e45 in Perl_gv_fetchpv (nambeg=0x4034e8e1 $, add=1, sv_type=4) at gv.c:669 #4 0x40273c1e in S_init_postdump_symbols (argc=0, argv=0xbfffd63c, env=0xb9c0) at perl.c:3381 #5 0x4026e9b4 in S_parse_body (env=0x0, xsinit=0x40223dc0 xs_init) at perl.c:1299 #6 0x4026da60 in perl_parse (my_perl=0x8ab7a48, xsinit=0x40223dc0 xs_init, argc=3, argv=0xbfffd630, env=0x0) at perl.c:895 #7 0x402213f4 in perl_startup () from /usr/lib/apache/1.3/mod_perl.so #8 0x402252a9 in perl_cmd_require () from /usr/lib/apache/1.3/mod_perl.so #9 0x08054bd9 in ap_clear_module_list () #10 0x08054f5a in ap_handle_command () #11 0x08054fa1 in ap_srm_command_loop () #12 0x080554d2 in ap_process_resource_config () #13 0x08055bcc in ap_read_config () #14 0x0805d2b4 in ap_child_terminate () #15 0x0805da5d in main () #16 0x400e038b in __libc_start_main () from /lib/libc.so.6 (gdb) source /root/libapache-mod-perl-1.25/.gdbinit (gdb) curinfo 0:/dev/null (gdb) -- PHEDRE: Quand sous un joug honteux à peine je respire ! Quand je me meurs ! (Phèdre, J-B Racine, acte 3, scène 1)
Re: can't start apache-1.3.20 with mod_perl and Mason
* On Wed, Jul 11, 2001 at 08:09:20AM -0700, Doug MacEachern wrote: On Wed, 11 Jul 2001, Louis-David Mitterrand wrote: Will I have to build a debugging-enabled libperl to get relevant information? Or is this enough to understand the problem? libperld would help, all i can tell is that something in %SIG is being caught, which normally shouldn't happen at startup. are you assigning anything to %SIG ? you could also try this to get the perl filename:line where the segv happens: (gdb) source mod_perl-x.xx/.gdbinit (gdb) curinfo Thanks again Doug for taking the time to help. Here is the output from curinfo: Program received signal SIGSEGV, Segmentation fault. 0x402b14b6 in Perl_sighandler () from /usr/lib/libperl.so.5.6 (gdb) source .gdbinit (gdb) curinfo Attempt to extract a component of a value that is not a structure pointer. (gdb) Does that help a little? -- ISMENE: Non, Madame. les Dieux ne vous sont plus contraires, Et Thésée a rejoint les mânes de vos frères. (Phèdre, J-B Racine, acte 2, scène 1)
Re: can't start apache-1.3.20 with mod_perl and Mason
* On Tue, Jul 10, 2001 at 07:13:30PM -0700, Doug MacEachern wrote: On Mon, 9 Jul 2001, Louis-David Mitterrand wrote: After upgrading my installation to Apache-1.3.20 and mod_perl-1.25 as as a module I can't start apache anymore when httpd.conf contains: PerlRequire /etc/apache/perl/handler.pl And that file (for debugging purposes) is practically empty: #!/usr/bin/perl package HTML::Mason; use strict; use HTML::Mason; use HTML::Mason::ApacheHandler; 1; Running strace apache -X shows: read(3, ETE PATCH PROPPATCH MKCOL COPY M..., 4096) = 4096 read(3, mLog directive (see below).\n#\nLo..., 4096) = 4096 read(3, n /icons/uuencoded.gif .uu\nA..., 4096) = 4096 read(3, tweak mime.types without actual..., 4096) = 4096 --- SIGSEGV (Segmentation fault) --- +++ killed by SIGSEGV +++ see mod_perl-1.25/SUPPORT for hints on howto get a stacktrace. Thanks for your help. Here is the result of a gdb run: Program received signal SIGSEGV, Segmentation fault. 0x402b14b6 in Perl_sighandler () from /usr/lib/libperl.so.5.6 (gdb) bt #0 0x402b14b6 in Perl_sighandler () from /usr/lib/libperl.so.5.6 #1 0x402b1ab9 in Perl_hv_store () from /usr/lib/libperl.so.5.6 #2 0x402b172a in Perl_hv_fetch () from /usr/lib/libperl.so.5.6 #3 0x40272c14 in Perl_gv_fetchpv () from /usr/lib/libperl.so.5.6 #4 0x402707de in Perl_init_stacks () from /usr/lib/libperl.so.5.6 #5 0x4026cdee in perl_parse () from /usr/lib/libperl.so.5.6 #6 0x4026c210 in perl_parse () from /usr/lib/libperl.so.5.6 #7 0x402213f4 in perl_startup () from /usr/lib/apache/1.3/mod_perl.so #8 0x402252a9 in perl_cmd_require () from /usr/lib/apache/1.3/mod_perl.so #9 0x08054bd9 in ap_clear_module_list () #10 0x08054f5a in ap_handle_command () #11 0x08054fa1 in ap_srm_command_loop () #12 0x080554d2 in ap_process_resource_config () #13 0x08055bcc in ap_read_config () #14 0x0805d2b4 in ap_child_terminate () #15 0x0805da5d in main () #16 0x400e038b in __libc_start_main () from /lib/libc.so.6 (gdb) Will I have to build a debugging-enabled libperl to get relevant information? Or is this enough to understand the problem? -- HIPPOLYTE: Madame, avant que de partir, J'ai cru de votre sort devoir vous avertit. (Phèdre, J-B Racine, acte 2, scène 2)
can't start apache-1.3.20 with mod_perl and Mason
Hi, After upgrading my installation to Apache-1.3.20 and mod_perl-1.25 as as a module I can't start apache anymore when httpd.conf contains: PerlRequire /etc/apache/perl/handler.pl And that file (for debugging purposes) is practically empty: #!/usr/bin/perl package HTML::Mason; use strict; use HTML::Mason; use HTML::Mason::ApacheHandler; 1; Running strace apache -X shows: read(3, ETE PATCH PROPPATCH MKCOL COPY M..., 4096) = 4096 read(3, mLog directive (see below).\n#\nLo..., 4096) = 4096 read(3, n /icons/uuencoded.gif .uu\nA..., 4096) = 4096 read(3, tweak mime.types without actual..., 4096) = 4096 --- SIGSEGV (Segmentation fault) --- +++ killed by SIGSEGV +++ There no helpful message in the error.log about the reason of apache's crash. I am running a debian unstable system. Thanks in advance for any suggestion, -- THESEE: La Grèce, à qui mon bras fut tant de fois utile, A-t-elle au criminel accordé quelque asile ? (Phèdre, J-B Racine, acte 3, scène 5)
a module to allow a windows user to manage per-directory access rights
Hello, Is there a mod_perl module or Mason component (best) somewhere that would allow a non-technical user to manage Apache per-directory access rights (basic auth or otherwise) from a web interface? Thanks in advance, -- OENONE: Songez-vous qu'en naissant mes bras vous ont reçue ? Mon pays, mes enfants, pour vous j'ai tout quitté. (Phèdre, J-B Racine, acte 1, scène 3)
long background tasks
Hello, Were are trying to run long a task (DB import) from a HTML::Mason page and are trying to send an immediate response to the user while the task is running. Here is our pseudo-code: %init sub long_running_task { # lottsa long, boring stuff } $r-puch_handlers(PerlCleanupHandler=\long_running_task($myarg)); /%init The rest of the page sends back HTML. The problem is that it _not_ sent back until the long_running_task function has completed. I thought that when registering a code ref in that way the sub{} would not be called until later during the PerlCleanupHandler phase. Am I missing something, is there a better way to do it? Thanks in advance for your insight, -- HIPPOLYTE: Quelques crimes toujours précèdent les grands crimes. Quiconque a pu franchir les bornes légitimes Peut violer enfin les droits les plus sacrés ; (Phèdre, J-B Racine, acte 4, scène 2)
a web interface to visualize tables
Hello, I need a tool to interactively visualize DB tables from a web interface. Ideally this tool would let me: - rename column headers, - set cell alignments, widths, background colors, - reorder columns, - save all these visualisation settings in a DB, - it would be written in perl (even better: mod_perl), Does such a beast exist? I am in the process of writing one, so I thought I'd check first... Thanks in advance, -- Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.org "Kill a man, and you are an assassin. Kill millions of men, and you are a conqueror. Kill everyone, and you are a god." -- Jean Rostand
GPL auction system based on mod_perl, Mason, Postgres
Hello, I have started a free auction system project at http://www.apartia.org which is closely tied to mod_perl/Mason and PostgreSQL. The Apartia project already supports all main types of auctions: classic, dutch, decreasing price, fixed, bids. Latest features added are: - seller, bidder, watch-list notification, - auction closing, expiration, archiving - entire category trees can be imported from a simple indented text file into the DB in one pass Information about the project is available at: http://www.apartia.org/Project/ where details about CVS access and mailing list are provided. Suggestions, criticism, comments welcome. Cheers, -- Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.org Veni, Vidi, VISA.
[OT] strange mod_rewrite behaviour (for Apache::Session support)
Hello, I am in the process of implementing persistent sessions using Apache::Session with the session_id stored in the URL and it mostly works. In the HTML::Mason autohandler there is the following filter: %filter $r-pnotes("cookie") # mangle URL only if cookie is missing || s#\bhref\s*=\s*"(/(?!S=)[^"\s]*)"#href="/S=$session{_session_id}$1"#gi; /%filter ... which adds the session_id to all href links, only if the browser doesn't return any cookie. Now in httpd.conf there is a mod_rewrite rule inspired by a recent thread on the modperl list: RewriteRule ^/S=([^/]+)(/.*) $2 [E=AF_SID:$1] This removes the session_id from the URL and adds it to the AF_SID environment variable. This works well for all absolute URLs (starting with a /) which is puzzling because I remember reading in this thread that this technique mandated _relative_ URLs. The rewrite rule fails only in one case, the root URL: http://my.site.com/S=1d2e580af1e31cf2/Sell/index.html ... is correctly converted to http://my.site.com/Sell/index.html ... *but* http://my.site.com/S=1d2e580af1e31cf2/ ... fails with a 404 NOT FOUND error From the rewrite log: 127.0.0.1 - - [23/Jul/2000:15:57:31 +0200] [apartia.int/sid#815769c][rid#8149464 /initial] (2) init rewrite engine with requested uri /S=3b2c1685dcc26394/ 127.0.0.1 - - [23/Jul/2000:15:57:31 +0200] [apartia.int/sid#815769c][rid#8149464 /initial] (3) applying pattern '^/S=([^/]+)(/.*)' to uri '/S=3b2c1685dcc26394/' 127.0.0.1 - - [23/Jul/2000:15:57:31 +0200] [apartia.int/sid#815769c][rid#8149464 /initial] (2) rewrite /S=3b2c1685dcc26394/ - / 127.0.0.1 - - [23/Jul/2000:15:57:31 +0200] [apartia.int/sid#815769c][rid#8149464 /initial] (2) local path result: / 127.0.0.1 - - [23/Jul/2000:15:57:31 +0200] [apartia.int/sid#815769c][rid#8149464 /initial] (1) go-ahead with / [OK] [Sun Jul 23 15:57:31 2000] [error] [client 127.0.0.1] File does not exist: / ... so after tinkering with various mod_rewrite options for a while I changed the RewriteRule to: RewriteRule ^/S=([^/]+)(/.*) %{DOCUMENT_ROOT}$2 [E=AF_SID:$1] ... and now everything works fine. But I'm still not happy because I don't understand _why_ it works. Please let me know if you have a rational explanation. TIA -- Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.fr # rm *;o o : command not found
hang with $r-internal_redirect
I am trying an internal_redirect from a POST with Mason and Apache just hangs: $r-method('GET'); $r-method_number(M_GET); $r-headers_in-unset('Content-length'); $r-internal_redirect_handler("/wronglogin.md"); $m-abort(302); However when I try an internal_redirect from a GET it works but HTTP headers are sent twice (at least) and get printed in the HTML page. Any idea what's going on? TIA -- Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.com Debian-Linux consulting: http://www.apartia.fr "There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence." - Jeremy S. Anderson
configuring Apache::Session to detect no-cookie browser
Hi, After reading an interesting thread here about session management I would like to detect if the user's browser refuses cookies and switch Apache::Session from cookie mode to URL mangling mode. Has someone already tackled this and would be so kind to share the solution? TIA -- Louis-David Mitterrand - [EMAIL PROTECTED] - http://zzz.apartia.org/ldm/
$r-get_basic_auth_pw
Although I see that the browser is returning a: 'Authorization' = 'Basic dnZ2dnY6bW1tbW1tbW1t', header, the $r-get_basic_auth_pw and $r-connection-user methods return nothing when used inside a content handler like Mason. Is this normal? Does it only return something from an auth handler? TIA -- Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.aparima.com
Re: emulating Basic Auth from Mason
On Sun, Feb 13, 2000 at 10:58:40AM -0800, Sean Chittenden wrote: I'm assuming that you're doing this in an access handler. If that's the case, set up some condition in your module where it figures out whether or not the user is authenticated. If the user isn't authenticated: return(AUTH_REQUIRED); That should do it. I don't think that'll return the error page stating that you need access to continue, instead that should pass a header (I think two actually) to the browser signaling it to prompt the user. Another alternative would be to have the user redirected to a login page with good old fashion forms. ;) Good luck. --SC Yes this would be preferable, but I wanted to do this as a mod_perl understanding exercise. The required headers to trigger the browser login popup are: $r-err_header_out('WWW-Authenticate', 'Basic realm="Base de données LNC"'); my ($res, $pw) = $r-get_basic_auth_pw; and then check for $res and $pw to determine if the user has tried to login PS If you're really interested in details of this, check out: http://www.modperl.com/book/chapters/ch6.html Excellent reference, many thanks for your help! -- Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.aparima.com ** Hello and Welcome to the Psychiatric Hotline ** If you are paranoid-delusional, we know who you are and what you want - just stay on the line so we can trace the call.
emulating Basic Auth from Mason
I have this component which both displays and updates a database. If the user wants to update a record I'd like the following to happen: 1) detect in the component that a DB update is attempted, 2) check if the user is already logged in by checking for login/password presence in the Apache::Session %session hash, 3) if not, then instruct Apache to return a Basic Auth dialog prompting for login/password, 3.1) get the login/password from the $r object and store it in %session, The tough part (and this is where a lack of mod_perl experience shows) is: how do I tell Apache put itself in "Basic Auth mode" so that it will prompt the user for his login/password? And it has to work in a Mason environment. I am digging into the mod_perl Guide at present for hints, but if someone could give me just a quick shove up the learning curve it would really help. Thanks in advance, -- Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.aparima.com