From: Boris Z. <bz...@2b...> - 2004-10-25 12:19:24
|
Hi, it has changes a lot, the patch is ~80k so I do not post it to A::P dev. Please test it and provide some feedback. Currently avail on http://eg.2bz.de/Apache-PageKit-1.15.tar.gz Next monday on CPAN. 1.15 - Add: request_class parameter just for the case, that you like another class or subclass do what Apache::Request do for you. Defaults to Apache::Request::PageKit ( Boris Zentner ) - Fix: conversion error if the tmpl file's encoding is != utf8 and no content_var's are used. affects only perl < 5.8.0 ( Boris Zentner ) - Add: Basic testsuite ( Boris Zentner ) - Remove setup_eg.pl this file is obsolete ( Boris Zentner ) - Fix: Fresh created session cookie headers are wrongly not send for pkit_redirect pages this is fixed now. ( Boris Zentner ) - Add: Experimental support for Template Toolkit. Enabled with template_class = "Template" in your Config.xml ( Boris Zentner) - Fix: with pkit_admin=on and perl 5.8.x the input data is converted to your default_input_charset. ( Boris Zentner, Sean Lee ) - Send Content-Length header for static files. ( Boris Zentner ) - Fix: eg/dbfile needs rw permission even for nobody or nouser if apache is started as root. ( Boris Zentner, Shawn Poulson ) Changes | 21 + MANIFEST | 40 ++- META.yml | 4 Makefile.PL | 327 ++++++++++++++++++++++---- README | 29 +- docsrc/manual.xml | 2 docsrc/reference.xml | 14 + eg/Model/MyPageKit/MyModel.pm | 9 eg/View/Default/charset_tmpl.tmpl | 17 + lib/Apache/PageKit.pm | 33 ++ lib/Apache/PageKit/Content.pm | 5 lib/Apache/PageKit/Model.pm | 12 lib/Apache/PageKit/View.pm | 473 ++++++++++++++++++++++++++++++++++---- scripts/pkit_rename_app.pl | 69 +++++ scripts/pkit_setup_db.pl | 153 ++++++++++++ setup_eg.pl | 60 ---- t/01_dummy.t | 5 t/02_language.t | 61 ++++ t/03_charset.t | 48 +++ t/04_anon_cookies.t | 34 ++ t/05_account.t | 65 +++++ t/06_login.t | 60 ++++ t/07_restricted.t | 32 ++ t/08_fresh_cookie_redirect.t | 28 ++ t/09_charset_tmpl.t | 45 +++ t/10_pkit_comment.t | 19 + t/1_dummy.t | 5 t/TEST.PL | 44 ++- 28 files changed, 1490 insertions(+), 224 deletions(-) -- Boris |
From: Boris Z. <bz...@2b...> - 2004-11-02 17:47:35
|
Hi Veeresh, it's not a bug, it is a future. I add this sub to the modelcode: sub tst { shift->output( seekrecord => 200 ); } and add a View Default/View/tst.tmpl <html> <body> <form > [% seekrecord %] <input value=[% seekrecord %] name="seekrecord" type="hidden" /> </form> </body> </html> I reordered it a bit, but without changing the effect ( wo testing ). What happened is that: the model data is filled ( you could also write <modelvar seekrecord> instead of [% seekrecord %] this gives you the advantage to switch between TT and H:T on the fly ). Then the fillinform action takes place and overwrite the value=200 part with whatever value you or the form supply. This may happened implicit. For example with http://whatever/tst?seekrecord=abc for example. You can overcome the effect by 1. using $model->fillinform( seekrecord => 'something' ); in addition or as a replacement for $model->output. 2. disable the autofillin action for the page: ie fill_in_form="off" for the page ( Config.xml page section ). 3. let you source as it is, just tell fillin to ignore this field with $model->ignore_fillinform_fields( qw/seekrecord/ ); just choice one of the options that you like most ;-) I have not tested the above, but it should work this way or very close to that. > Am Dienstag, 2. November 2004 14:56 schrieb R K: >> Umm I was wondering, does not Template Toolkit treat templates as >> binary? There is a binmode option as far as I know. >> >> Thanks >> -RK >> >> R K wrote: >>> Hi Boris, >>> I am using the latest PageKit 1.15 with Template Toolkit. I am facing >>> a kind of unique problem here. Consider following (Code: Model) : >>> >>> $model->output(seekrecord => $UserData->{seekrecord}); >>> where $UserData->{seekrecord} = 200; >>> >>> Now consider following: (Template) >>> <input value=[% seekrecord %] [% seekrecord %] >>> name="seekrecord" type="hidden" /> >>> >>> In output I get: (Final Web Page) >>> <input 200 value="100" name="seekrecord" type="hidden" /> >>> >>> Any ideas???? No matter whatever is the value, I always get >>> vale="100" >>> and please check I didnt mention any quotes after value, but they >>> appear in the final output. Any guesses? >>> > [...] > -- > Boris > > -- Boris |
From: R K <lin...@ho...> - 2004-11-03 11:36:11
|
Hi Boris, Is there a way to disable FillInForm globally?. I am having tough time taking care of Config.xml and the model code. Thanks -RK Boris Zentner wrote: > > Hi Veeresh, > > it's not a bug, it is a future. > > I add this sub to the modelcode: > > sub tst { > shift->output( seekrecord => 200 ); > } > > and add a View Default/View/tst.tmpl > <html> > <body> > <form > > [% seekrecord %] > <input value=[% seekrecord %] name="seekrecord" type="hidden" /> > </form> > </body> > </html> > > I reordered it a bit, but without changing the effect ( wo testing ). > > What happened is that: the model data is filled ( you could also write > <modelvar seekrecord> instead of [% seekrecord %] this gives you the > advantage to switch between TT and H:T on the fly ). Then the > fillinform action takes place and overwrite the value=200 part with > whatever value you or the form supply. This may happened implicit. > For example with http://whatever/tst?seekrecord=abc for example. > > You can overcome the effect by > > 1. > using $model->fillinform( seekrecord => 'something' ); in addition > or as a replacement for $model->output. > > 2. > disable the autofillin action for the page: ie fill_in_form="off" > for the page ( Config.xml page section ). > > 3. > let you source as it is, just tell fillin to ignore this field > with $model->ignore_fillinform_fields( qw/seekrecord/ ); > > just choice one of the options that you like most ;-) > > I have not tested the above, but it should work this way or very close > to that. > >> Am Dienstag, 2. November 2004 14:56 schrieb R K: > |
From: R K <lin...@ho...> - 2004-11-03 14:16:08
|
I tried this out in View.pm on line number 782: if ( $record->{has_form} && $view->{disable_fillinform} eq 'no' ) { This seems to disable FillInForm globally by adding disable_fillinform="yes" in global configuration section. Please comment. -RK R K wrote: > Hi Boris, > > Is there a way to disable FillInForm globally?. I am having tough time > taking care of Config.xml and the model code. > > Thanks > -RK > Boris Zentner wrote: > >> |
From: Boris Z. <bz...@2b...> - 2004-11-03 19:49:48
|
Hi Verresh, sorry, I was out of the office today. Am 03.11.2004 um 12:35 schrieb R K: > Hi Boris, > > Is there a way to disable FillInForm globally?. I am having tough time > taking care of Config.xml and the model code. > See the sections part of your Config.xml <SECTIONS> <SECTION id='/' fill_in_form='no'/> </SECTIONS> This make fill_in_form="no" the default for all pages. You can overwrite the in the PAGE section or add another section tag. > Thanks > -RK > Boris Zentner wrote: > >> >> Hi Veeresh, >> >> it's not a bug, it is a future. >> >> I add this sub to the modelcode: >> >> sub tst { >> shift->output( seekrecord => 200 ); >> } >> >> and add a View Default/View/tst.tmpl >> <html> >> <body> >> <form > >> [% seekrecord %] >> <input value=[% seekrecord %] name="seekrecord" type="hidden" /> >> </form> >> </body> >> </html> >> >> I reordered it a bit, but without changing the effect ( wo testing ). >> >> What happened is that: the model data is filled ( you could also >> write <modelvar seekrecord> instead of [% seekrecord %] this gives >> you the advantage to switch between TT and H:T on the fly ). Then the >> fillinform action takes place and overwrite the value=200 part with >> whatever value you or the form supply. This may happened implicit. >> For example with http://whatever/tst?seekrecord=abc for example. >> >> You can overcome the effect by >> >> 1. >> using $model->fillinform( seekrecord => 'something' ); in >> addition or as a replacement for $model->output. >> >> 2. >> disable the autofillin action for the page: ie fill_in_form="off" >> for the page ( Config.xml page section ). >> >> 3. >> let you source as it is, just tell fillin to ignore this field >> with $model->ignore_fillinform_fields( qw/seekrecord/ ); >> >> just choice one of the options that you like most ;-) >> >> I have not tested the above, but it should work this way or very >> close to that. >> >>> Am Dienstag, 2. November 2004 14:56 schrieb R K: >> > > -- Boris |
From: R K <lin...@ho...> - 2004-11-04 04:27:18
|
Hi Boris, Thanks for the efforts, I really really appreciate them, yes the settings did work out, I forgot to read the fine print of Section attribute. Thanks a lot again. PageKit with TT2 is one cool combination, simply put amazing! Thanks again. -RK Boris Zentner wrote: > Hi Verresh, > > sorry, I was out of the office today. > > Am 03.11.2004 um 12:35 schrieb R K: > >> Hi Boris, >> >> Is there a way to disable FillInForm globally?. I am having tough >> time taking care of Config.xml and the model code. >> > > See the sections part of your Config.xml > > <SECTIONS> > <SECTION id='/' fill_in_form='no'/> > </SECTIONS> > > This make fill_in_form="no" the default for all pages. You can > overwrite the in the PAGE section or add another section tag. > > >> Thanks >> -RK >> Boris Zentner wrote: >> >>> >>> Hi Veeresh, >>> >>> it's not a bug, it is a future. >>> >>> I add this sub to the modelcode: >>> >>> sub tst { >>> shift->output( seekrecord => 200 ); >>> } >>> >>> and add a View Default/View/tst.tmpl >>> <html> >>> <body> >>> <form > >>> [% seekrecord %] >>> <input value=[% seekrecord %] name="seekrecord" type="hidden" /> >>> </form> >>> </body> >>> </html> >>> >>> I reordered it a bit, but without changing the effect ( wo testing ). >>> >>> What happened is that: the model data is filled ( you could also >>> write <modelvar seekrecord> instead of [% seekrecord %] this gives >>> you the advantage to switch between TT and H:T on the fly ). Then >>> the fillinform action takes place and overwrite the value=200 part >>> with whatever value you or the form supply. This may happened implicit. >>> For example with http://whatever/tst?seekrecord=abc for example. >>> >>> You can overcome the effect by >>> >>> 1. >>> using $model->fillinform( seekrecord => 'something' ); in >>> addition or as a replacement for $model->output. >>> >>> 2. >>> disable the autofillin action for the page: ie >>> fill_in_form="off" for the page ( Config.xml page section ). >>> >>> 3. >>> let you source as it is, just tell fillin to ignore this field >>> with $model->ignore_fillinform_fields( qw/seekrecord/ ); >>> >>> just choice one of the options that you like most ;-) >>> >>> I have not tested the above, but it should work this way or very >>> close to that. >>> >>>> Am Dienstag, 2. November 2004 14:56 schrieb R K: >>> >>> >> >> > -- > Boris > |
From: R K <lin...@ho...> - 2004-11-04 13:07:08
|
Hi Boris, I have following section in my Config.xml: <PAGE id="NetReperio/searchcmd.sh" content_type="application/x-sh"/> The id is getting execution out of Model method named 'search' in where I have placed a small internal redirect to 'NetReperio/searchcmd.sh'. The HTML code responsible to execute this is: <form name="cmd" action="/netreperio/NetReperio/search" method="post"> Now whenever the browser gets the file it tries to save it as 'search'. Is there any method by which this behavior can be changed, so that the browser gets file name as 'searchcmd.sh' ? FYI this file is generated dynamically. Please comment. Thanks a lot again. -RK R K wrote: > Hi Boris, > > Thanks for the efforts, I really really appreciate them, yes the > settings did work out, I forgot to read the fine print of Section > attribute. Thanks a lot again. PageKit with TT2 is one cool > combination, simply put amazing! > > Thanks again. > > -RK |
From: Boris Z. <bz...@2b...> - 2004-11-04 13:57:27
|
Hi Veeresh, Am 04.11.2004 um 14:06 schrieb R K: > Hi Boris, > > I have following section in my Config.xml: > > <PAGE id="NetReperio/searchcmd.sh" content_type="application/x-sh"/> > > The id is getting execution out of Model method named 'search' in > where I have placed a small internal redirect to > 'NetReperio/searchcmd.sh'. The HTML code responsible to execute this > is: > > <form name="cmd" action="/netreperio/NetReperio/search" method="post"> > > Now whenever the browser gets the file it tries to save it as > 'search'. Is there any method by which this behavior can be changed, > so that the browser gets file name as 'searchcmd.sh' ? > > FYI this file is generated dynamically. > Im not really sure If I understand what you try to archive. You might have asked for $model->apr->headers_out->set( 'Content-Disposition', 'attachment; filename="searchcmd.sh"' ); you might also look at pkit_send, if your generated content does not use a view. ( untested ) Have a nice day. > Please comment. > > Thanks a lot again. > > -RK > R K wrote: > >> Hi Boris, >> >> Thanks for the efforts, I really really appreciate them, yes the >> settings did work out, I forgot to read the fine print of Section >> attribute. Thanks a lot again. PageKit with TT2 is one cool >> combination, simply put amazing! >> >> Thanks again. >> >> -RK > > > -- Boris |
From: <sh...@ru...> - 2004-11-04 15:17:26
|
RK, You might simply want to do a $model->pkit_redirect (for an HTTP redirect) rather than a pkit_internal_redirect. Although Boris' suggestion is probably more flexible. shimon. On Thu, Nov 04, 2004 at 02:57:12PM +0100, Boris Zentner wrote: > Hi Veeresh, > > Am 04.11.2004 um 14:06 schrieb R K: > > >Hi Boris, > > > >I have following section in my Config.xml: > > > ><PAGE id="NetReperio/searchcmd.sh" content_type="application/x-sh"/> > > > >The id is getting execution out of Model method named 'search' in > >where I have placed a small internal redirect to > >'NetReperio/searchcmd.sh'. The HTML code responsible to execute this > >is: > > > ><form name="cmd" action="/netreperio/NetReperio/search" method="post"> > > > >Now whenever the browser gets the file it tries to save it as > >'search'. Is there any method by which this behavior can be changed, > >so that the browser gets file name as 'searchcmd.sh' ? > > > >FYI this file is generated dynamically. > > > > Im not really sure If I understand what you try to archive. You might > have asked for > > $model->apr->headers_out->set( 'Content-Disposition', 'attachment; > filename="searchcmd.sh"' ); > > you might also look at pkit_send, if your generated content does not > use a view. > > ( untested ) > > Have a nice day. > > >Please comment. > > > >Thanks a lot again. > > > >-RK > >R K wrote: > > > >>Hi Boris, > >> > >>Thanks for the efforts, I really really appreciate them, yes the > >>settings did work out, I forgot to read the fine print of Section > >>attribute. Thanks a lot again. PageKit with TT2 is one cool > >>combination, simply put amazing! > >> > >>Thanks again. > >> > >>-RK > > > > > > > -- > Boris > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > _______________________________________________ > Pagekit-users mailing list > Pag...@li... > https://lists.sourceforge.net/lists/listinfo/pagekit-users |
From: Alex D. <al...@dr...> - 2004-11-19 14:09:54
|
Hi, Can I access the 'referral' field, or indeed the HTTP request header at all? There seems to be no method for that (or at least one that would return a CGI object, or something) Thanks! |
From: Boris Z. <bz...@2b...> - 2004-11-19 14:29:32
|
Hi, Am 19.11.2004 um 15:09 schrieb Alex Deva: > Hi, > > Can I access the 'referral' field, or indeed the HTTP request header > at all? > There seems to be no method for that (or at least one that would > return a > CGI object, or something) > > Thanks! > Yes, sure. sub xyz { my $model = shift; my $apr = $model->apr; my $referer = $apr->headers_in->{'Referer'}; ... } untested, but least close to this. Have a nice day. -- Boris |
From: <sh...@ru...> - 2004-11-19 14:33:03
|
If you mean the HTTP referer information, you can get that out of the runtime environment: $ENV{'HTTP_REFERER'} A google search randomly turned up this page, which has a useful list and is running under mod_perl: http://www.cis.ksu.edu/~aruljohn/cgi-bin/env.cgi If that page stops working try another search for "mod_perl environment variable list". Good luck! shimon. On Fri, Nov 19, 2004 at 04:09:05PM +0200, Alex Deva wrote: > Hi, > > Can I access the 'referral' field, or indeed the HTTP request header at all? > There seems to be no method for that (or at least one that would return a > CGI object, or something) > > Thanks! > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: InterSystems CACHE > FREE OODBMS DOWNLOAD - A multidimensional database that combines > robust object and relational technologies, making it a perfect match > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > _______________________________________________ > Pagekit-users mailing list > Pag...@li... > https://lists.sourceforge.net/lists/listinfo/pagekit-users |
From: Alex D. <al...@dr...> - 2004-11-19 14:41:08
|
The env var seems to not be set all the time. This might be because I'm reaching the page via http redirect, and you never know (or do you?) Boris, the correctly spelled method is "header_in" and it works like so: my $referer = $apr->header_in('Referer'); (I've just found that out, I didn't know about it, thank you!) but... still no result. Thanks anyway. ----- Original Message ----- From: <sh...@ru...> To: "Alex Deva" <al...@dr...> Cc: "Boris Zentner" <bz...@2b...>; "PageKit Users" <pag...@li...> Sent: Friday, November 19, 2004 4:33 PM Subject: Re: [Pagekit-users] referral field in the http request > If you mean the HTTP referer information, you can get that out of the > runtime environment: > > $ENV{'HTTP_REFERER'} > > A google search randomly turned up this page, which has a useful list and is > running under mod_perl: > > http://www.cis.ksu.edu/~aruljohn/cgi-bin/env.cgi > > If that page stops working try another search for "mod_perl environment > variable list". > > Good luck! > > shimon. > > On Fri, Nov 19, 2004 at 04:09:05PM +0200, Alex Deva wrote: > > Hi, > > > > Can I access the 'referral' field, or indeed the HTTP request header at all? > > There seems to be no method for that (or at least one that would return a > > CGI object, or something) > > > > Thanks! > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: InterSystems CACHE > > FREE OODBMS DOWNLOAD - A multidimensional database that combines > > robust object and relational technologies, making it a perfect match > > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > > _______________________________________________ > > Pagekit-users mailing list > > Pag...@li... > > https://lists.sourceforge.net/lists/listinfo/pagekit-users > > > ------------------------------------------------------- > This SF.Net email is sponsored by: InterSystems CACHE > FREE OODBMS DOWNLOAD - A multidimensional database that combines > robust object and relational technologies, making it a perfect match > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > _______________________________________________ > Pagekit-users mailing list > Pag...@li... > https://lists.sourceforge.net/lists/listinfo/pagekit-users > |
From: Boris Z. <bo...@2b...> - 2004-11-19 17:11:36
|
Hi Alex, Am Freitag, 19. November 2004 15:40 schrieb Alex Deva: > The env var seems to not be set all the time. This might be because I'm > reaching the page via http redirect, and you never know (or do you?) > > Boris, the correctly spelled method is "header_in" and it works like so: > > my $referer = $apr->header_in('Referer'); > This works only with apache1. apache2 and apache1 should support my $href = $apr->headers_in; here is a example: Maybe you did not see the header, since the client must not send the referer header. #### Modelcode ###### # show all headers sub alex { my $model = shift; my $href = $model->apr->headers_in; $model->output( headers => [ map { +{ name => $_, value => $href->{$_} } } sort keys %$href ] ); } ######### alex.tmpl ######### <html> <body> <model_loop headers> <model_var name> <model_var value><br> </model_loop> </body> </html> ####### output ( ignore ) ########### Accept */* Accept-Encoding gzip, deflate;q=1.0, identity;q=0.5, *;q=0 Accept-Language de-de, ja;q=0.77, en;q=0.92, nl-nl;q=0.88, nl;q=0.85, ja-jp;q=0.81, de;q=0.96, fr;q=0.73, es;q=0.69, it-it;q=0.65, it;q=0.62, sv-se;q=0.58, sv;q=0.54, no-no;q=0.50, no;q=0.46, da-dk;q=0.42, da;q=0.38, fi-fi;q=0.35, fi;q=0.31 Connection keep-alive Cookie pkit_session_id=fdb814523909709a3a697ee14fbcc1a0 Host localhost:8529 User-Agent Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.11 > (I've just found that out, I didn't know about it, thank you!) > > but... still no result. > > Thanks anyway. > > > ----- Original Message ----- > From: <sh...@ru...> > To: "Alex Deva" <al...@dr...> > Cc: "Boris Zentner" <bz...@2b...>; "PageKit Users" > <pag...@li...> > Sent: Friday, November 19, 2004 4:33 PM > Subject: Re: [Pagekit-users] referral field in the http request > > > If you mean the HTTP referer information, you can get that out of the > > runtime environment: > > > > $ENV{'HTTP_REFERER'} > > > > A google search randomly turned up this page, which has a useful list and > > is > > > running under mod_perl: > > > > http://www.cis.ksu.edu/~aruljohn/cgi-bin/env.cgi > > > > If that page stops working try another search for "mod_perl environment > > variable list". > > > > Good luck! > > > > shimon. > > > > On Fri, Nov 19, 2004 at 04:09:05PM +0200, Alex Deva wrote: > > > Hi, > > > > > > Can I access the 'referral' field, or indeed the HTTP request header at > > all? > > > > There seems to be no method for that (or at least one that would return > > a > > > > CGI object, or something) > > > > > > Thanks! > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: InterSystems CACHE > > > FREE OODBMS DOWNLOAD - A multidimensional database that combines > > > robust object and relational technologies, making it a perfect match > > > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > > > _______________________________________________ > > > Pagekit-users mailing list > > > Pag...@li... > > > https://lists.sourceforge.net/lists/listinfo/pagekit-users > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: InterSystems CACHE > > FREE OODBMS DOWNLOAD - A multidimensional database that combines > > robust object and relational technologies, making it a perfect match > > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > > _______________________________________________ > > Pagekit-users mailing list > > Pag...@li... > > https://lists.sourceforge.net/lists/listinfo/pagekit-users > > ------------------------------------------------------- > This SF.Net email is sponsored by: InterSystems CACHE > FREE OODBMS DOWNLOAD - A multidimensional database that combines > robust object and relational technologies, making it a perfect match > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > _______________________________________________ > Pagekit-users mailing list > Pag...@li... > https://lists.sourceforge.net/lists/listinfo/pagekit-users -- Boris |
From: Alex D. <al...@dr...> - 2004-11-21 09:34:55
|
Thanks. I'll try it first thing Monday morning. Which reminds me. I've been thinking about setting up a development environment on my iBook G3 (my Darwin came with Apache 1.3.29 and perl 5.6.0) Is there anything I should know about, prior to installing all the required modules and fighting with httpd.conf a lot? :) I'm especially worried about updating (or installing, i haven't checked it) libxml2 and libxsl2 (on RedHat it was easy, you just updated with rpm). Any other required modules that might have issues running on a Mac with MacOS 10.2.8? Thanks anyone for any advice. On Friday, November 19, 2004, at 07:39 PM, Boris Zentner wrote: > > Hi Alex, > > Am Freitag, 19. November 2004 15:40 schrieb Alex Deva: >> The env var seems to not be set all the time. This might be because >> I'm >> reaching the page via http redirect, and you never know (or do you?) >> >> Boris, the correctly spelled method is "header_in" and it works like >> so: >> >> my $referer = $apr->header_in('Referer'); >> > > This works only with apache1. > > apache2 and apache1 should support > my $href = $apr->headers_in; > > here is a example: > > Maybe you did not see the header, since the client must not send the > referer > header. > > #### Modelcode ###### > > # show all headers > > sub alex { > my $model = shift; > my $href = $model->apr->headers_in; > $model->output( > headers => [ map { +{ name => $_, value => $href->{$_} } } sort > keys > %$href > ] ); > } > > > ######### alex.tmpl ######### > <html> > <body> > <model_loop headers> > <model_var name> <model_var value><br> > </model_loop> > </body> > </html> > > > ####### output ( ignore ) ########### > > Accept */* > Accept-Encoding gzip, deflate;q=1.0, identity;q=0.5, *;q=0 > Accept-Language de-de, ja;q=0.77, en;q=0.92, nl-nl;q=0.88, nl;q=0.85, > ja-jp;q=0.81, de;q=0.96, fr;q=0.73, es;q=0.69, it-it;q=0.65, it;q=0.62, > sv-se;q=0.58, sv;q=0.54, no-no;q=0.50, no;q=0.46, da-dk;q=0.42, > da;q=0.38, > fi-fi;q=0.35, fi;q=0.31 > Connection keep-alive > Cookie pkit_session_id=fdb814523909709a3a697ee14fbcc1a0 > Host localhost:8529 > User-Agent Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) > AppleWebKit/125.5.5 > (KHTML, like Gecko) Safari/125.11 > >> (I've just found that out, I didn't know about it, thank you!) >> >> but... still no result. >> >> Thanks anyway. >> >> >> ----- Original Message ----- >> From: <sh...@ru...> >> To: "Alex Deva" <al...@dr...> >> Cc: "Boris Zentner" <bz...@2b...>; "PageKit Users" >> <pag...@li...> >> Sent: Friday, November 19, 2004 4:33 PM >> Subject: Re: [Pagekit-users] referral field in the http request >> >>> If you mean the HTTP referer information, you can get that out of the >>> runtime environment: >>> >>> $ENV{'HTTP_REFERER'} >>> >>> A google search randomly turned up this page, which has a useful >>> list and >> >> is >> >>> running under mod_perl: >>> >>> http://www.cis.ksu.edu/~aruljohn/cgi-bin/env.cgi >>> >>> If that page stops working try another search for "mod_perl >>> environment >>> variable list". >>> >>> Good luck! >>> >>> shimon. >>> >>> On Fri, Nov 19, 2004 at 04:09:05PM +0200, Alex Deva wrote: >>>> Hi, >>>> >>>> Can I access the 'referral' field, or indeed the HTTP request >>>> header at >> >> all? >> >>>> There seems to be no method for that (or at least one that would >>>> return >> >> a >> >>>> CGI object, or something) >>>> >>>> Thanks! >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by: InterSystems CACHE >>>> FREE OODBMS DOWNLOAD - A multidimensional database that combines >>>> robust object and relational technologies, making it a perfect match >>>> for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 >>>> _______________________________________________ >>>> Pagekit-users mailing list >>>> Pag...@li... >>>> https://lists.sourceforge.net/lists/listinfo/pagekit-users >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: InterSystems CACHE >>> FREE OODBMS DOWNLOAD - A multidimensional database that combines >>> robust object and relational technologies, making it a perfect match >>> for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 >>> _______________________________________________ >>> Pagekit-users mailing list >>> Pag...@li... >>> https://lists.sourceforge.net/lists/listinfo/pagekit-users >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: InterSystems CACHE >> FREE OODBMS DOWNLOAD - A multidimensional database that combines >> robust object and relational technologies, making it a perfect match >> for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 >> _______________________________________________ >> Pagekit-users mailing list >> Pag...@li... >> https://lists.sourceforge.net/lists/listinfo/pagekit-users > > -- > Boris > > > ------------------------------------------------------- > This SF.Net email is sponsored by: InterSystems CACHE > FREE OODBMS DOWNLOAD - A multidimensional database that combines > robust object and relational technologies, making it a perfect match > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > _______________________________________________ > Pagekit-users mailing list > Pag...@li... > https://lists.sourceforge.net/lists/listinfo/pagekit-users |
From: <sh...@ru...> - 2004-11-21 17:29:21
|
I dunno about Mac, but I have gotten PageKit working on Windows and don't recall any horrific libxml stuff (perhaps because I got an Apache/Perl distro that already had it built). But if it's possible on windows, it's probably not too hard on MacOS X. Good luck, shimon. On Sun, Nov 21, 2004 at 11:35:10AM +0200, Alex Deva wrote: > Thanks. I'll try it first thing Monday morning. > Which reminds me. I've been thinking about setting up a development > environment on my iBook G3 (my Darwin came with Apache 1.3.29 and perl > 5.6.0) > > Is there anything I should know about, prior to installing all the > required modules and fighting with httpd.conf a lot? :) I'm especially > worried about updating (or installing, i haven't checked it) libxml2 > and libxsl2 (on RedHat it was easy, you just updated with rpm). Any > other required modules that might have issues running on a Mac with > MacOS 10.2.8? > > Thanks anyone for any advice. > > On Friday, November 19, 2004, at 07:39 PM, Boris Zentner wrote: > > > > >Hi Alex, > > > >Am Freitag, 19. November 2004 15:40 schrieb Alex Deva: > >>The env var seems to not be set all the time. This might be because > >>I'm > >>reaching the page via http redirect, and you never know (or do you?) > >> > >>Boris, the correctly spelled method is "header_in" and it works like > >>so: > >> > >>my $referer = $apr->header_in('Referer'); > >> > > > >This works only with apache1. > > > > apache2 and apache1 should support > >my $href = $apr->headers_in; > > > >here is a example: > > > >Maybe you did not see the header, since the client must not send the > >referer > >header. > > > >#### Modelcode ###### > > > ># show all headers > > > >sub alex { > > my $model = shift; > > my $href = $model->apr->headers_in; > > $model->output( > > headers => [ map { +{ name => $_, value => $href->{$_} } } sort > >keys > >%$href > > ] ); > >} > > > > > >######### alex.tmpl ######### > ><html> > ><body> > > <model_loop headers> > > <model_var name> <model_var value><br> > > </model_loop> > ></body> > ></html> > > > > > >####### output ( ignore ) ########### > > > >Accept */* > >Accept-Encoding gzip, deflate;q=1.0, identity;q=0.5, *;q=0 > >Accept-Language de-de, ja;q=0.77, en;q=0.92, nl-nl;q=0.88, nl;q=0.85, > >ja-jp;q=0.81, de;q=0.96, fr;q=0.73, es;q=0.69, it-it;q=0.65, it;q=0.62, > >sv-se;q=0.58, sv;q=0.54, no-no;q=0.50, no;q=0.46, da-dk;q=0.42, > >da;q=0.38, > >fi-fi;q=0.35, fi;q=0.31 > >Connection keep-alive > >Cookie pkit_session_id=fdb814523909709a3a697ee14fbcc1a0 > >Host localhost:8529 > >User-Agent Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) > >AppleWebKit/125.5.5 > >(KHTML, like Gecko) Safari/125.11 > > > >>(I've just found that out, I didn't know about it, thank you!) > >> > >>but... still no result. > >> > >>Thanks anyway. > >> > >> > >>----- Original Message ----- > >>From: <sh...@ru...> > >>To: "Alex Deva" <al...@dr...> > >>Cc: "Boris Zentner" <bz...@2b...>; "PageKit Users" > >><pag...@li...> > >>Sent: Friday, November 19, 2004 4:33 PM > >>Subject: Re: [Pagekit-users] referral field in the http request > >> > >>>If you mean the HTTP referer information, you can get that out of the > >>>runtime environment: > >>> > >>>$ENV{'HTTP_REFERER'} > >>> > >>>A google search randomly turned up this page, which has a useful > >>>list and > >> > >>is > >> > >>>running under mod_perl: > >>> > >>>http://www.cis.ksu.edu/~aruljohn/cgi-bin/env.cgi > >>> > >>>If that page stops working try another search for "mod_perl > >>>environment > >>>variable list". > >>> > >>>Good luck! > >>> > >>>shimon. > >>> > >>>On Fri, Nov 19, 2004 at 04:09:05PM +0200, Alex Deva wrote: > >>>>Hi, > >>>> > >>>>Can I access the 'referral' field, or indeed the HTTP request > >>>>header at > >> > >>all? > >> > >>>>There seems to be no method for that (or at least one that would > >>>>return > >> > >>a > >> > >>>>CGI object, or something) > >>>> > >>>>Thanks! > >>>> > >>>> > >>>> > >>>>------------------------------------------------------- > >>>>This SF.Net email is sponsored by: InterSystems CACHE > >>>>FREE OODBMS DOWNLOAD - A multidimensional database that combines > >>>>robust object and relational technologies, making it a perfect match > >>>>for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > >>>>_______________________________________________ > >>>>Pagekit-users mailing list > >>>>Pag...@li... > >>>>https://lists.sourceforge.net/lists/listinfo/pagekit-users > >>> > >>>------------------------------------------------------- > >>>This SF.Net email is sponsored by: InterSystems CACHE > >>>FREE OODBMS DOWNLOAD - A multidimensional database that combines > >>>robust object and relational technologies, making it a perfect match > >>>for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > >>>_______________________________________________ > >>>Pagekit-users mailing list > >>>Pag...@li... > >>>https://lists.sourceforge.net/lists/listinfo/pagekit-users > >> > >>------------------------------------------------------- > >>This SF.Net email is sponsored by: InterSystems CACHE > >>FREE OODBMS DOWNLOAD - A multidimensional database that combines > >>robust object and relational technologies, making it a perfect match > >>for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > >>_______________________________________________ > >>Pagekit-users mailing list > >>Pag...@li... > >>https://lists.sourceforge.net/lists/listinfo/pagekit-users > > > >-- > >Boris > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by: InterSystems CACHE > >FREE OODBMS DOWNLOAD - A multidimensional database that combines > >robust object and relational technologies, making it a perfect match > >for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > >_______________________________________________ > >Pagekit-users mailing list > >Pag...@li... > >https://lists.sourceforge.net/lists/listinfo/pagekit-users > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: InterSystems CACHE > FREE OODBMS DOWNLOAD - A multidimensional database that combines > robust object and relational technologies, making it a perfect match > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > _______________________________________________ > Pagekit-users mailing list > Pag...@li... > https://lists.sourceforge.net/lists/listinfo/pagekit-users |
From: Boris Z. <bz...@2b...> - 2004-11-21 17:50:18
|
Hi Alex, Am 21.11.2004 um 10:35 schrieb Alex Deva: > Thanks. I'll try it first thing Monday morning. > Which reminds me. I've been thinking about setting up a development > environment on my iBook G3 (my Darwin came with Apache 1.3.29 and perl > 5.6.0) > > Is there anything I should know about, prior to installing all the > required modules and fighting with httpd.conf a lot? :) I'm especially > worried about updating (or installing, i haven't checked it) libxml2 > and libxsl2 (on RedHat it was easy, you just updated with rpm). Any > other required modules that might have issues running on a Mac with > MacOS 10.2.8? > > Thanks anyone for any advice. > I had no trouble to set up perl 5.8.[145], apache2 mod_perl2 and all required modules for Apache::PageKit. But I use Panther ( 10.3.[56] ). I Installed all custom libraries with fink. http://fink.sourceforge.net/index.php?phpLang=en Also I really love camelbones, even there is no package for your ( 10.2.8 ) but you may request one. See the top of this page: http://camelbones.sourceforge.net/download/fat-install.php > On Friday, November 19, 2004, at 07:39 PM, Boris Zentner wrote: > >> >> Hi Alex, >> >> Am Freitag, 19. November 2004 15:40 schrieb Alex Deva: >>> The env var seems to not be set all the time. This might be because >>> I'm >>> reaching the page via http redirect, and you never know (or do you?) >>> >>> Boris, the correctly spelled method is "header_in" and it works like >>> so: >>> >>> my $referer = $apr->header_in('Referer'); >>> >> >> This works only with apache1. >> >> apache2 and apache1 should support >> my $href = $apr->headers_in; >> >> here is a example: >> >> Maybe you did not see the header, since the client must not send the >> referer >> header. >> >> #### Modelcode ###### >> >> # show all headers >> >> sub alex { >> my $model = shift; >> my $href = $model->apr->headers_in; >> $model->output( >> headers => [ map { +{ name => $_, value => $href->{$_} } } sort >> keys >> %$href >> ] ); >> } >> >> >> ######### alex.tmpl ######### >> <html> >> <body> >> <model_loop headers> >> <model_var name> <model_var value><br> >> </model_loop> >> </body> >> </html> >> >> >> ####### output ( ignore ) ########### >> >> Accept */* >> Accept-Encoding gzip, deflate;q=1.0, identity;q=0.5, *;q=0 >> Accept-Language de-de, ja;q=0.77, en;q=0.92, nl-nl;q=0.88, nl;q=0.85, >> ja-jp;q=0.81, de;q=0.96, fr;q=0.73, es;q=0.69, it-it;q=0.65, >> it;q=0.62, >> sv-se;q=0.58, sv;q=0.54, no-no;q=0.50, no;q=0.46, da-dk;q=0.42, >> da;q=0.38, >> fi-fi;q=0.35, fi;q=0.31 >> Connection keep-alive >> Cookie pkit_session_id=fdb814523909709a3a697ee14fbcc1a0 >> Host localhost:8529 >> User-Agent Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) >> AppleWebKit/125.5.5 >> (KHTML, like Gecko) Safari/125.11 >> >>> (I've just found that out, I didn't know about it, thank you!) >>> >>> but... still no result. >>> >>> Thanks anyway. >>> >>> [...] -- Boris |