[Q] Exception Handling
Hi all, I usually receive just the digest mails and don't take part in the discussions, so I'm maybe new to the list. I studied mod_perl guide, grepped through my archives, visited search.cpan and even asked some perlmonks, but couldn't find an answer to my problem. Here it is: I have a content handler, which calls another module for translating perl sources into valid html code. As this results in various nested eval blocks, and each of these blocks will possibly die or warn for some reason, I like to have a stacktrace through the eval{}s being reported to the client in error cases, something like: A mystic Perl error in some context at /var/www/html/test/t3.html line 8 at /var/www/html/test/t2.html line 2 at /var/www/html/test/t1.html line 889 (Please believe me: Carp is for special reasons *not* the answer) If I understand the mod_perl guide (pp. 70-73) right, the solution will be in an Exception class, overriding the CORE::die function. Well, but if my translation module implemented that class, and Exception.pm finally CORE::die()s, what about the content handler? Let's say the translator dies with a "well formed" stacktrace, how can I get this to the browser? Is it possible to override CORE::die twice? In the "inner loop", the translating module, and again by the content handler? Would Exporter->export_to_level be a way out? Or the Exception class being used by the translator, while the content handler simply uses CGI::Carp qw(fatals_to_browser) ? (If the content handler used the Exception class, this one would have to interfere with values it cannot know.) Or is there actually no problem at all, and I've just lost my way? I hope I could make clear what I mean, my English must read awful for native readers. Anyway, if you got a clue, or just an address where I could dig a little deeper... Thanx a lot in advance regards Martin
Re: Done before?
> I like XML, but not XSLT. Same here. > I like XHTML. It's only slightly less horrible than HTML but yeah... shame that XHTML 1.1 has to be served as application/xml, which no version of IE supports :-( > The only XHTML compliant templating/content management system I have > seen is in Java, it's called Java/XMLC, by enhydra. Interesting, I'll have to take a look. > I do not like Java, and I do not like the overall feel from the Java/XMLC > mailing list. Hey, Java is cool. It's just that Perl is Way Better :-) > Before I proceed, are there ANY content management/templating systems that > RELY EXCLUSIVELY on TAG ATTRIBUTE (name="value") nomenclature > to allow interaction between template and perl code? I wrote a module inspired by the Zope Page Template TAL specification [1] which uses only tag attributes. It can process XML (using XML::Parser) or HTML (using HTML::TreeBuilder), and outputs either XML or more specifically XHTML (for tags like input or br which __HAVE__ to be self closing)... The module is called Petal (for Perl TAL). It's on CPAN. [2]. It's still under development but it's getting very workable now. There is also a Petal mailing list [3]. > Are there any that don't follow that model, but are 100% XHTML compliant? Petal uses extra attributes which you can declare a namespace for. For example, let's say that you have the following object. package Node; sub parent(); sub children(); sub id(); sub title(); Here is a fragment of Petal code that could operate on the following structure: Current node title List of child nodes: Dummy node Title for WYSIWYG editors You can send this to HTML tidy, or use frontpage and dreamweaver, and attributes will be preserved. There are many more features to Petal, but it's all documented as POD and there are many use cases on the mailing list archives. [1] http://www.zope.org/Wikis/DevSite/Projects/ZPT/TAL [2] http://www.cpan.org/authors/id/J/JH/JHIVER/ [3] http://lists.webarch.co.uk/pipermail/petal/ Cheers, -- IT'S TIME FOR A DIFFERENT KIND OF WEB Jean-Michel Hiver - Software Director [EMAIL PROTECTED] +44 (0)114 255 8097 VISIT HTTP://WWW.MKDOC.COM - Don't visit http://www.webmatrix.net/
Re: Done before?
Narins, Josh wrote: >Before I proceed, are there ANY content management/templating systems that >RELY EXCLUSIVELY on TAG ATTRIBUTE (name="value") nomenclature to allow >interaction between template and perl code? > > Of course. HTML_Tree (http://homepage.mac.com/pauljlucas/software/html_tree/) works this way and is mentioned in my templating guide (http://perl.apache.org/docs/tutorials/tmpl/comparison/comparison.html). There is a more recent module based on the same idea, HTML::Seamstress, available on CPAN. - Perrin
Re: Change in module naming conventions
On Tuesday, August 27, 2002, at 10:54 PM, Stas Bekman wrote: > But Authentication, Authorization and Access aren't all Auth. May be > using Apache::AAA:: as in httpd-2.0/modules/aaa/ ? Please, no more too-clever TLAs. Have we learned nothing from LWP? :) -John
Re: Change in module naming conventions
* Stas Bekman ([EMAIL PROTECTED]) [28 Aug 2002 12:54]: > Nick Tonkin wrote: [...] > > I'm in favor of your approach. I have it like that in my stuff. > > Auth::Auth, Auth::Authz, and Auth:: Access. > But Authentication, Authorization and Access aren't all Auth. May be > using Apache::AAA:: as in httpd-2.0/modules/aaa/ ? I'd have to favour them being in a second-level namespace rather than a top-level one. If they provide Apache related handlers, the Apache handler modules should be in Apache:: (or ModPerl::, Apache2:: whatever; I'm going to have to look up the new naming convention there). Generic authentication stuff should probably belong in the namespace of the appropriate protocol. (e.g. Net::LDAP::Authenticate, used by Apache::AAA::NetLDAP). But Apache specific stuff should be in an Apache related namespace. (of course, now you'll all say that the 'toplevel' thing mentioned previously was relative to Apache::. Hrm.) cheers, -- Iain.
Re: Segmentation Fault with mod_php and mod_perl
Alex Lee wrote: > This is what I got from core backtrace: > > gdb /usr/local/src/apache/current/src/httpd [...] > Program received signal SIGSEGV, Segmentation fault. > 0x75a10 in php_xbithack_handler (r=0x927840) at mod_php4.c:778 > 778if (!(r->finfo.st_mode & S_IXUSR)) { please finish reading the section explaining how to get the backtrace. You've got only the first frame. You need to execute 'bt' or 'where' to get it all. > Are you going to say this is a PHP bug? :-) > But how come if I only activate PHP module, it works fine. Something affects a datastructure which PHP uses and segfaults in it. But get first the whole backtrace. > Alex > >> From: Stas Bekman <[EMAIL PROTECTED]> >> To: Alex Lee <[EMAIL PROTECTED]> >> CC: [EMAIL PROTECTED] >> Subject: Re: Segmentation Fault with mod_php and mod_perl >> Date: Tue, 27 Aug 2002 11:54:38 +0800 >> >> Alex Lee wrote: >> >>> There seems to be conflict between mod_php 4.2.2 and mod_perl 1.27 >>> running with Apache 1.3.26 on Solaris 8 platform(FreeBSD with the >>> same configuration seems to work fine). >> >> [...] >> >>> Segmentation Fault (11) >> >> [...] >> >>> running with "truss ./httpd -X" produce: >> >> >> Sending the core backtrace should help more that the output of truss. >> See >> http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems >> __ >> 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 > > > > > > _ > Send and receive Hotmail on your mobile device: http://mobile.msn.com -- __ 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: Change in module naming conventions
Nick Tonkin wrote: > > - nick > > > Nick Tonkin {|8^)> > > > On Tue, 27 Aug 2002, Per Einar Ellefsen wrote: > > >>- I originally had Apache::Auth::Authen, ::Authz and ::Access, but Robin >>Berjon told me he preferred to have the 4 as top-level namespaces. What do >>people think? > > > I'm in favor of your approach. I have it like that in my > stuff. Auth::Auth, Auth::Authz, and Auth:: Access. But Authentication, Authorization and Access aren't all Auth. May be using Apache::AAA:: as in httpd-2.0/modules/aaa/ ? __ 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
[mp-1.99_05] segfault modperl_pcw.c:52 ap_pcw_walk_files_config dconf->sec_file is NULL
Hi, I just recently joined the mail list and did a quick check but didn't seen any report of this problem: Versions: perl-5.6.1 (non-threaded) apache-2.0.40(mpm-prefork) mod_perl-1.99_05 OS: HPUX 11 Compiler: gcc version 3.2 20020708 (experimental) I don't know the code well enough to know what data/values are expected to be found in dconf, but here is a possible work around (most likely less than ideal solution) in the affected portion of C code (src/modules/perl/modperl_pcw.c): +if( (! dconf) || (! dconf->sec_file) ) +return; ap_conf_vector_t **dirs = (ap_conf_vector_t **)dconf->sec_file->elts; However after doing that, I get problems in other places... back to the drawing board I guess. For your reference, here is how I built mod_perl: /opt/perl/bin/perl Makefile.PL MP_INST_APACHE2=1 \ MP_AP_PREFIX=/opt/apache2/2.0.40_debug \ MP_DEBUG=1 MP_TRACE=1 gdb /opt/apache2/2.0.40_debug/bin/httpd -core ... (wd: ~/sw/src/apache/mod_perl-1.99_05) where #0 0xda26ffa8 in ap_pcw_walk_files_config (pconf=0x400292b0, s=0x4002c020, dconf=0x400667f0, modp=0x7f68b7e8, dir_cb=0x7f685122 , data=0x0) at modperl_pcw.c:52 #1 0xda2703ec in ap_pcw_walk_config (pconf=0x400292b0, s=0x4002c020, modp=0x7f68b7e8, data=0x0, dir_cb=0x7f685122 , srv_cb=0x7f68512a ) at modperl_pcw.c:106 #2 0xda26f514 in modperl_mgv_hash_handlers (p=0x400292b0, s=0x4002c020) at modperl_mgv.c:470 #3 0xda259948 in modperl_hook_post_config (pconf=0x400292b0, plog=0x40061470, ptemp=0x40063480, s=0x4002c020) at mod_perl.c:415 #4 0x60874 in ap_run_post_config (pconf=0x400292b0, plog=0x40061470, ptemp=0x40063480, s=0x4002c020) at config.c:130 #5 0x67cd0 in main (argc=6, argv=0x7f7f05a4) at main.c:592 (gdb) print *pconf $5 = {parent = 0x400272a0, child = 0x400cfcc8, sibling = 0x0, ref = 0x4005f468, cleanups = 0x400a2578, allocator = 0x400231f0, subprocesses = 0x0, abort_fn = 0, user_data = 0x0, tag = 0x4000a6b0 "pconf", active = 0x400a1b40, self = 0x40029298, self_first_avail = 0x400292e8 "@\002\222\260"} (gdb) print *dconf $6 = {d = 0x0, d_components = 0, opts = 31 '\037', opts_add = 0 '\000', opts_remove = 0 '\000', override = 63 '?', ap_default_type = 0x0, satisfy = 2, ap_auth_type = 0x0, ap_auth_name = 0x0, ap_requires = 0x0, response_code_strings = 0x0, hostname_lookups = 0, do_rfc1413 = -2, content_md5 = -2, use_canonical_name = 3, d_is_fnmatch = 0, add_default_charset = 2, add_default_charset_name = 0x4000c848 "iso-8859-1", limit_cpu = 0x0, limit_mem = 0x0, limit_req_body = -4294967296, limit_xml_body = 0, server_signature = 1074161768, loglevel = 0, sec_file = 0x0, r = 0x0, mime_type = 0x0, handler = 0x0, output_filters = 0x3 "", input_filters = 0x0, accept_path_info = 0, ct_output_filters = 0x0, etag_bits = 0, etag_add = 2, etag_remove = 0, enable_mmap = 1073910448} (gdb) Perl version info (perl -V): [apr/include] perk@hpmx5(2203)> /opt/perl/bin/perl -V Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=hpux, osvers=11.00, archname=PA-RISC2.0 uname='hp-ux hpmx5 b.11.00 a 9000800 1534710528 two-user license ' config_args='-Dcf_by=Openwave [EMAIL PROTECTED] -Dcc=gcc -Dprefix=/opt/perl -Uusethreads -Ubincompat5005 -Uinstallusrbinperl -Uusemymalloc -Duselargefiles -A prepend:libswanted=cl pthread $a -A ccflags=-fPIC -D_POSIX_C_SOURCE=199506L -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Doptimize=-g -de' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='gcc', ccflags ='-D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN -fPIC -D_POSIX_C_SOURCE=199506L -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DDEBUGGING -fno-strict-aliasing -I/usr/local/include', optimize='-g', cppflags='-D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN -fPIC -D_POSIX_C_SOURCE=199506L -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DDEBUGGING -fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='3.2 20020708 (experimental)', gccosandvers='hpux11.00' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='ld', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib libs=-lcl -lpthread -lnsl -lnm -lndbm -lmalloc -ldld -lm -lc -lndir -lcrypt -lsec perllibs=-lcl -lpthread -lnsl -lnm -lmalloc -ldld -lm -lc -lndir -lcrypt -lsec libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlf
Re: large projects in mod_perl
How about application software ? The lists are either programming tools or language iteself. I mean something like ... online accounting software ... just for example. Peter Bi - Original Message - From: "Per Einar Ellefsen" <[EMAIL PROTECTED]> To: "zt.zamosc.tpsa.pl" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, August 27, 2002 12:43 AM Subject: Re: large projects in mod_perl > At 09:16 27.08.2002, zt.zamosc.tpsa.pl wrote: > >Hi all > > > >Does anyone know where I can find some information on creating big projects > >in Perl (mod_perl)? > >I am facing the really big project now but I don't know what stucture of the > >program will be the best. > > > >There are such things like Struts, jBoss in Java. What about Perl? > > Well, with mod_perl you have many possibilities. I would advise you to read > http://perl.apache.org/docs/tutorials/apps/scale_etoys/etoys.html for an > explanation about a big project involving mod_perl at EToys, and > http://perl.apache.org/products/app-server.html for a list of application > servers available for mod_perl (as well as maybe > http://perl.apache.org/docs/tutorials/tmpl/comparison/comparison.html to > look at how to choose a templating system). > > You might also want to develop your own architecture based on MVC, which we > had a long discussion about here recently. For a lot of interesting > reading, look at these threads: > o http://mathforum.org/epigone/modperl/jilgygland > o http://mathforum.org/epigone/modperl/pahphucree > o http://mathforum.org/epigone/modperl/solchaxzim > o http://mathforum.org/epigone/modperl/lerdginspir > o http://mathforum.org/epigone/modperl/stremnemcland > o http://mathforum.org/epigone/modperl/nounumspim > o http://mathforum.org/epigone/modperl/blildeudrand > o http://mathforum.org/epigone/modperl/zhathontimp > o http://mathforum.org/epigone/modperl/drehkrerlnen > o http://mathforum.org/epigone/modperl/drurflerdplald > > > -- > Per Einar Ellefsen > [EMAIL PROTECTED] > > >
Apache::AuthCookie causing "Use of uninitialized value." in errorlog...
Hi All, I have written some code that seems to work fine with no perl warnings in the error log... and i was using it quite successfully using Apache::AuthCookie under mod_perl. However, when i put this in my apache configuration file: PerlFixupHandler Apache::AuthCookie->recognize_user I start getting the following warning message in my apache error log file: Use of uninitialized value. The software is still working fine, but its just annoying to see this warning message appear in the file. Has anyone else had this issue? I modified my copy of Apache/AuthCookie.pm to ensure that its recognize_user had no chance of having uninitialized vars, but i still got the message...!!! simran.
Re: SSI and mod_perl
On August 27, 2002 03:32 pm, Randy Kobes wrote: > > Thats close to what I want to do, but as the existing code has its entry > > already in the webserver config. > > > > What I mean is something like "$r->next(mod_include); OK;" > > or items to that effect. > > > > Is there a direct apache api hook I can use to tell the system to call > > mod_include with the current content? > > The Apache-WinBitHack module, available through > http://www.modperlcookbook.org/download/, may do something > similar to what you want - after it's through, it does >$r->handler('server-parsed'); >return OK; > to let mod_include pick things up from there. Darn. After reading what handler does, its not quite what I need. It would send the whole request to mod_include. as the uri is a virtual one handled entirely in the perl module, there's no file for mod_include to jump on. I was trying to avoid Apache::SSI and its brethren, and just jump back into mod_include. It appears after Yet Another rereading of the apache.pm doc, that since mod_perl normally hooks into almost all request phases, this kind of functionality is not really there. Its assumed on the part of the mod_perl code that if you are in mod_perl you'll want to stay there, not post process with other modules. I'm using mod_gzip and it hooks into a very late phase that mod_perl leaves alone. My config includes an item: mod_gzip_item_include handler ^perl-script$. Which, if I understand it, instructs gzip to process output of that named handler. I guess I'm kind of asking for a way to tell mod_include to participate after the perl handler has returned. And if I understand mod_include, it doesn't want to participate that late. Thanks for the pointers, all. It looks like I'm stuck with Apache::SSI or DIY. Right now I'm DIY, and after getting bitten by a bug I thought I could just use mod include and avoid these kind of bugs in the future. -- Jay "yohimbe" Thorne [EMAIL PROTECTED] Mgr Sys & Tech, Userfriendly.org
Done before?
I like XML, but not XSLT. I like XHTML. The only XHTML compliant templating/content management system I have seen is in Java, it's called Java/XMLC, by enhydra. I do not like Java, and I do not like the overall feel from the Java/XMLC mailing list. How does Java/XMLC work? It works a lot like a streams(event) XML parser. All functions are called through the id="" tag. It's beautiful. As you can see, this method, unlike even the simplest of templating systems (HTML::Template?) is 100% XHTML compliant. This means arty people will be able to interact freely with the template. QUESTION: Before I proceed, are there ANY content management/templating systems that RELY EXCLUSIVELY on TAG ATTRIBUTE (name="value") nomenclature to allow interaction between template and perl code? Are there any that don't follow that model, but are 100% XHTML compliant? Thank you. :) -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
Re: SSI and mod_perl
On Tue, 27 Aug 2002, Jay Thorne wrote: > On August 27, 2002 02:16 pm, Per Einar Ellefsen wrote: > > At 23:09 27.08.2002, Jay Thorne wrote: > > >In a mod_perl handler, in the m_p1.x/apache1.3 api, Is there a quick way > > > to tell apache > > >"I'm done, here's my content, and I want you to run this through > > > mod_include before you send it to the user" > > > > You might want to try a filter, for example Apache::OutputChain, see > > http://perl.apache.org/docs/1.0/guide/modules.html#Apache__OutputChainC > >hain_Stacked_Perl_Handlers and the Apache::OutputChain manpage formore > > information. The same is true for Apache::Filter: > > http://perl.apache.org/docs/1.0/guide/modules.html#Apache__Filter___Alter_t > >he_output_of_previous_handlers . Both provide approximately the same > > functionality. > > Thats close to what I want to do, but as the existing code has its entry > already in the webserver config. > > What I mean is something like "$r->next(mod_include); OK;" > or items to that effect. > > Is there a direct apache api hook I can use to tell the system to call > mod_include with the current content? The Apache-WinBitHack module, available through http://www.modperlcookbook.org/download/, may do something similar to what you want - after it's through, it does $r->handler('server-parsed'); return OK; to let mod_include pick things up from there. -- best regards, randy kobes
Re: SSI and mod_perl
On August 27, 2002 02:16 pm, Per Einar Ellefsen wrote: > At 23:09 27.08.2002, Jay Thorne wrote: > >In a mod_perl handler, in the m_p1.x/apache1.3 api, Is there a quick way > > to tell apache > >"I'm done, here's my content, and I want you to run this through > > mod_include before you send it to the user" > > You might want to try a filter, for example Apache::OutputChain, see > http://perl.apache.org/docs/1.0/guide/modules.html#Apache__OutputChainC >hain_Stacked_Perl_Handlers and the Apache::OutputChain manpage formore > information. The same is true for Apache::Filter: > http://perl.apache.org/docs/1.0/guide/modules.html#Apache__Filter___Alter_t >he_output_of_previous_handlers . Both provide approximately the same > functionality. Thats close to what I want to do, but as the existing code has its entry already in the webserver config. What I mean is something like "$r->next(mod_include); OK;" or items to that effect. Is there a direct apache api hook I can use to tell the system to call mod_include with the current content? -- Jay "yohimbe" Thorne [EMAIL PROTECTED] Mgr Sys & Tech, Userfriendly.org
[mp-1.99_05] HPUX 11 w/gcc 3.2(b) -Ae "missing ... predicate" error
Hi, I noticed in 'lib/Apache/Build.pm' that the -Ae option was being added even if the compiler was gcc. This options causes an error something like the following: ... missing '(' after predicate ... error In the code below (lib/Apache/Build.pm) I removed the '#' comment from in front of: return if $Config{cc} eq 'gcc'; #XXX?" to work around this problem and things compiled just fine. sub ccopts_hpux { my $cflags = shift; return if $Config{cc} eq 'gcc'; #XXX? return if $$cflags =~ /(-Ae|\+e)/; $$cflags .= " -Ae "; } Details... Versions: perl-5.6.1 (non-threaded) apache-2.0.40(mpm-prefork) mod_perl-1.99_05 OS: HPUX 11 Compiler: gcc version 3.2 20020708 (experimental) Phil
Re: SSI and mod_perl
At 23:09 27.08.2002, Jay Thorne wrote: >In a mod_perl handler, in the m_p1.x/apache1.3 api, Is there a quick way to >tell apache >"I'm done, here's my content, and I want you to run this through mod_include >before you send it to the user" You might want to try a filter, for example Apache::OutputChain, see http://perl.apache.org/docs/1.0/guide/modules.html#Apache__OutputChainChain_Stacked_Perl_Handlers and the Apache::OutputChain manpage formore information. The same is true for Apache::Filter: http://perl.apache.org/docs/1.0/guide/modules.html#Apache__Filter___Alter_the_output_of_previous_handlers . Both provide approximately the same functionality. -- Per Einar Ellefsen [EMAIL PROTECTED]
Re: Segmentation Fault with mod_php and mod_perl
Hi Stas, This is what I got from core backtrace: gdb /usr/local/src/apache/current/src/httpd GNU gdb 5.0 Copyright 2000 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.8"... (gdb) run -X -f `pwd`/t/conf/httpd.conf -d `pwd`/t Starting program: /usr/local/src/apache/current/src/httpd -X -f `pwd`/t/conf/httpd.conf -d `pwd`/t [New LWP 1] [New LWP 2] [New LWP 3] [New LWP 4] Program received signal SIGSEGV, Segmentation fault. 0x75a10 in php_xbithack_handler (r=0x927840) at mod_php4.c:778 778 if (!(r->finfo.st_mode & S_IXUSR)) { Are you going to say this is a PHP bug? :-) But how come if I only activate PHP module, it works fine. Alex >From: Stas Bekman <[EMAIL PROTECTED]> >To: Alex Lee <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: Segmentation Fault with mod_php and mod_perl >Date: Tue, 27 Aug 2002 11:54:38 +0800 > >Alex Lee wrote: >>There seems to be conflict between mod_php 4.2.2 and mod_perl 1.27 running >>with Apache 1.3.26 on Solaris 8 platform(FreeBSD with the same >>configuration seems to work fine). >[...] >>Segmentation Fault (11) >[...] >>running with "truss ./httpd -X" produce: > >Sending the core backtrace should help more that the output of truss. >See >http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems >__ >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 _ Send and receive Hotmail on your mobile device: http://mobile.msn.com
SSI and mod_perl
In a mod_perl handler, in the m_p1.x/apache1.3 api, Is there a quick way to tell apache "I'm done, here's my content, and I want you to run this through mod_include before you send it to the user" -- Jay "yohimbe" Thorne [EMAIL PROTECTED] Mgr Sys & Tech, Userfriendly.org
Re: Flaky behavior with modperl module
On Tue, Aug 27, 2002 at 02:25:31PM -0400, [EMAIL PROTECTED] wrote: > > > When you "View Source" in your browser, are the img url's in the broken images > correct? Do you get any errors in your error log? anything strange in your > access log? > > Wes > View source shows a valid source. It appears to be a timeout issue because sometimes all pictures show up perfectly fine. If the network is slow, I get the picture dropouts.
Re: Change in module naming conventions
At 20:14 27.08.2002, James G Smith wrote: >Per Einar Ellefsen <[EMAIL PROTECTED]> wrote: > >What I came to was this: > >http://users.skynet.be/pereinar/mod-perl/modules.txt > >Looks good, overall. > >I like the Apache::Framework:: namespace :) same; just shows how many there are. > >Some questions I got which I'm not too sure of: > >- I originally had Apache::Auth::Authen, ::Authz and ::Access, but Robin > >Berjon told me he preferred to have the 4 as top-level namespaces. What do > >people think? > >What's the difference between Apache::Auth and Apache::Authen ? They >both seem to have authentication handlers. There are modules that do Authen+Authz, and some that incorporate general functions related to authentication and authorization. These go into ::Auth. The Authentication handlers go into Authen, as well as other modules *only* related to _authentication_. -- Per Einar Ellefsen [EMAIL PROTECTED]
Re: Flaky behavior with modperl module
When you "View Source" in your browser, are the img url's in the broken images correct? Do you get any errors in your error log? anything strange in your access log? Wes The Surprises <[EMAIL PROTECTED]> on 08/27/2002 01:37:14 PM To: [EMAIL PROTECTED] cc:(bcc: Wesley Sheldahl/Lex/Lexmark) Subject: Flaky behavior with modperl module Greetings, I am writing a modperl module to create dynamic picture web pages created from .jpg files in a given directory. It basically puts a bunch of pictures on the screen. I am seeing inconsistent behavior and I don't know where to look for a solution. When I load the page, random pictures don't get loaded. They're just small boxes on the screen. Reloading the page will give me another set of random missing pictures. The server is behind a cable modem and it has a max upload bandwidth of 256kb, so it's kinda slow. Am I seeing some sort of timeout or flakiness with my cable modem bandwidth? Thanks for any help Jason
Re: Change in module naming conventions
Per Einar Ellefsen <[EMAIL PROTECTED]> wrote: >What I came to was this: >http://users.skynet.be/pereinar/mod-perl/modules.txt Looks good, overall. I like the Apache::Framework:: namespace :) >Some questions I got which I'm not too sure of: >- I originally had Apache::Auth::Authen, ::Authz and ::Access, but Robin >Berjon told me he preferred to have the 4 as top-level namespaces. What do >people think? What's the difference between Apache::Auth and Apache::Authen ? They both seem to have authentication handlers. -- James Smith <[EMAIL PROTECTED]>, 979-862-3725 Texas A&M CIS Operating Systems Group, Unix
Re: Flaky behavior with modperl module
At 19:37 27.08.2002, The Surprises wrote: >Greetings, > >I am writing a modperl module to create dynamic picture web pages >created from .jpg files in a given directory. It basically puts a bunch >of pictures on the screen. I am seeing inconsistent behavior and I >don't know where to look for a solution. When I load the page, random >pictures don't get loaded. They're just small boxes on the screen. >Reloading the page will give me another set of random missing pictures. >The server is behind a cable modem and it has a max upload bandwidth of >256kb, so it's kinda slow. Am I seeing some sort of timeout or >flakiness with my cable modem bandwidth? As you don't give a lot of information about your configuration, this is just a wild guess, but I suppose that your image files get corrupted somehow, maybe because the directory they reside in is configured to be served through CGI or Apache::Registry. Can you fetch the images with a direct URL? Are you sure the URLs are even correct? Have you checked your error log? -- Per Einar Ellefsen [EMAIL PROTECTED]
Re: Change in module naming conventions
At 18:59 27.08.2002, David Wheeler wrote: >On Tuesday, August 27, 2002, at 09:46 AM, Per Einar Ellefsen wrote: > >>It's actually Apache::Persistent, because the persistence modules in it >>have big differences from the Apache::Util modules. > >Oh. So what's the complaint about Apache::Util:: ? Not having the Persistent:: modules in it. And if it would have them in it, Apache::Util wouldn't necessarily be a correct name. But I think we'll keep Apache::Persistent and Apache::Util as is. -- Per Einar Ellefsen [EMAIL PROTECTED]
Flaky behavior with modperl module
Greetings, I am writing a modperl module to create dynamic picture web pages created from .jpg files in a given directory. It basically puts a bunch of pictures on the screen. I am seeing inconsistent behavior and I don't know where to look for a solution. When I load the page, random pictures don't get loaded. They're just small boxes on the screen. Reloading the page will give me another set of random missing pictures. The server is behind a cable modem and it has a max upload bandwidth of 256kb, so it's kinda slow. Am I seeing some sort of timeout or flakiness with my cable modem bandwidth? Thanks for any help Jason
Re: Change in module naming conventions
- nick Nick Tonkin {|8^)> On Tue, 27 Aug 2002, Per Einar Ellefsen wrote: > - I originally had Apache::Auth::Authen, ::Authz and ::Access, but Robin > Berjon told me he preferred to have the 4 as top-level namespaces. What do > people think? I'm in favor of your approach. I have it like that in my stuff. Auth::Auth, Auth::Authz, and Auth:: Access. - nick Nick Tonkin {|8^)>
Re: Change in module naming conventions
On Tuesday, August 27, 2002, at 09:46 AM, Per Einar Ellefsen wrote: > It's actually Apache::Persistent, because the persistence modules in > it have big differences from the Apache::Util modules. Oh. So what's the complaint about Apache::Util:: ? David -- David Wheeler AIM: dwTheory [EMAIL PROTECTED] ICQ: 15726394 http://david.wheeler.net/ Yahoo!: dew7e Jabber: [EMAIL PROTECTED]
Re: Change in module naming conventions
At 18:38 27.08.2002, David Wheeler wrote: >On Tuesday, August 27, 2002, at 09:29 AM, Per Einar Ellefsen wrote: > >>- I created the Apache::Util:: namespace. However, one person thought the >>Persistent:: namespace to be too specific, and would prefer to rename >>Apache::Util:: to something like ::Misc, ::Lib, ::Extensions or ::Addons, >>and add the Persistent:: modules there. What do you think? > >I like Apache::Util, and don't have a problem with >Apache::Util::Persistent. Makes sense to me. It's actually Apache::Persistent, because the persistence modules in it have big differences from the Apache::Util modules. -- Per Einar Ellefsen [EMAIL PROTECTED]
Re: Change in module naming conventions
On Tuesday, August 27, 2002, at 09:29 AM, Per Einar Ellefsen wrote: > - I created the Apache::Util:: namespace. However, one person thought > the Persistent:: namespace to be too specific, and would prefer to > rename Apache::Util:: to something like ::Misc, ::Lib, ::Extensions or > ::Addons, and add the Persistent:: modules there. What do you think? I like Apache::Util, and don't have a problem with Apache::Util::Persistent. Makes sense to me. > - I originally had Apache::Auth::Authen, ::Authz and ::Access, but > Robin Berjon told me he preferred to have the 4 as top-level > namespaces. What do people think? I agree with Robin. David -- David Wheeler AIM: dwTheory [EMAIL PROTECTED] ICQ: 15726394 http://david.wheeler.net/ Yahoo!: dew7e Jabber: [EMAIL PROTECTED]
RE: [OT] Apache::Session and Win32
Greetings. [...] > > > Rob Bloodgood wrote: > > >I tried Apache::Session::File, but after MUCH hair-pulling > it seems that the > >Lock mechanism is COMPLETELY hosed (things are either never > locked or never > >unlocked, or something...) > > > > > > AFAIK, Win32 has no flock. > I once ran into the same problem - and my (superficial) analysis was that locks are not released for a reason that appears related to the multithreaded nature of the server...(for me, it was Apache). However, perlopentut says: "Perl's most portable locking interface is via the flock function, whose simplicity is emulated on systems that don't directly support it, such as SysV or WindowsNT. The underlying semantics may affect how it all works, so you should learn how flock is implemented on your system's port of Perl." And perl's flock certainly appear to work between different processes on NT. FOr the record, I eventually resorted to null locking as well. Cheers, alf
Change in module naming conventions
Hi everyone, This has already been posted on the dev list, but with no replies (however previous feedback has been positive to this regard), so I'll pass it through here for some feedback before going on with it. To find out how the new namespaces would look, I have gone through the process of categorizing all mod_perl modules found on CPAN (by searching for the Apache:: prefix). What I came to was this: http://users.skynet.be/pereinar/mod-perl/modules.txt NOTE: I am *not* suggesting we rename all existing Apache:: modules, that issue has been raised many times before, and is clearly impractical. This list is only to get an idea of what categories could possibly be needed. Think of it as a way of wrapping my mind around what is already here. From this, and some comments from other people, I have come to a set of Module naming guidelines, which I just placed online for your perusal: see here: http://users.skynet.be/pereinar/mod-perl/products/apache-modules.html#Module_Naming_Conventions Some questions I got which I'm not too sure of: - I created the Apache::Util:: namespace. However, one person thought the Persistent:: namespace to be too specific, and would prefer to rename Apache::Util:: to something like ::Misc, ::Lib, ::Extensions or ::Addons, and add the Persistent:: modules there. What do you think? - I originally had Apache::Auth::Authen, ::Authz and ::Access, but Robin Berjon told me he preferred to have the 4 as top-level namespaces. What do people think? -- Per Einar Ellefsen [EMAIL PROTECTED]
Re: Apache::Request
On Mon, 26 Aug 2002, Ufuk Yuzereroglu wrote: > I dont know if this is the right place to ask but I just cant > install Apache::Request. When calling 'make', make cant find > any of the header files. Can anyone tell me where I did go > wrong? Did you install mod_perl and apache successfully on the same machine? -- best regards, randy kobes
RE: Clashing Apache::Symbol - Symbol ?
So with the incorrect lib, it was loading Apache::Symbol where 'use Symbol' was found? Thanks! -Original Message- From: Stas Bekman [mailto:[EMAIL PROTECTED]] Sent: Monday, August 26, 2002 10:42 PM To: ODELL, TODD E (SWBT) Cc: ModPerl Mailing List Subject: Re: Clashing Apache::Symbol - Symbol ? ODELL, TODD E (SWBT) wrote: > I just recently got my mod_perl to work. Config is > mod_perl-1.27/Apache-1.3.26 on AIX 4.3.3. > > I wrote a PerlAuthenHandler which uses Expect.pm, requiring the normal > Symbol.pm. In my startup.pl script for mod_perl I had this line: > use lib qw(/usr/opt/perl5/lib/site_perl/5.6.1/aix/Apache); > I get a "bareword" error when IO:Handle tries to call the gensym(Symbol.pm) > BUT if I comment the above line out it seems to get past that. I see that > there is an Apache::Symbol which looks quite different than the 'normal' > one. > My question is by letting the normal Symbol.pm load, so IO:Handle will work, > is that going to mess things up since the Apache::Symbol is different? Or > will everything be able to know which to use? eh? why in the world you are trying to do that? there is no /usr/opt/perl5/lib/site_perl/5.6.1/aix/Apache, there is /usr/opt/perl5/lib/site_perl/5.6.1/aix. Of course you will have problems when you load the wrong package. It's Apache::Symbol, not Symbol in the dir Apache/. __ 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
[ANNOUNCE] Apache::SessionManager 0.01
Hi all, I'm glad to announce first public release of 'Apache::SessionManager' Apache module. Apache::SessionManager - simple Apache/mod_perl extension to manage sessions over HTTP requests. Apache::SessionManager is a mod_perl module that helps session management of a web application. This simple module is a wrapper around Apache::Session persistence framework for session data. It creates a session object and makes it available to all other handlers transparently by putting it in pnotes. The goal of Apache::SessionManager was to do a module with _no_ glue with others mod_perl based appserver than mod_perl itself and Apache::Session. to use in flat mod_perl handlers. (Also, it can be used with the appserver, of course). For module installation, configuration and directives see: perldoc Apache::SessionManager You can download it from CPAN: $CPAN/authors/id/E/EN/ENRYS/Apache-SessionManager-0.01.tar.gz or: http://www.sorcinelli.it/Apache-SessionManager-0.01.tar.gz Yours - Enrico Sorcinelli
Re: Segmentation Fault with mod_php and mod_perl
On Monday, 2002-08-26 at 10:43:57 -0700, Alex Lee wrote: > There seems to be conflict between mod_php 4.2.2 and mod_perl 1.27 running > with Apache 1.3.26 on Solaris 8 platform(FreeBSD with the same > configuration seems to work fine). > Please help! > Or if you know of a working combination of Apache/mod_perl/mod_php on > Solaris 8, let me know.. I had that a while ago. It is probably a problem with largefile support. Statically linking both mod_perl and mod_php worked for me, same versions you have. But I have to admit the version somebody else compiled crashed like your statically linked apache. The way I do it, and it is possible this avoids the problem is to first do apache+mod_perl, sans mod_php. If this tests OK, I "make install" mod_php, and do mod_perl again. The first step may leave some traces mod_php picks up. HTH, Lupe Christoph -- | [EMAIL PROTECTED] | http://www.lupe-christoph.de/ | | Big Misunderstandings #6398: The Titanic was not supposed to be| | unsinkable. The designer had a speech impediment. He said: "I have | | thith great unthinkable conthept ..." |
Re: large projects in mod_perl
There is a really big project called HSPcomplete written mostly on Perl (AFAIK it took about 200-300 man months to complete 2.0 version). It has a three-tier architecture: Web Apps (Forms processing) <-> Middle Tier (data management) <-> Low-level Libs It uses own templating system called ASPcms, which uses Text::Template as a low-level template processor + has a number of common Perl libraries: * lib to construct web forms * Mid-Tier Abstract lib * DB abstraction library * lib to construct multi-step wizards * security and license management lib etc... Product homepage: http://www.sw-soft.com/products/hspcomplete/ Regards, Oleg Shaikhatarov zt.zamosc.tpsa.pl wrote: > Hi all > > Does anyone know where I can find some information on creating big projects > in Perl (mod_perl)? > I am facing the really big project now but I don't know what stucture of the > program will be the best. > > There are such things like Struts, jBoss in Java. What about Perl? > > Thank you in advance. > > > > >
Re: large projects in mod_perl
At 09:16 27.08.2002, zt.zamosc.tpsa.pl wrote: >Hi all > >Does anyone know where I can find some information on creating big projects >in Perl (mod_perl)? >I am facing the really big project now but I don't know what stucture of the >program will be the best. > >There are such things like Struts, jBoss in Java. What about Perl? Well, with mod_perl you have many possibilities. I would advise you to read http://perl.apache.org/docs/tutorials/apps/scale_etoys/etoys.html for an explanation about a big project involving mod_perl at EToys, and http://perl.apache.org/products/app-server.html for a list of application servers available for mod_perl (as well as maybe http://perl.apache.org/docs/tutorials/tmpl/comparison/comparison.html to look at how to choose a templating system). You might also want to develop your own architecture based on MVC, which we had a long discussion about here recently. For a lot of interesting reading, look at these threads: o http://mathforum.org/epigone/modperl/jilgygland o http://mathforum.org/epigone/modperl/pahphucree o http://mathforum.org/epigone/modperl/solchaxzim o http://mathforum.org/epigone/modperl/lerdginspir o http://mathforum.org/epigone/modperl/stremnemcland o http://mathforum.org/epigone/modperl/nounumspim o http://mathforum.org/epigone/modperl/blildeudrand o http://mathforum.org/epigone/modperl/zhathontimp o http://mathforum.org/epigone/modperl/drehkrerlnen o http://mathforum.org/epigone/modperl/drurflerdplald -- Per Einar Ellefsen [EMAIL PROTECTED]