Re: Help - Can Apache 2 Filters be implemented in Apache 1.3.x viamod_perl
On Thu, 2003-03-06 at 23:13, David Culp wrote: > Can Apache 2 Filters be implemented in Apache 1.3.x via mod_perl [1.x]? No. However, there are a couple of method for doing this in 1.x. See Apache::Filter or Apache::OutputChain. - Perrin
Re: [mp2] integration with apache threads
I'm solving following problem: generally may happen, that somebody has an instance of XML::Sablotron (and of few more packages) allocated in the interperter at the time, the perl is cloned. Sablotron objects are just wrappers around internal c++ structures, and the only data, they keep, are handles. Some of internal objects are thread safe and may be shared, some must be instantiated per thread. Any Perl data will be copied for you. Things at the C++ level will have to be taken care of by you. There may be a hook that you can use to do some work whenever a new interpreter is cloned. I already introduced threadsafe refcounting for all wrapped internals (bot of safe and unsafe) to prevent crashing in destructors (while disposing internal structure from several cloned instances), but currently I do need understand all scenarios, which may happen when handling non-thread safe internals. I need rather to write a documenation, about what the user is allowed, then develop a different model. In other words: I can keep all object happy when cloned to another threads due the refcounting, but I (user) must grant, that non-threadsafe instances are used across different threads. My original question was aimed right to this point: whether is such a situation even possible. It seems, it is. It it clear? have you got some more comments for me? There's no chance that the same Perl object will be used in multiple threads, but obviously multiple Perl objects could end up pointing to the same C++ data. Since cloned Perl interpreters will all point to the same non-perl datastructures, you must make the access to them thread-safe. Since you have already figured out the issue with DESTROY (must have had lots of segfaults before you did ;) you are all set. I've done something very similar in DBI::Pool prototype, where all access to the shared between threads C struct are mutex locked when accessed. http://archive.develooper.com/[EMAIL PROTECTED]/msg02134.html Notice that you it should be possible to do the locking from perl (using the threads.pm package, however if you read my bug report it has problems when a thread that didn't load the package tries to access the ithreads env. http://archive.develooper.com/[EMAIL PROTECTED]/msg00649.html I'd suggest asking how others are handling making their XS libraries safe across clone calls in a place like comp.lang.perl.misc where more XS wizards tend to hang out. There are some here too though. Anyone have a better answer for Pavel about how to deal with this? probably you are better off at the [EMAIL PROTECTED] and [EMAIL PROTECTED] lists (however the latter is for ithreads issues). __ 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
[mp2] automatic Apache::compat preloading in CPAN modules is a no-no
Apache::compat is useful during the mp1 code porting. Though remember that it's implemented in pure Perl. In certain cases it overrides mp2 methods, because their API is very different and doesn't map 1:1 to mp1. So if anything, not under my control, loads Apache::compat my code is forced to use the potentially slower method. Which is quite bad. Some users may choose to keep using Apache::compat in production and it may perform just fine. Other users will choose not to use that module. It should be users' choice. Therefore CPAN modules should *not* preload Apache::compat, but use the mp2 API or copy the relevant parts from Apache::compat. Of course one can add an ugly workaround in startup.pl: $INC{'Apache/compat.pm'} = __FILE__; but I'd rather not have to remember doing that. I'll update the manpage to have this warning. I haven't scanned the CPAN modules yet, but I've noticed that CGI.pm's latest version does: require mod_perl; if ($mod_perl::VERSION >= 1.99) { eval "require Apache::compat"; } else { eval "require Apache"; } Lincoln, any chance we can kill that preloading? If you need help with porting the API please let us know. Thanks. __ 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
Help - Can Apache 2 Filters be implemented in Apache 1.3.x via mod_perl - Continue
Sorry - implemented via mod_perl 1.x - Original Message - From: David Culp To: [EMAIL PROTECTED] Sent: Thursday, March 06, 2003 11:13 PM Subject: Help - Can Apache 2 Filters be implemented in Apache 1.3.x via mod_perl Can Apache 2 Filters be implemented in Apache 1.3.x via mod_perl ? My goal is to rewrite some parts of the body of a web page before it is sent back to the client (Output Filter). I have it working in Apache 2 using an Output Filter. However, I'm forced to return to Apache 1.3.x; I really need this functionality ! Thanks, David
Help - Can Apache 2 Filters be implemented in Apache 1.3.x via mod_perl
Can Apache 2 Filters be implemented in Apache 1.3.x via mod_perl ? My goal is to rewrite some parts of the body of a web page before it is sent back to the client (Output Filter). I have it working in Apache 2 using an Output Filter. However, I'm forced to return to Apache 1.3.x; I really need this functionality ! Thanks, David
RE: Apache showing Perl code
Hi, This is because your perl handler is not active. How did you setup your apache for perl scripts under mod_perl ? I see you're using windows ? Are you sure mod_perl is working (check out Apache error log when it starts) ? Take a look at the docs for Apache::Registry or Apache::PerlRun. " I just installed Apache and mod_perl, but for some reason when I execute scripts through my Apache server it shows all of the Perl code: #!C:/Perl/bin/Perl.exe print "Content-type: text/html\n\n"; foreach $var (sort(keys(%ENV))) { $val = $ENV{$var}; $val =~ s|\n|\\n|g; $val =~ s|"|\\"|g; print "${var}=\"${val}\"\n"; } I got the path found on the first line from an example Perl script (printenv.pl) that came with the latest version of the Apache server. Could anybody give me a hand with a suggestion or two? " -- Miroslav Madzarevic, [EMAIL PROTECTED] Mod Perl Development - http://www.modperldev.com Telephone: +381 64 1193 501 ICQ: 15880893 Linux user #217444 DEBIAN jamph
problems installing mod_perl 2
Hi, First some basic info: -Apache 2.0.44 -Solaris 9 sparc -perl 5.8.0 -mod_perl-1.99_08 (from mod_perl-2.0-current.tar.gz) -complete newbie to mod_perl I had some problems to compile mod_perl: make test would fail, after reading the mailing list archives, I found a few things related to my problem, so I added a few lines to: t/hooks/TestHooks/init.pm and t/hooks/TestHooks/trans.pm (I can post a diff if it's of interest) This fixed some problems, but not all of them. I decided to ignore further failures of make test, and did a make install, it failed (?), however I did get a mod_perl.so under $apacheroot/modules, so I added the LoadModule line to apache, and restarted it. It seems to work, however I can't load my module (using PerlHandler mymodule), because it can't find Apache::Constants (which I use in my module). I have tried to install this (Apache::Constants) by using the shell of CPAN, but it refuses to install for apache2, I saw some references to Apache2 somewhere in the archives, but couldn't find it either (using CPAN shell). Does "make install" add some more stuff besides mod_perl.so? My perl is in a read only path, so this might be the problem, but I'm not sure... Which are the specific dependencies for mod_perl 2? How stable is mod_perl 2? Thank you all in advance, Carlos
Re: shtml don´t get parsed with mod_perlprotecting the directory
You have to install a fixup handler to tell the server to parse them again, i have the following in my config file: -- in httpd.conf -- PerlFixupHandler +NetChant::Component::Handlers::shtmlFixupHandler and my shtmlFixupHandler subroutine looks like: # # shtmlFixupHandler # =head2 shtmlFixupHandler =over =item Description Enables you to have shtml files in areas where you might have other PerlHandlers installed. ie. Assuming you have the Includes option turned on for your virtual host/server, putting a .shtml file in the 'auth' directory will not work as expected (aka, it will not get parsed). This is because there is a PerlHandler already installed in that location which has an associated "SetHandler perl-script" directive, and that directive takes precedence over all others. To enable .shtml files to work in the /auth location for a virtual host put the following configuration in your virtual host apache config file. Options +IncludesNOEXEC SetHandler perl-script PerlFixupHandler +NetChant::Component::Handlers::shtmlFixupHandler =back =cut sub shtmlFixupHandler { my $request= instance Apache::Request(shift); # # # $request->handler('server-parsed') if $request->filename =~ m/\.shtml$/; # # # return OK; } On Fri, 2003-03-07 at 11:12, Wladimir Boton wrote: > Hi, > > I´m protecting a directory of my site with mod_perl, but all .shtml files > inside it don´t get parsed by mod_include. > > There are any way that shtml files get parsed? > > thanks > > > > _ > MSN Hotmail, o maior webmail do Brasil. http://www.hotmail.com
shtml don´t get parsed with mod_perl protecting the directory
Hi, I´m protecting a directory of my site with mod_perl, but all .shtml files inside it don´t get parsed by mod_include. There are any way that shtml files get parsed? thanks _ MSN Hotmail, o maior webmail do Brasil. http://www.hotmail.com
shtml don´t get parsed with mod_perl protecting directory
Hi, I´m protecting a directory of my site with mod_perl, but all .shtml files inside it don´t get parsed by mod_include. There are any way that shtml files get parsed? thanksMSN Messenger: converse com os seus amigos online. Instale grátis. Clique aqui. Get 2 months FREE*.
Re: Wanted: Experience with EmbPerl on Win2000/Apache HTTPD?
On Wed, 5 Mar 2003, Richard Heintze wrote: > Since I had such a tough time installing mod_perl on > Win2000, I thought I would solicit for experiences > getting Hello, World running with EmbPerl on Apache > HTTPD on Windows2000. > > What URL did you download embperl from? > Did you get any errors during installation? > What is the URL you used for installation > instructions? > What is the URL you used for the instructions for > getting HelloWorld to appear? This might be more appropriate for the embperl mailing list ... For basic installation, we have an Embperl ppm package at http://theoryx5.uwinnipeg.ca/ppmpackages/ for ActivePerl 6xx builds (and mod_perl-1/Apache-1). There's still a bit of work needed to get Embperl ported to ActivePerl 8xx and/or mod_perl-2/Apache-2. For basic usage, check out http://perl.apache.org/embperl/. -- best regards, randy kobes
Re: Spell Checkers and EMail
On Thu, Mar 06, 2003 at 12:23:49PM -0600, Ken Y. Clark wrote: > [snip] > > A bit off topic, but I have a similar need. I have a form where HTML is > > entered. I can easily parse out the text with HTML::Parser, and build a > > list of incorrectly spelled words, open in another window and show the > > words and a list for suggestions or a text field. I have not figured out > > how best to update the existing form inplace, though. I fear javascript > > is in my future. > > I helped implement a spell-checking system for a customer that was > pure mod_perl. In the end, though, a fairly sharp JavaScripter helped > make my somewhat-kludgy solution fairly elegant by popping up a > window, calling my stuff to replace misspelled words, then resetting > the original text with what was left in the pop-up when done checking > (or the user aborted). It wasn't that bad, but I'm glad I didn't have > to write the JavaScript. There is a nice example for a spell-checking implantation like you wrote. Maybe it's helpful for somebody: http://demo.otrs.org/ (source: http://cvs.otrs.org/) > ky Martin -- Old programmers never die. They just branch to a new address.
Re: Spell Checkers and EMail
On Thu, 6 Mar 2003, Bill Moseley wrote: [snip] > A bit off topic, but I have a similar need. I have a form where HTML is > entered. I can easily parse out the text with HTML::Parser, and build a > list of incorrectly spelled words, open in another window and show the > words and a list for suggestions or a text field. I have not figured out > how best to update the existing form inplace, though. I fear javascript > is in my future. I helped implement a spell-checking system for a customer that was pure mod_perl. In the end, though, a fairly sharp JavaScripter helped make my somewhat-kludgy solution fairly elegant by popping up a window, calling my stuff to replace misspelled words, then resetting the original text with what was left in the pop-up when done checking (or the user aborted). It wasn't that bad, but I'm glad I didn't have to write the JavaScript. ky
Re: Spell Checkers and EMail
Philip M. Gollucci wrote: We send a good deal of templated based E-Mail with the option to edit right before sending. The editing is done via webpage running under mod_perl/Apache or PerlEx/IIS with Oracle and MSSQL backends respectively. Anyone know of any good modules to add a "spellchecker" ability to this edit screen or possibly the one on the next page (submit button) ? If this is for an internal application where you have control over what browsers people use, there are several browser plug-ins and Java applets that provide in-line spell-checking on form inputs. - Perrin
Re: Spell Checkers and EMail
On Thu, 6 Mar 2003, Doug Silver wrote: > Also have a look as 'aspell', which I found to have a more extensive > dictionary and thus suggestions for words. I also discovered that sending > stdin to it from a perl script can be quite slow (e.g. an email that has > several replies), however there's a perl module interface that I also > discovered on CPAN -- haven't implemented it yet, too busy. I belive that's Text::Aspell. Needs the "new" GNU Aspell. Text::Aspell lets you check individual words and lookup suggestions for misspelled words. Text::Aspell is a fast interface, but one advantage of piping into Aspell or Ispell is you get back a little more info (such as the line number of the misspelled word). A bit off topic, but I have a similar need. I have a form where HTML is entered. I can easily parse out the text with HTML::Parser, and build a list of incorrectly spelled words, open in another window and show the words and a list for suggestions or a text field. I have not figured out how best to update the existing form inplace, though. I fear javascript is in my future. -- Bill Moseley [EMAIL PROTECTED]
Re: [mp2] integration with apache threads
[ Please keep posts on the list. I am not the most knowledgeable person here about threads, mp2, or XS code. ] Pavel Hlavnicka wrote: Thanks again, I'm solving following problem: generally may happen, that somebody has an instance of XML::Sablotron (and of few more packages) allocated in the interperter at the time, the perl is cloned. Sablotron objects are just wrappers around internal c++ structures, and the only data, they keep, are handles. Some of internal objects are thread safe and may be shared, some must be instantiated per thread. Any Perl data will be copied for you. Things at the C++ level will have to be taken care of by you. There may be a hook that you can use to do some work whenever a new interpreter is cloned. I already introduced threadsafe refcounting for all wrapped internals (bot of safe and unsafe) to prevent crashing in destructors (while disposing internal structure from several cloned instances), but currently I do need understand all scenarios, which may happen when handling non-thread safe internals. I need rather to write a documenation, about what the user is allowed, then develop a different model. In other words: I can keep all object happy when cloned to another threads due the refcounting, but I (user) must grant, that non-threadsafe instances are used across different threads. My original question was aimed right to this point: whether is such a situation even possible. It seems, it is. It it clear? have you got some more comments for me? There's no chance that the same Perl object will be used in multiple threads, but obviously multiple Perl objects could end up pointing to the same C++ data. I'd suggest asking how others are handling making their XS libraries safe across clone calls in a place like comp.lang.perl.misc where more XS wizards tend to hang out. There are some here too though. Anyone have a better answer for Pavel about how to deal with this? Thank you very very much Pavel
Re: make errors with mod_perl-1.99_08 on aix 4.3.3
Hello, I've been following the thread on AIX4.3.3 and mod_perl1.99_08 from Darryl Priest. I've been trying to install the mod_perl and by following the thread I was able to get to the point below by touching ./src/modules/perl/mod_perl.exp. I wasn't able to find any mod_perl.exp that was generated before. Before the error though I run into a lot of warnings like: ld: 0711-415 WARNING:Symbol perl_alloc is already exported. and ld: 0711-224 WARNING: Duplicate symbol: PL_patchlevel I know these are only warnings but is there something that's not quite right when you see all of those? >LD_RUN_PATH="" ld -bhalt:4 -bM:SRE >-bI:/usr/local/perl5.8.0/lib/5.8.0/aix/CORE/perl.exp -bE:Base64.exp >-bnoentry -lc -L/usr/local/lib Base64.o -o >.../../../blib/arch/auto/APR/Base64/Base64.so >ld: 0711-317 ERROR: Undefined symbol: .apr_base64_encode_len >ld: 0711-317 ERROR: Undefined symbol: .apr_base64_decode_len >ld: 0711-317 ERROR: Undefined symbol: .apr_base64_decode_binary >ld: 0711-317 ERROR: Undefined symbol: .apr_base64_encode_binary >ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more >information. Thanks! Todd O'Dell
Re: Spell Checkers and EMail
Also have a look as 'aspell', which I found to have a more extensive dictionary and thus suggestions for words. I also discovered that sending stdin to it from a perl script can be quite slow (e.g. an email that has several replies), however there's a perl module interface that I also discovered on CPAN -- haven't implemented it yet, too busy. http://savannah.gnu.org/download/ aspell can be substituted for ispell (same call options), so you might as well evaluate them both. -doug On Thursday 06 March 2003 06:08 am, Christian Hauser wrote: > Hello Philip > > > I just digged my way through Ispell a great spell checking module > with libraries for many languages: > http://fmg-www.cs.ucla.edu/geoff/ispell.html > > See the my latest contribution on this topic in the Mason thread: > http://marc.theaimsgroup.com/?l=mason&m=104657497230694&w=2 > > I used it to spell check text before saving it. Offering a spell > interface incl. suggestion and personal dictionary. > > > Regards Christian > > > == beginn original == > Date: Donnerstag, 6. März 2003, 04:21:07 > Subject: Spell Checkers and EMail > > We send a good deal of templated based E-Mail with the option to edit right > before sending. The editing is done via webpage running under > mod_perl/Apache or PerlEx/IIS with Oracle and MSSQL backends respectively. > > Anyone know of any good modules to add a "spellchecker" ability to this > edit screen or possibly the one on the next page (submit button) ? > > Thanks for the advice.
Re: [mp2] integration with apache threads
Pavel Hlavnicka wrote: Is it possible, that some new interpreter is cloned later then the pool is created "PerlInterpMax If all running interpreters are in use, mod_perl will clone new interpreters to handle the request, up until this number of interpreters is reached. when PerlInterpMax is reached, mod_perl will block (via COND_WAIT()) until one becomes available (signaled via COND_SIGNAL())." From http://perl.apache.org/docs/2.0/user/config/config.html#Threads_Mode_Specific_Directives and is it possible, that ANY interpreter cloning will clone my global data? (I really mean e.g object stored in my handler in global variables, perhaps just lexical ones) All of your data is always cloned, just as it was when apache forked in mod_perl 1.x. Remember, Perl threads share nothing unless you tell them to. Is there something specific that you're worried about? - Perrin
Re: [mp2] integration with apache threads
Oops, I overlooked the forst reading. Sorry for this. Anyway, even after reading this, I'm not really sure, what may happen. Is it possible, that some new interpreter is cloned later then the pool is created, and is it possible, that ANY interpreter cloning will clone my global data? (I really mean e.g object stored in my handler in global variables, perhaps just lexical ones) Thank you very much Pavel Perrin Harkins wrote: Pavel Hlavnicka wrote: Is there some relation between Perl threads and Apache threads? What I mean: If Apache fires a new thread, what happens in mod_perl? Are perl structures copied from the parent thread interpreter to the new one? ... or is the new perl environment clean? Have you read this? http://perl.apache.org/docs/2.0/user/intro/overview.html#Threads_Support I believe this addresses your questions. For the details of how Perl threads work, read this: http://perldoc.com/perl5.8.0/pod/perlthrtut.html - Perrin -- Pavel Hlavnicka Ginger Alliance www.gingerall.com
Re: [mp2] integration with apache threads
Pavel Hlavnicka wrote: Is there some relation between Perl threads and Apache threads? What I mean: If Apache fires a new thread, what happens in mod_perl? Are perl structures copied from the parent thread interpreter to the new one? ... or is the new perl environment clean? Have you read this? http://perl.apache.org/docs/2.0/user/intro/overview.html#Threads_Support I believe this addresses your questions. For the details of how Perl threads work, read this: http://perldoc.com/perl5.8.0/pod/perlthrtut.html - Perrin
Re: Tracing double accesshandler invocation
On Thu, 6 Mar 2003, Stas Bekman wrote: > Nick Tonkin wrote: > > On Wed, 5 Mar 2003, Richard Clarke wrote: > > > > > >>Hi, > >>I'm trying to figure out why my accesshandler is getting triggered twice > >>for each request that I make. I'm 100% sure that I'm doing no explicit > >>lookups/redirects anywhere in my code. The particular uri I am fetching > >>should only invocate an accesshandler followed by a contenthandler. > >>After watching the request with MOD_PERL_TRACE=h and MOD_PERL_TRACE=all I > >>think I'm still non the wiser. > >>Testing for $r->is_initial_req solves the "problem" but I'm more interested > >>in finding out exactly why it's being called twice. > >>Any tips for tracing this easier? > > > > > > Nope, but FWIW I see the same behavior. I'm using mp2, but IIRC the same > > thing used to happen on mp1 too. > > > > I too would very much like to figure this out. I sort of suspect it is in > > how the httpd.conf auth* directives are specified, but I've never had the > > time to really muck around with them. > > If you provide me a simple mp2 setup where this happens, I can debug it. > However if I run with mp2: > > t/TEST -v hooks/access > > and log from TestHooks/access.pm every time an access handler is called, I can > see it called only once per request. So may be play with this test's config > until you break it. if you succeed to break it, that would be the easiest for > me to reproduce your problem. This is on my list of things to do. - nick -- Nick Tonkin {|8^)>
[mp2] integration with apache threads
Hello all, currently I'm working over XML::Sablotron module, bringing it alive in the multithreaded environment. I searched both of Apache and mod_perl documentation, but there is one issue, I do not understand. Is there some relation between Perl threads and Apache threads? What I mean: If Apache fires a new thread, what happens in mod_perl? Are perl structures copied from the parent thread interpreter to the new one? ... or is the new perl environment clean? Thanks in advance Pavel -- Pavel Hlavnicka Ginger Alliance www.gingerall.com
Re: Spell Checkers and EMail
Hello Philip I just digged my way through Ispell a great spell checking module with libraries for many languages: http://fmg-www.cs.ucla.edu/geoff/ispell.html See the my latest contribution on this topic in the Mason thread: http://marc.theaimsgroup.com/?l=mason&m=104657497230694&w=2 I used it to spell check text before saving it. Offering a spell interface incl. suggestion and personal dictionary. Regards Christian == beginn original == Date: Donnerstag, 6. März 2003, 04:21:07 Subject: Spell Checkers and EMail We send a good deal of templated based E-Mail with the option to edit right before sending. The editing is done via webpage running under mod_perl/Apache or PerlEx/IIS with Oracle and MSSQL backends respectively. Anyone know of any good modules to add a "spellchecker" ability to this edit screen or possibly the one on the next page (submit button) ? Thanks for the advice. -- END -- Philip M. Gollucci [EMAIL PROTECTED] 301.474.9294 301.646.3011 (cell) Science, Discovery, & the Universe (UMCP) Webmaster & Webship Teacher URL: http://www.sdu.umd.edu eJournalPress Database/PERL Programmer & System Admin URL : http://www.ejournalpress.com Resume : http://p6m7g8.net/Resume === end original
Re: [mp2] CGI redirects incorrectly handled?
Stas Bekman wrote: Can you send a short script (removing all the irrelevant bits) that we can reproduce the problem with? Made a script that generated the same POST request and same redirect as the problem code. The problem was not reproduced! The only difference I can see between working POSTs (both those in my package code and the one in the test script) and the failing one (a particular one in my package) is in the distribution of the data across the TCP packets that carry the POST. Packet 1 always has the POST request and a set of headers. When it works (a 302 is sent), Packet 2 has the Content-Type header, Packet 3 has the Content-Length header, and Packet 4 has the POSTed variables: PACKET 2: 0x 4500 0065 f659 4000 4006 4993 9084 ecce[EMAIL PROTECTED]@.I. 0x0010 9084 ecce 9ea1 0050 482e 99c3 4828 27ae...PH...H('. 0x0020 8018 7fff cd14 0101 080a 00a9 6185..a. 0x0030 00a9 6185 436f 6e74 656e 742d 5479 7065..a.Content-Type 0x0040 3a20 6170 706c 6963 6174 696f 6e2f 782d:.application/x- 0x0050 772d 666f 726d 2d75 726c 656e 636fwww-form-urlenco 0x0060 6465 640d 0a ded.. PACKET 3: 0x 4500 004b f65a 4000 4006 49ac 9084 ecce[EMAIL PROTECTED]@.I. 0x0010 9084 ecce 9ea1 0050 482e 99f4 4828 27ae...PH...H('. 0x0020 8018 7fff d88d 0101 080a 00a9 6185..a. 0x0030 00a9 6185 436f 6e74 656e 742d 4c65 6e67..a.Content-Leng 0x0040 7468 3a20 3334 320d 0a0d 0ath:.342 PACKET 4: 0x 4500 018a f65b 4000 4006 486c 9084 ecce[EMAIL PROTECTED]@.Hl 0x0010 9084 ecce 9ea1 0050 482e 9a0b 4828 27ae...PH...H('. 0x0020 8018 7fff 945c 0101 080a 00a9 6185.\a. 0x0030 00a9 6185 5f70 6173 735f 6964 3d75 7365..a._pass_id=use 0x0040 7233 2534 306d 616b 6574 6865 6361 7365r3%40makethecase 0x0050 2e6e 6574 265f 7061 7373 5f70 6173 733d.net&_pass_pass= [rest of packet cut] But when it fails (a 200 with a 302 link is sent), all is in the one packet: 0x 4500 01af 1d11 4000 4006 2192 9084 ecce[EMAIL PROTECTED]@.!. 0x0010 9084 ecce 9faf 0050 f769 cb03 f764 9ec7...P.i...d.. 0x0020 8018 bb9e fe65 0101 080a 00ad a4b7.e.. 0x0030 00ad a4b7 436f 6e74 656e 742d 5479 7065Content-Type 0x0040 3a20 6170 706c 6963 6174 696f 6e2f 782d:.application/x- 0x0050 772d 666f 726d 2d75 726c 656e 636fwww-form-urlenco 0x0060 6465 640d 0a43 6f6e 7465 6e74 2d4c 656eded..Content-Len 0x0070 6774 683a 2033 3037 0d0a 0d0a 5f70 6173gth:.307_pas 0x0080 735f 6964 3d75 7365 7233 2534 306d 616bs_id=user3%40mak 0x0090 6574 6865 6361 7365 2e6e 6574 265f 7061ethecase.net&_pa 0x00a0 7373 5f70 6173 733dss_pass= [rest of packet cut] Could mod_perl, with its persistent buffer, be tripping up on this? I'm trying now to trace the data through the mp2 code. -- Mark
Re: Apache showing Perl code
It seams to be your configuration problem on your apache. Make sure this on your httpd.conf: Options FollowSymLinks +ExecCGI AddHandler cgi-script cgi pl AllowOverride None Willy "Edwin D. Vinas" <[EMAIL PROTECTED]To: "B.J. Faught" <[EMAIL PROTECTED]>, .gov.ph> <[EMAIL PROTECTED]> cc: 03/06/2003 05:09 Subject: Re: Apache showing Perl code AM Hi, Usually, a perl script when not set to "chmod +x" or as executable file will just be treated as an ordinary text file. This may be the reason why you get the text file instead of executing the commands inside the file. Please make sure you: "chmod +x your_script.pl" Then try to execute first using the command line. If it doesn't work in the command line, it won't surely work in the web browser. best regards, --edwin - If Americans have atomic bombs & the Internet... Filipinos are very far behind to catch up in any field. -Edwin D. Viñas [EMAIL PROTECTED] http://www.geocities.com/edwin_vinas Science Research Specialist I PREGINET Project Advanced Science and Technology Institute UP Technopark Complex, CP Garcia Ave, Diliman, Quezon City Philippines - This communication is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient, please note that any review, retransmission, dissemination, copying or other use of, or taking of any action in reliance upon, this information by you or by persons or entities other than the intended recipient is prohibited. - Original Message - From: "B.J. Faught" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 5:40 PM Subject: Apache showing Perl code > I just installed Apache and mod_perl, but for some reason when I execute > scripts through my Apache server it shows all of the Perl code: > > #!C:/Perl/bin/Perl.exe > print "Content-type: text/html\n\n"; > > foreach $var (sort(keys(%ENV))) { > $val = $ENV{$var}; > $val =~ s|\n|\\n|g; > $val =~ s|"|\\"|g; > print "${var}=\"${val}\"\n"; > } > > I got the path found on the first line from an example Perl script > (printenv.pl) that came with the latest version of the Apache server. > > Could anybody give me a hand with a suggestion or two? > >
RE: [ANNOUNCE] Apache Hello World Benchmarks v1.02
> From: Gerald Richter [mailto:[EMAIL PROTECTED] > > Yes, Embperl per default caches a "compiled" version of the > stylsheet in > memory. > > Gerald > > P.S. There are also options to cache the result of the xslt > transformation > or any itermediate steps > Oh - A way of making it even faster in the benchmarks? Greg
Re: Apache showing Perl code
Hello B. I just reread your question it is MP2. For ModPerl2 there is another answer in the FAQ: Apache::Registry, Apache::PerlRun and Friends Apache::Registry, Apache::PerlRun and other modules from the registry family now live in the ModPerl:: namespace to avoid collisions with the versions from 1.0. To run the Apache::Registry module from mod_perl 1.0 you have to load Apache::compat at the startup: file:startup.pl: use Apache2; # if you have 1.0 and 2.0 installed use Apache::compat (); use lib ...; # to find 1.0x Apache::Registry then in httpd.conf: Alias /perl /path/to/perl/scripts Options +ExecCGI SetHandler perl-script PerlResponseHandler Apache::Registry Notice that Apache::compat has to be loaded before CGI.pm if the latter module is used. META: complete META: document that for now ModPerl::Registry doesn't chdir() into the script's dir like Apache::Registry does, because chdir() affects the whole process under threads. Kind regards, Gerard ter Haar > > From the FAQ: > My CGI/Perl Code Gets Returned as Plain Text Instead of Being Executed by the > Webserver > > Check your configuration files and make sure that the ExecCGI is turned on in your > configurations. > > > SetHandler perl-script > PerlHandler Apache::Registry > Options ExecCGI > allow from all > PerlSendHeader On > > > Kind regards > > > I just installed Apache and mod_perl, but for some reason when I execute > > scripts through my Apache server it shows all of the Perl code: > > > > #!C:/Perl/bin/Perl.exe > > print "Content-type: text/html\n\n"; > > > > foreach $var (sort(keys(%ENV))) { > > $val = $ENV{$var}; > > $val =~ s|\n|\\n|g; > > $val =~ s|"|\\"|g; > > print "${var}=\"${val}\"\n"; > > } > > > > I got the path found on the first line from an example Perl script > > (printenv.pl) that came with the latest version of the Apache server. > > > > Could anybody give me a hand with a suggestion or two? > > > > > >
Re: Apache showing Perl code
Hello B. >From the FAQ: My CGI/Perl Code Gets Returned as Plain Text Instead of Being Executed by the Webserver Check your configuration files and make sure that the ExecCGI is turned on in your configurations. SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI allow from all PerlSendHeader On Kind regards > I just installed Apache and mod_perl, but for some reason when I execute > scripts through my Apache server it shows all of the Perl code: > > #!C:/Perl/bin/Perl.exe > print "Content-type: text/html\n\n"; > > foreach $var (sort(keys(%ENV))) { > $val = $ENV{$var}; > $val =~ s|\n|\\n|g; > $val =~ s|"|\\"|g; > print "${var}=\"${val}\"\n"; > } > > I got the path found on the first line from an example Perl script > (printenv.pl) that came with the latest version of the Apache server. > > Could anybody give me a hand with a suggestion or two? > >
Re: Apache showing Perl code
Hi, Usually, a perl script when not set to "chmod +x" or as executable file will just be treated as an ordinary text file. This may be the reason why you get the text file instead of executing the commands inside the file. Please make sure you: "chmod +x your_script.pl" Then try to execute first using the command line. If it doesn't work in the command line, it won't surely work in the web browser. best regards, --edwin - If Americans have atomic bombs & the Internet... Filipinos are very far behind to catch up in any field. -Edwin D. Viñas [EMAIL PROTECTED] http://www.geocities.com/edwin_vinas Science Research Specialist I PREGINET Project Advanced Science and Technology Institute UP Technopark Complex, CP Garcia Ave, Diliman, Quezon City Philippines - This communication is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient, please note that any review, retransmission, dissemination, copying or other use of, or taking of any action in reliance upon, this information by you or by persons or entities other than the intended recipient is prohibited. - Original Message - From: "B.J. Faught" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 5:40 PM Subject: Apache showing Perl code > I just installed Apache and mod_perl, but for some reason when I execute > scripts through my Apache server it shows all of the Perl code: > > #!C:/Perl/bin/Perl.exe > print "Content-type: text/html\n\n"; > > foreach $var (sort(keys(%ENV))) { > $val = $ENV{$var}; > $val =~ s|\n|\\n|g; > $val =~ s|"|\\"|g; > print "${var}=\"${val}\"\n"; > } > > I got the path found on the first line from an example Perl script > (printenv.pl) that came with the latest version of the Apache server. > > Could anybody give me a hand with a suggestion or two? > >
RE: internal_redirect and returns
Geoff, The reason I was using an internal redirect was that I wanted to maintain the request for the following page. The internal_redirect is being called in several circumstances - From PerlAuthenHandler, PerlAuthzHandler and a PerlHandler for login(). 1) Is there any other way of redirecting to a different page and maintaining the request. 2) Should I seeing what I'm getting ? Cheers Gareth > -Original Message- > From: Geoffrey Young [mailto:[EMAIL PROTECTED] > Sent: 05 March 2003 13:57 > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: internal_redirect and returns > > > [snip] > > I use this subroutine: > > > > sub let_through { > > my ($self, $r, $p) = @_; > > $r->set_handlers( PerlAuthzHandler => [\&OK] ); > > $r->set_handlers( PerlAuthenHandler => [\&OK] ); > > $p && $r->internal_redirect( $p ); > > return OK; > > } > > > > And under some circumstances might call: > > return $self->let_through( $r, $login_page ); > > for instance. > > > > When this happen I find that the page shows ( $login_page > ), but the browser > > continues to show loading. > > I check the error log and find: > > message type 0x50 arrived from server while idle > > IIRC, you can only call internal_redirect from a content > handler. from your > code I suspect that you're not doing that, since it would be > too late to > unset the auth phases. > > HTH > > --Geoff > > >
Apache showing Perl code
I just installed Apache and mod_perl, but for some reason when I execute scripts through my Apache server it shows all of the Perl code: #!C:/Perl/bin/Perl.exe print "Content-type: text/html\n\n"; foreach $var (sort(keys(%ENV))) { $val = $ENV{$var}; $val =~ s|\n|\\n|g; $val =~ s|"|\\"|g; print "${var}=\"${val}\"\n"; } I got the path found on the first line from an example Perl script (printenv.pl) that came with the latest version of the Apache server. Could anybody give me a hand with a suggestion or two?
Re: [ANNOUNCE] Apache Hello World Benchmarks v1.02
> > This differs from Embperl where the application layer itself handles > the XSLT rending, not the script/XML file: > > PerlSetEnv EMBPERL_RECIPE LibXSLT > PerlSetEnv EMBPERL_XSLTPROC libxslt > PerlSetEnv EMBPERL_XSLTSTYLESHEET $ROOT/hello.xsl > > So perhaps Embperl 2 is able to do some things like caching of style > sheets and the like internally that PHP doesn't do for one? > Yes, Embperl per default caches a "compiled" version of the stylsheet in memory. Gerald P.S. There are also options to cache the result of the xslt transformation or any itermediate steps -- Gerald Richter ecos electronic communication services gmbh IT-Securitylösungen * dynamische Webapplikationen * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice: +49 6133 939-122 WWW:http://www.ecos.de/ Fax: +49 6133 939-333 -- | | Besuchen Sie uns auf der CeBIT vom 12. - 19. März 2003 | Messe Hannover * Halle 17 * Stand F 36 | http://www.cebit.de/ | +-
Spell Checkers and EMail
We send a good deal of templated based E-Mail with the option to edit right before sending. The editing is done via webpage running under mod_perl/Apache or PerlEx/IIS with Oracle and MSSQL backends respectively. Anyone know of any good modules to add a "spellchecker" ability to this edit screen or possibly the one on the next page (submit button) ? Thanks for the advice. -- END -- Philip M. Gollucci [EMAIL PROTECTED] 301.474.9294 301.646.3011 (cell) Science, Discovery, & the Universe (UMCP) Webmaster & Webship Teacher URL: http://www.sdu.umd.edu eJournalPress Database/PERL Programmer & System Admin URL : http://www.ejournalpress.com Resume : http://p6m7g8.net/Resume