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: h1 petal:content=here/titleCurrent node title/h1 div petal:condition=true:here/children pList of child nodes:/p ul li id=someDummyID petal:repeat=child here/children petal:content=encode:here/title petal:attributes=id string:${here/id}-nodeDummy node Title for WYSIWYG editors/li /li /ul /div 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/
[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
Authentication Question
I have a mod_perl cgi script that I would like to get the username from the Apache server. The apache server successfully authenticates the client using Apache::AuthenSmb. How do I get this environment variable (the username) from apache into a variable in the perl script. Thanks, Brett
Re: Authentication Question
At 09:55 28.08.2002, Brett Hales wrote: I have a mod_perl cgi script that I would like to get the username from the Apache server. The apache server successfully authenticates the client using Apache::AuthenSmb. How do I get this environment variable (the username) from apache into a variable in the perl script. It's $ENV{REMOTE_USER} or $r-user -- Per Einar Ellefsen [EMAIL PROTECTED]
Re: [OT] HTML to XHTML conversion
On Fri 23-Aug-2002 at 11:07:35AM -0500, D. Hageman wrote: My suggestion would to just use a XML parser module like XML::LibXML. Load the file up using the HTML loading functions and print it using the XML printing functions ... since the only difference I can see between HTML and XHMTL is that optional ending tags are no longer optional (per XML spec) and single tags must be ended properly (per XML spec). There's a lot more than that. bodybody/body/body is not valid XHTML for example. input type=text name=foo/input is not valid XHTML either. You have to be careful about block-level and inline elements. etc. etc... Besides, you cannot use an XML parser to parse HTML. You have to use something like HTML::TreeBuilder instead. Part of HTML::Tree, excellent module IMHO. 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
$r-print() with slow clients and stop button
Hi, I've created a meta-search that prints out status messages to the browser as it receives responses from the servers it is searching by setting $|=1 and using $r-print. It runs as a mod_perl handler. I'm running apache 1.3.24 and mod_perl 1.26 on Linux. I'm finding that my web app has slowed down radically since I started doing this. I've tracked it down to the $r-print statements. I suspect that each statement is waiting for acknowledgement from the client before it will continue execution. Sometimes children are tied up for 2 minutes! I suspect these may be where the client has dropped its dialup connection and $r-print is waiting for acknowledgement of a packet. Has anyone else had this problem? I've set httpd.conf's Timeout setting to 5 seconds as a temporary fix. As I understand it, this will affect the amount of time perl waits before triggering soft_timeout or hard_timeout when doing $r-print operations? I'd like to somehow send data to the client and have execution continue until the end of a time critical section, after which it will wait for acknowledgement of all data that was sent and if that is not received within X seconds, kill the connection and return OK. The only way I can think of doing this is to get the client socket connection, temporarily change it to non blocking, do a send on it, finish the piece of code, and then change it back to non-blocking once I've confirmed the data was sent correctly. I'm afraid (very afraid) that this will break apache or mod_perl somehow. Does this sound like a workable solution? My C isn't too hot, so I'll be coding the entire thing in Perl and running it as part of the handler. Is there a better or easier way to do this? thanks, ~mark http://www.workzoo.com/ [EMAIL PROTECTED]
Re: $r-print() with slow clients and stop button
[...] I'd like to somehow send data to the client and have execution continue until the end of a time critical section, after which it will wait for acknowledgement of all data that was sent and if that is not received within X seconds, kill the connection and return OK. http://perl.apache.org/docs/1.0/guide/debug.html#Handling_the__User_pressed_Stop_button__case [...] __ 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: [OT] HTML to XHTML conversion
On Wed, 28 Aug 2002 10:07:07 +0100, Jean-Michel Hiver [EMAIL PROTECTED] said: JM bodybody/body/body is not valid XHTML for example. JM input type=text name=foo/input is not valid XHTML either. JM You have to be careful about block-level and inline elements. Actually input type=text name=foo/input is valid XHTML. Correct me if I'm wrong but AFAIK xxx/xxx is exactly equivalent to xxx/. input type=text name=foosomething/input is not valid. JM etc. etc... JM Besides, you cannot use an XML parser to parse HTML. You have to use JM something like HTML::TreeBuilder instead. Part of HTML::Tree, excellent JM module IMHO. XML::LibXML supports HTML too. -- Ilya Martynov (http://martynov.org/)
RE: Done before?
Thanks Perrin. I probably skipped your Templating guide because I'd already used more than half of them myself :) I'm probably going to skip HTML_Tree because it's tree-ish and not events-ish. I'm currently an events-ish type person. Probably because I imagine it's faster. I'm also going to skip HTML::Seamstress since it has perl inside attrib values, which is not compliant From the Seamstress man page td class=worker id=$s-_text($s-{iterator}-{name}) That's no good. I'll look closer into Petal... Thanks Perrin, you are an incredible asset for the list, and mod_perl community. And thanks, of course to Doug. -Original Message- From: Perrin Harkins [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 28, 2002 2:43 AM To: Narins, Josh Cc: '[EMAIL PROTECTED]' Subject: 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 -- 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: large projects in mod_perl
The resources that were pointed out were great! For large web apps MVC is great, especially when combined with XML and XSLT. It is certainly not a panacea as someone stated in an earlier post. Mod_perl can function as an application server. I don't know a whole lot about this, but I know it can be done. I am currently looking into playing around with mod_perl in an application server setting. Cache::Cache seems promising for keeping objects around. MVC type code offers a good separation of work flow from business logic and view logic. Not sure what transaction management packages are out there now. I am not sure of what app server products/projects are out there now for Perl (maybe some were mentioned earlier). The building blocks are definitely there. I am sure someone has assembled, or is assembling, them to serve as a turn key app server. I'd like to hear more about projects that manage session state across a web farm, allow for remote objects, transaction management, etc... Al -Original Message- From: Oleg Shaikhatarov [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 4:16 AM To: [EMAIL PROTECTED] Subject: 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. ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **
RE: Done before?
What about using sax filtering and custom tag libs to accomplish your transformations? If you don't like XSLT (I can see how that is possible :) ) and you are comfortable with events, you can put together a really good transformation layer. Not sure if this is overkill, especially when you will probably need to write state code as you pass through events, but it is an alternative. Thanks, Al ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **
RE: Done before?
Re: Petal xmlns also? very sharp. I really like it, but I have to check out how the WYSIWIGS handle processsing instructions like these... ?petal:if name=user.is_birthay? Happy Birthday, $xml:user.real_name! ?else? What?! It's not your birthday? Maybe tomorrow... ?end? If this is the gamut, then, I think I have a project :) ciao for now, -Josh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 28, 2001 2:57 AM To: Narins, Josh; [EMAIL PROTECTED] Subject: 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: h1 petal:content=here/titleCurrent node title/h1 div petal:condition=true:here/children pList of child nodes:/p ul li id=someDummyID petal:repeat=child here/children petal:content=encode:here/title petal:attributes=id string:${here/id}-nodeDummy node Title for WYSIWYG editors/li /li /ul /div 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/ -- 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: large projects in mod_perl
* Calbazana, Al ([EMAIL PROTECTED]) [020828 09:04]: I am not sure of what app server products/projects are out there now for Perl (maybe some were mentioned earlier). The building blocks are definitely there. I am sure someone has assembled, or is assembling, them to serve as a turn key app server. I'd like to hear more about projects that manage session state across a web farm, allow for remote objects, transaction management, etc... This should be useful: http://perl.apache.org/products/app-server.html Chris -- Chris Winters ([EMAIL PROTECTED]) Building enterprise-capable snack solutions since 1988
Re: Authentication Question
Please do not send replies directly to me, Cc the list. At 13:40 28.08.2002, Brett Hales wrote: On Wed, 2002-08-28 at 17:47, Per Einar Ellefsen wrote: At 09:55 28.08.2002, Brett Hales wrote: I have a mod_perl cgi script that I would like to get the username from the Apache server. The apache server successfully authenticates the client using Apache::AuthenSmb. How do I get this environment variable (the username) from apache into a variable in the perl script. It's $ENV{REMOTE_USER} or $r-user I have tried to use both of these, $login_name = $ENV{REMOTE_USER}; and $login_name = $r-user; With the ENV I do not get anything when I print $login_name. With $r-user I get the following in the error_log. Cannot call method user without a package or object reference at .. Do you have any advice, thanks again. First of all: $r-user doesn't work because you haven't gotten the Apache request object. To get it in an Apache::Registry script, insert: my $r = Apache-request; before your call to $r-user. Why you aren't getting anything in $ENV{REMOTE_USER} I do not know. It might be that the environment isn't set up that way in Apache::Registry. Or maybe Apache::AuthenSmb doesn't set $r-user at all. Are you even nsure the authentication is working? -- Per Einar Ellefsen [EMAIL PROTECTED]
Re: [Q] Exception Handling
Take a look at Exception::Class, which I believe uses Devel::StackTrace. Both are available on CPAN. I personally derived a lot of benefit from seeing how exceptions were done in Alzabo (http://www.alzabo.org), even though I'm not using Alzabo itself in my applications. All three modules are developed mainly by Dave Rolsky, IIRC. (Thanks again, Dave.) Wes Sheldahl THC Soft [EMAIL PROTECTED] on 08/28/2002 03:00:24 AM To: [EMAIL PROTECTED] cc:(bcc: Wesley Sheldahl/Lex/Lexmark) Subject: [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: SSI and mod_perl
Wouldn't $r-push_handlers($hook,\handler) do the trick, also? $r-push_handlers(PerlCleanupHandler,\oh_you_wanted_a_C_module); -Original Message- From: Per Einar Ellefsen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 5:16 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: 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__OutputChainCh ain_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_th e_output_of_previous_handlers . Both provide approximately the same functionality. -- Per Einar Ellefsen [EMAIL PROTECTED] -- 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.
odd authetication situation
I have a modperl handler that sets a cookie and does a redirect if the cookie was not present. The redirected page eventually loads the same page again. In addition, this page is called from a protected portion of the site that requires Basic Auth. When the redirect calls the mod_perl routine the second or some subsequent times, $r-connection-user and $ENV{REMOTE_USER} are both empty or non-existent yet the page does not appear to fail the authentication request and executes and returns html. The failure is repeatable though not consistently so, maybe 70% or more. I'm scratching my head on this one. Any ideas?? Michael
Re: odd authetication situation
Maybe you can try to add specifically: $r-connection-user('who_the_user_is') before the cookie access control returns OK in the module. Note that some of the cookie authentication modules are based on access-only control so $r-connection-user() can return a value in late phases only if one assigns it at the first place. Peter Bi - Original Message - From: Michael Robinton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 28, 2002 1:05 PM Subject: odd authetication situation I have a modperl handler that sets a cookie and does a redirect if the cookie was not present. The redirected page eventually loads the same page again. In addition, this page is called from a protected portion of the site that requires Basic Auth. When the redirect calls the mod_perl routine the second or some subsequent times, $r-connection-user and $ENV{REMOTE_USER} are both empty or non-existent yet the page does not appear to fail the authentication request and executes and returns html. The failure is repeatable though not consistently so, maybe 70% or more. I'm scratching my head on this one. Any ideas?? Michael
Re: odd authetication situation
Maybe you can try to add specifically: $r-connection-user('who_the_user_is') before the cookie access control returns OK in the module. Note that some of the cookie authentication modules are based on access-only control so $r-connection-user() can return a value in late phases only if one assigns it at the first place. Peter Bi hmm... let me see if I understand what you are saying It is necessary to specify $r-connection-user('current-known-user'); before I send OK so that on the next contact by the browser to the web server $r-connection-user will have the correct value??? Is this because of keep-alives and using the same child process?? I would think that the client would send the token for each connection. then what about the Cookie?? It appears that gets lost sometimes, but not as often as the authentication token. This fuzzy behavior makes redirects where cookies and tokens are expected very dicey... Michael - Original Message - From: Michael Robinton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 28, 2002 1:05 PM Subject: odd authetication situation I have a modperl handler that sets a cookie and does a redirect if the cookie was not present. The redirected page eventually loads the same page again. In addition, this page is called from a protected portion of the site that requires Basic Auth. When the redirect calls the mod_perl routine the second or some subsequent times, $r-connection-user and $ENV{REMOTE_USER} are both empty or non-existent yet the page does not appear to fail the authentication request and executes and returns html. The failure is repeatable though not consistently so, maybe 70% or more. I'm scratching my head on this one. Any ideas?? Michael
Re: odd authetication situation
Peter wrote: Maybe you can try to add specifically: $r-connection-user('who_the_user_is') before the cookie access control returns OK in the module. Note that some of the cookie authentication modules are based on access-only control so $r-connection-user() can return a value in late phases only if one assigns it at the first place. Point of clarification... The authentication I'm writing about is BASIC AUTHENTICATION. apache takes care of all of that. It appears as though the client is not sending it, but I don't know why ... and if not, how it manages to pass the authentication portion of the apache request loop. the example I'm using does the following: .htaccess AuthType Basic AuthName MagicName AuthUserFile /home/web/public_html/cgi/private/user.access require valid-user scriptA.plx -redirect to scriptB.plx scriptB.plx -redirect to scriptA.plx CONDITIONALLY if the CONDITION is met, the redirect is not done i.e. cookie present + user present what happens.. scriptA always has ENV{REMOTE_USER} and $r-connection-user valid scriptB rarely has them both valid either script can set the same cookie if it is not present. The cookie is always present for scriptA and usually but not always present for scriptB WHY??? Michael
Re: Segmentation Fault with mod_php and mod_perl
Stas, I am sorry, I got too excited when I saw the segmentation fault. Here is the output of 'bt': 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)) { (gdb) bt #0 0x75a10 in php_xbithack_handler (r=0x927840) at mod_php4.c:778 #1 0x17aeb0 in ap_invoke_handler () #2 0x199a28 in process_request_internal () #3 0x199aac in ap_process_request () #4 0x18c948 in child_main () #5 0x18cbdc in make_child () #6 0x18cdf8 in startup_children () #7 0x18d82c in standalone_main () #8 0x18e488 in main () Thanks for offering to help! 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: Wed, 28 Aug 2002 11:00:42 +0800 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. _ Chat with friends online, try MSN Messenger: http://messenger.msn.com
Re: odd authetication situation
The client only sends basic auth credentials when requested. So if you have an authorization handler that might validate a cookie and return OK before basic auth credentials are requested of the client, then you will need to set $r-user from that handler for it to be accessible later on down the chain. Regards, Tim Tompkins -- Programmer http://www.arttoday.com/ http://www.rebelartist.com/ --
Re: [mp-1.99_05] HPUX 11 w/gcc 3.2(b) -Ae missing ... predicateerror
On Tue, 27 Aug 2002, Phil Lobbes wrote: 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. thanks. i've made the change in cvs.
Re: [modperl-2.0] unresolved external on win32 when compiling
On Sat, 17 Aug 2002, pascal barbedor wrote: Hi when compiling modperl 1.99_05 (from today cvs) with MP_DEBUG=1 there is un unresolved external RequestIO.obj : unresolved external symbol _times RequestIO.dll fatal LNK error this has been fixed in cvs. just s/times/PerlProc_times/g in modperl_time.h
Re: [mp-1.99_05] segfault modperl_pcw.c:52 ap_pcw_walk_files_configdconf-sec_file is NULL
On Tue, 27 Aug 2002, Phil Lobbes wrote: 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; which one is NULL dconf or dconf-sec_file? if dconf-sec_file should never be NULL. i'm not sure if it is possible for dconf itself to be NULL. do you have some example configuration that causes the problem?
Re: Weird: Perl/Perl [mp2]
On Mon, 19 Aug 2002, Alessandro Forghieri wrote: Greetings. This happens on win32. If the following is inserted in httpd.conf: Perl /Perl I get, reasonbly enough: Syntax error on line 961 of D:/Apache2/conf/httpd.conf: Perl sections not yet implemented in modperl-2.0 Tough, but fair. But why should the following: IfDefine fubar Perl /Perl /IfDefine give me the totally unreasonable: Syntax error on line 960 of D:/think4/Apache2/conf/httpd.conf: Expected /Perl but saw /Perl not sure, but likely an apache issue. anyhow, in the cvs version of modperl-2.0, pluggable Perl sections have been implemented (see posting to the dev list). somebody just needs to implement a default handler to actually convert the Perl code to apache config.
Re: Performance issue
On Tue, 20 Aug 2002, Pierre Laplante wrote: Does any body has performance data regarding mod_perl 2.0 vs mod_perl 1.0? i have not done any benchmarking, nor have i seen number from anybody else. maybe josh chamas will add 2.0 to his benchmark matrix soon? What is the stability of mod_perl 2.0? Any body using it in production? covalent has customers using mod_perl-2.0 in production with the prefork MPM without any problems.
Re: Segmentation Fault with mod_php and mod_perl
On Wed, 28 Aug 2002, Alex Lee wrote: Stas, I am sorry, I got too excited when I saw the segmentation fault. Here is the output of 'bt': 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)) { 99.99% sure this is largefiles related, as somebody else mentioned. you need to make sure php was compiled with the same flags as httpd. that is, if you built php before mod_perl, you need to recompile php so it uses the largefile flags. or.. rebuilt modperl/httpd with Makefile.PL PERL_USELARGEFILES=0