Re: Accessing configuration information

2002-11-21 Thread dom
 Hi All
 
 I know I can use $r-dir_config() to access parameter values
 set in the config file with PerlSetVar, but is it possible to
 access the value of generic Apache configuration directives?

This is described in the [EagleBook] (worth your money, IMHO),
and this particular chapter is available on-line: 

http://modperl.com:9000/book/chapters/ch8.html

!DOCTYPE biblioentry PUBLIC -//OASIS//DTD DocBook XML V4.1.2//EN
biblioentry
  abbrevEagleBook/abbrev
  titleWriting Apache modules in Perl and C/title
  authorgroup
author
  firstnameLincoln/firstname
  surnameStein/surname
/author
author
  firstnameDoug/firstname
  surnameMacEachern/surname
/author
  /authorgroup
  publishernameO'Reilly/publishername
  isbn1-56592-567-X/isbn
  pagenums724/pagenums
  authorblurb
paraThis is the quoteeagle book/quote, named after the
beast chosen by O'Reilly to decorate the cover of the book
(the cover page outlines are turquoise/light green). There is
a ulink url=http://modperl.com:9000/;companion
website/ulink too. /para
  /authorblurb
/biblioentry


-- 
Dominique QUATRAVAUX   Ingénieur développeur senior
01 44 42 00 35 IDEALX




Re: Apache::DBI seg fault

2002-11-21 Thread Randy Kobes
On Wed, 20 Nov 2002, Beau E. Cox wrote:

 I am using Apache::DBI on my test server - all OK.
 
 When I try to use it on my production server, I get the
 following- stdout:
 Shutting down httpd..done
 Starting httpd [ PERL ]
 Syntax OK
 stderr:
 /etc/init.d/apache: line 206: 18040 Segmentation fault  $HTTPD_BIN
 $INET6 -t -f /etc/httpd/httpd.conf $MODULES /var/log/httpd/rcapache.log
 21
 ..failed
[ .. ] 
 BOTH the test and production servers are using:
 
 Apache/1.3.26 (Linux/SuSE) mod_perl/1.27
 Linux/SuSE 8.1 - both with the latest patches.
 
 I can find nothing in the httpd logs.
 
 I know it must be some difference in my environment between the
 test and production servers, but I am at wits end on how to
 track this problem down. Could someone please push me in
 the right direction?
 
 Aloha = Beau.

Are both servers running the latest versions of DBI and the
relevant DBD::* driver? If not, try upgrading to see if that
helps.

-- 
best regards,
randy kobes




[SOT] Strange browser behavior

2002-11-21 Thread Matthew Pressly
I am using a mod_perl content handler to implement
a series of forms.  The first request from a particular browser 
is always a GET that provides some required parameters in the
URL.  From then on, all parameters are passed as hidden form
variables, and only POSTs should occur.

If the browser accepts cookies, a unique session ID is stored
in a long lived cookie and is also logged in the access log,
strictly for tracking (no session data associated with it).
This is not 100% reliable because not everyone accepts cookies,
but it works enough of the time that I can track most of the
requests by this ID.

99.9% (roughly) of the time, everything works fine and the 
correct sequence is followed:
GET /formseries?a=123b=234
POST /formseries   (a=123, b=234 passed in post vars)
POST /formseries   (a=123, b=234 passed in post vars)
POST /formseries   (a=123, b=234 passed in post vars)
POST /formseries   (a=123, b=234 passed in post vars)
POST /formseries   (a=123, b=234 passed in post vars)

The problem is that there are a few request trails per day,
where the following sequence is followed instead:
GET /formseries?a=123b=234
POST /formseries(a=123, b=234 passed in post vars)
POST /formseries(a=123, b=234 passed in post vars)
POST /formseries(a=123, b=234 passed in post vars)
GET /formseries (required parameters not passed on this request)

The GET fails because the handler does not have the required
parameters it needs to pull info from the database.

An incomplete of user agents that the problem occurs with are:
  Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
  Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
  Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)

One other piece of evidence is that the Referer is empty
on the erroneous GET request.

I have tried but been unable to reproduce the failing
request sequence using IE, even using back, forward, and reload
button in a number of sequences.

My questions are, is there some IE anomaly or some anomalous way
of configuring or using IE that can cause it to all of a sudden
do a GET instead of a POST (anything short of manually entering
the url)?  Could a proxy be causing the problem (a small subset
of the failing requests to seem to be coming through proxies)?
  
Also, is there anything more I could track that would give
more insight into the problem?  Currently the content handler
does detect that the required parms are missing and then dumps
the complete request and timestamp into the error log.

Also, please let me know if there is a more appropriate forum
to ask this question.

--
Matthew Pressly






RE: [SOT] Strange browser behavior

2002-11-21 Thread Nick Challoner
 My questions are, is there some IE anomaly or some anomalous way
 of configuring or using IE that can cause it to all of a sudden
 do a GET instead of a POST (anything short of manually entering
 the url)?

User bookmarking the page (well, adding to favourites considering we're
talking about IE) and then returning to it via the bookmark?

...Nick.

-- 
Nick Challoner
[EMAIL PROTECTED]



libperl.so: undefined symbol: PL_dowarn

2002-11-21 Thread Dennis
Hi,

I have compiled mod_perl en installed it without any errors but wen i try to
start Apache witch mod_perl then i get the following error:

Starting Apache 1.3.27:
Syntax error on line 274 of /opt/apache-1.3.27/conf/httpd.conf:
Cannot load /opt/apache/libexec/libperl.so into server:
/opt/apache/libexec/libperl.so: undefined symbol: PL_dowarn
/opt/apache/bin/apachectl startssl: httpd could not be started

I use Apache 1.3.27 from source on a Debian 3 box, with the standard perl
(5.6.1-7) that came with debian.

Here is the output from perl Makefile.PL :


packages:/opt/pkgs/src/mod_perl-1.27# perl Makefile.PL USE_APXS=1
WITH_APXS=/opt/apache/bin/apxs  EVERYTHING=1
Will configure via APXS (apxs=/opt/zx/apache/bin/apxs)
PerlDispatchHandler.enabled
PerlChildInitHandlerenabled
PerlChildExitHandlerenabled
PerlPostReadRequestHandler..enabled
PerlTransHandlerenabled
PerlHeaderParserHandler.enabled
PerlAccessHandler...enabled
PerlAuthenHandler...enabled
PerlAuthzHandlerenabled
PerlTypeHandler.enabled
PerlFixupHandlerenabled
PerlHandler.enabled
PerlLogHandler..enabled
PerlInitHandler.enabled
PerlCleanupHandler..enabled
PerlRestartHandler..enabled
PerlStackedHandlers.enabled
PerlMethodHandlers..enabled
PerlDirectiveHandlers...enabled
PerlTableApienabled
PerlLogApi..enabled
PerlUriApi..enabled
PerlUtilApi.enabled
PerlFileApi.enabled
PerlConnectionApi...enabled
PerlServerApi...enabled
PerlSectionsenabled
PerlSSI.enabled
Will run tests as User: 'nobody' Group: 'root'
Configuring mod_perl for building via APXS
 + Creating a local mod_perl source tree
 + Setting up mod_perl build environment (Makefile)
 + id: mod_perl/1.27
 + id: Perl/v5.6.1 (linux) [perl]
Note (probably harmless): No library found for -lperl
Now please type 'make' to build libperl.so
Checking CGI.pm VERSION..ok
Checking for LWP::UserAgent..ok
Checking for HTML::HeadParserok
Checking if your kit is complete...
Looks good
Writing Makefile for Apache
Writing Makefile for Apache::Connection
Writing Makefile for Apache::Constants
Writing Makefile for Apache::File
Writing Makefile for Apache::Leak
Writing Makefile for Apache::Log
Writing Makefile for Apache::ModuleConfig
Writing Makefile for Apache::PerlRunXS
Writing Makefile for Apache::Server
Writing Makefile for Apache::Symbol
Writing Makefile for Apache::Table
Writing Makefile for Apache::URI
Writing Makefile for Apache::Util
Writing Makefile for mod_perl
packages:/opt/pkgs/src/mod_perl-1.27#

What is the problem that i get this error libperl.so: undefined symbol:
PL_dowarn?

Dennis,




Re: [SOT] Strange browser behavior

2002-11-21 Thread Perrin Harkins
Nick Challoner wrote:


My questions are, is there some IE anomaly or some anomalous way
of configuring or using IE that can cause it to all of a sudden
do a GET instead of a POST (anything short of manually entering
the url)?


User bookmarking the page (well, adding to favourites considering we're
talking about IE) and then returning to it via the bookmark?



It may also no longer send POST data or give the option of no longer 
sending it if you go back to a page resulting from a POST after a 
certain amount of time.

- Perrin




RE: Apache::DBI seg fault

2002-11-21 Thread Beau E. Cox
Randy -

Thank you, I owe you lunch.

I thought I checked all relevant module versions, but your
msg spurred me to check again: DBI 1.28 was on production while
DBI 1.30 was on test! 1.30 WORKS! 1.28 DOESN'T WORK.

All is well - I am one happy camper ;)

Aloha = Beau.

-Original Message-
From: Randy Kobes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 4:57 AM
To: Beau E. Cox
Cc: Modperl
Subject: Re: Apache::DBI seg fault


On Wed, 20 Nov 2002, Beau E. Cox wrote:

 I am using Apache::DBI on my test server - all OK.
 
 When I try to use it on my production server, I get the
 following- stdout:
 Shutting down httpd..done
 Starting httpd [ PERL ]
 Syntax OK
 stderr:
 /etc/init.d/apache: line 206: 18040 Segmentation fault  $HTTPD_BIN
 $INET6 -t -f /etc/httpd/httpd.conf $MODULES /var/log/httpd/rcapache.log
 21
 ..failed
[ .. ] 
 BOTH the test and production servers are using:
 
 Apache/1.3.26 (Linux/SuSE) mod_perl/1.27
 Linux/SuSE 8.1 - both with the latest patches.
 
 I can find nothing in the httpd logs.
 
 I know it must be some difference in my environment between the
 test and production servers, but I am at wits end on how to
 track this problem down. Could someone please push me in
 the right direction?
 
 Aloha = Beau.

Are both servers running the latest versions of DBI and the
relevant DBD::* driver? If not, try upgrading to see if that
helps.

-- 
best regards,
randy kobes






Newbie: Why does my script prompt to be downloaded intermittantly?

2002-11-21 Thread Trevor Joerges [SendMIME Software]
I'm running mod_perl v1.0 with Apache v 1.3.27 on Solaris 2.6.

I cannot figure out why my scripts occasionally prompt to be downloaded. The
behavior is intermittent. I've read the mod_perl pitfalls and the
PerlSendHeader is set to on in my config file. Is there something else I
need to add or remove?

I'm not sure what other config information I should be sending with my post.
My first time using the list.

Thanks in advance.
Trevor Joerges





Re: References for modperl usage in financial institutions?

2002-11-21 Thread Per Einar Ellefsen
At 21:54 20.11.2002, Marcin Kasperski wrote:

Thanks for all the people who sent me the references (both here and to
private email).

Maybe it would be good idea to add some such references to the 'sites
running modperl' page. My business client after taking a look at
http://perl.apache.org/outstanding/sites.html said 'nice, but there
are mostly technical sites, almost no business...'


Anyone who has success stories about sites running mod_perl can send them 
to the docs-dev list ( http://perl.apache.org/maillist/docs-dev.html ) or 
to one of the maintainers.

I would also rename 'Technologies Extraordinare' link to something
like 'Who is using modperl' but that is different story...


Any suggestions can be made to docs-dev.


--
Per Einar Ellefsen
[EMAIL PROTECTED]





RE: Newbie: Why does my script prompt to be downloaded intermittantly?

2002-11-21 Thread Gareth Kirwan
Trevor - is there anything that might be sending output to the I/O handle
before the header ?

That could disrupt the type

Gareth

-Original Message-
From: Trevor Joerges [SendMIME Software] [mailto:[EMAIL PROTECTED]]
Sent: 21 November 2002 17:16
To: [EMAIL PROTECTED]
Subject: Newbie: Why does my script prompt to be downloaded
intermittantly?


I'm running mod_perl v1.0 with Apache v 1.3.27 on Solaris 2.6.

I cannot figure out why my scripts occasionally prompt to be downloaded. The
behavior is intermittent. I've read the mod_perl pitfalls and the
PerlSendHeader is set to on in my config file. Is there something else I
need to add or remove?

I'm not sure what other config information I should be sending with my post.
My first time using the list.

Thanks in advance.
Trevor Joerges






make test failed when installing mod_perl 2.0 on Linux

2002-11-21 Thread Dawn Sun



Hi

I am new to linux and mod_perl. Weare 
runningperl 5.8.0 and apache 2.0.43 on linux.First time we are 
tryingtoinstall mod_perl2.But the "make test"failed 
completed. Here is the error_log reads:

END in modperl_extra.pl, pid=19385[Thu Nov 21 
11:24:45 2002] [notice] Apache/2.0.43 (Unix) mod_perl/1.99_07-dev 
Perl/v5.8.0configured -- resuming normal operations[Thu Nov 21 11:24:45 
2002] [info] Server built: Nov 20 2002 15:10:20[Thu Nov 21 11:24:45 2002] 
[debug] prefork.c(1039): AcceptMutex: sysvsem (default: sysvsem)[Thu Nov 21 
11:24:46 2002] [error] Can't locate TestHooks/init/first.pm in @INC 
(@INC contains: /home/dsun/mod_perl-1.99_07/t 
/home/dsun/mod_perl-1.99_07/blib/lib/Apache2 
/home/dsun/mod_perl-1.99_07/blib/arch/Apache2 
/home/dsun/mod_perl-1.99_07/Apache-Test/lib /home/dsun/mod_perl-1.99_07/lib 
/home/dsun/mod_perl-1.99_07/blib/lib /home/dsun/mod_perl-1.99_07/blib/arch 
/home/dsun/mod_perl-1.99_07/t/response /home/dsun/mod_perl-1.99_07/t/protocol 
/home/dsun/mod_perl-1.99_07/t/hooks /home/dsun/mod_perl-1.99_07/t/filter 
/home/dsun/mod_perl-1.99_07/t/htdocs/testdirective/perlmodule-vh 
/home/dsun/mod_perl-1.99_07/t/htdocs/testdirective/main 
/usr/local/lib/perl5/5.8.0/i586-linux /usr/local/lib/perl5/5.8.0 
/usr/local/lib/perl5/site_perl/5.8.0/i586-linux 
/usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl/5.6.1 
/usr/local/lib/perl5/site_perl) at (eval 23) line 3.

[Thu Nov 21 11:24:46 2002] [error] failed to 
resolve handler `TestHooks::init::first'[Thu Nov 21 11:24:46 2002] [error] 
[client 127.0.0.1] Can't locate TestHooks/init/first.pmin @INC (@INC 
contains: /home/dsun/mod_perl-1.99_07/t 
/home/dsun/mod_perl-1.99_07/blib/lib/Apache2 /home/dsun/mod_perl-
.

[Thu Nov 21 11:26:32 2002] [error] failed to 
resolve handler `TestHooks::init::first'[Thu Nov 21 11:26:34 2002] [error] 
failed to resolve handler `TestHooks::init::first'
[Thu Nov 21 11:27:27 2002] [error] Can't locate 
TestProtocol/echo.pm in @INC (@INC contains: /home/dsun/mod_perl-1.99_07/t 
/home/dsun/mod_perl-1.99_07/blib/lib/Apache2 
/home/dsun/mod_perl-1.99_07/blib/arch/Apache2 
/home/dsun/mod_perl-1.99_07/Apache-Test/lib /home/dsun/mod_perl-1.99_07/lib 
/home/dsun/mod_perl-1.99_07/blib/lib /home/dsun/mod_perl-1.99_07/blib/arch 
/home/dsun/mod_perl-1.99_07/t/response /home/dsun/mod_perl-1.99_07/t/protocol 
/home/dsun/mod_perl-1.99_07/t/hooks /home/dsun/mod_perl-1.99_07/t/filter 
/home/dsun/mod_perl-1.99_07/t/htdocs/testdirective/perlmodule-vh 
/home/dsun/mod_perl-1.99_07/t/htdocs/testdirective/main 
/usr/local/lib/perl5/5.8.0/i586-linux /usr/local/lib/perl5/5.8.0 
/usr/local/lib/perl5/site_perl/5.8.0/i586-linux 
/usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl/5.6.1 
/usr/local/lib/perl5/site_perl) at (eval 25) line 3.

[Thu Nov 21 11:27:27 2002] [error] failed to 
resolve handler `TestProtocol::echo'[Thu Nov 21 11:27:27 2002] [error] Can't 
locate TestProtocol/echo.pm in @INC (@INC contains: 
/home/dsun/mod_perl-


[Thu Nov 21 11:27:29 2002] [error] Can't locate 
TestProtocol/echo_filter.pm in @INC (@INC

[Thu Nov 21 11:27:29 2002] [error] failed to 
resolve handler `TestProtocol::echo_filter'[Thu Nov 21 11:27:29 2002] 
[error] Can't locate TestProtocol/echo_filter.pm in @INC (@INC
.
[Thu Nov 21 11:27:29 2002] [info] removed PID file 
/home/dsun/mod_perl-1.99_07/t/logs/httpd.pid (pid=19387)[Thu Nov 21 11:27:29 
2002] [notice] caught SIGTERM, shutting downEND in modperl_extra.pl, 
pid=19387


I've checked the actual module in @INC. It does 
exist. Then I'vesearched throu the mod_perl archive, and made the change 
as http://www.mail-archive.com/modperl@apache.org/msg29648.htmlsuggested. 
But "make test" failed again. This time, the error changed from the "Can't 
locate TestHooks/init/first.pm in @INC... " to "Can't locate TestHooks/trans.pm 
in @INC...". Other errors remain the same.

Any suggestions?

Dawn


Re: Newbie: Why does my script prompt to be downloaded intermittantly?

2002-11-21 Thread Rafiq Ismail (ADMIN)
On Thu, 21 Nov 2002, Trevor Joerges [SendMIME Software] wrote:
 behavior is intermittent. I've read the mod_perl pitfalls and the
 PerlSendHeader is set to on in my config file. Is there something else I
 need to add or remove?
Hi Treveor,

I've seen three fixes to this sort of problem in the past, so you might
want to see if any of the following apply to your case:

1) Changing Browser - Galeon had me testing for days, when I could
clearly see that I was getting the correct header, via telnet to the port.
See below.

2) Turning PerlSendHeader Off and sending your own headers.
The problem was probably somewhere else, but sending my own
headers fixed it.  Then again, the problem might not have been elsewhere.

3) Make sure you're not sending your header twice.  With
PerlSendHeader being on or off, plus a code segment sending a header/or
some gibber elsewhere, or even a stray 'print' to STDOUT from some other
place, before the header is dispatched.

I've had header trouble a couple of time and have often found telneting to
the vhost to be a very handy detector of what might be going wrong.  If
that fails then paracetamol is usually a good cure.

My late night 0.02 EU.

R.





Re: [SOT] Strange browser behavior

2002-11-21 Thread Matthew Pressly
On Thu, Nov 21, 2002 at 02:32:41PM -0500, Perrin Harkins wrote:
 Nick Challoner wrote:
 
 My questions are, is there some IE anomaly or some anomalous way
 of configuring or using IE that can cause it to all of a sudden
 do a GET instead of a POST (anything short of manually entering
 the url)?
 
 
 User bookmarking the page (well, adding to favourites considering we're
 talking about IE) and then returning to it via the bookmark?
 
 
 It may also no longer send POST data or give the option of no longer 
 sending it if you go back to a page resulting from a POST after a 
 certain amount of time.
 
 - Perrin

In looking at these replies and going back through the logs 
more, I think there are multiple failure mechanisms rather than
a single one.  Both the cases above may be ocurring to some degree.
A segment looks like it may also be caused by proxies.  Browser
caching may also be causing some of it, and there may be other
causes as well.  Setting $r-no_cache(1) did not solve the problem,
though there is a chance it may have alleviated it somewhat..

Since there is a session id generated for browsers that have
cookies enabled, I'm planning to stow away the parameters 
in either the database or File::Cache on the first GET
request when parameters are available, then fall back to
looking there on subsequent requests if and only if the
parameters are missing (not in query string and not in POST
data).  This should fix most of the currently
failing cases without much more code.

Thank you all for your help.

--
Matthew Pressly





Re: problems with characters being added to a request.

2002-11-21 Thread Brian Hirt
Okay, I've been able to create a simple testcase that reproduces the
problem I'm having.  Hopefully some perl/mod_perl guru out there will be
able to tell me what the deal is.   The program basically print out
three strings, concatinates a few strings and print them out too.  I've
attached two files, the handler, and the output of a page it created.

Any help would really be appreciated. 


On Wed, 2002-11-20 at 21:53, Brian Hirt wrote:
 I'm running into a problem with some characters being added during a
 mod_perl request.  An  charater is getting added when i print the
 document  STDOUT.  When i print that exact same variable to STDERR the Â
 is not added.  Here are two hex dumps (via od -hc).  The first is what
 is sent to the web browser, and the 2nd is what is sent to stderr.  The
 issue is coming in with the hex92 and hex96 characters.
 
 This sounds like some encoding issue UTF8/ISO-8859-1??  I can't make
 heads or tails of it.  Any ideas?
 
 Here is a dump (od -hc) of the document that is getting sent to the web
 browser:
 
 0002740 6967 3d6e 3e32 6863 7261 6361 6574 c272
   g   i   n   =   2  c   h   a   r   a   c   t   e   r   Â
 0002760 7392 7720 7469 2068 96c2 6520 6576 686e
 222   s   w   i   t   h   Â 226   e   v   e   n   h
 
 And here is a partial dump of the exact same variable being sent to
 STDERR:
 0002520 3130 302c 640a 636f 3343 635b 6168 6172
   0   1   ,   0  \n   d   o   c   C   3   [   c   h   a   r   a
 0002540 7463 7265 7392 7720 7469 2068 2096 7665
   c   t   e   r 222   s   w   i   t   h 226   e   v
 
 
 Notice that when the variable is sent to STDOUT, r   Â   222 is
 getting printed, and when the variable is sent to STDERR  r 222  is
 getting sent.  I get the added character with IE, Netscape, telnet
 localhost 80 and wget.  So i don't think it with the browser.
 
 
 And here are the exact two lines in my handler that are printing this
 variable:
 
   print STDERR docC3[$docContents]\n;
   print $docContents;
 
 
 I'm using perl 5.8.0, Apache/1.3.26 and mod_perl/1.27
-- 
Brian Hirt [EMAIL PROTECTED]

package WierdHandler;

use MIME::Base64;
use Storable qw(freeze thaw);
use Apache::Constants 'OK';
use strict;

EOF;
Add the handler to your httpd.conf file, and make sure the module is in your search 
path.

Location /wierd
SetHandler perl-script
PerlHandler WierdHandler
/Location
EOF

sub handler
{
  my $apache = shift;
  
  $apache-content_type('text/html; charset=ISO-8859-1');
  $apache-send_http_header;

  print htmlheadtitleblah/title/headbody;

  # notice that the frozen/base64 encoded strings are slightly different.
  my $string1 = 
thaw(decode_base64('BAUEMTIzNAQEBAgXhWh0dHA6Ly93d3cuYW1hem9uLmNvbS9leGVjL29iaWRvcy9yZWRpcmVjdD90YWc9bW9ieWdhbWVzJTI2Y3JlYXRpdmU9RDEySkVYSDg3QjRWTEslMjZjYW1wPTIwMjUlMjZsaW5rX2NvZGU9c3AxJTI2cGF0aD1BU0lOL0IwMDAwMlNVUVY='));
#   ^AgXh^

  my $string2 = 
thaw(decode_base64('BAUEMTIzNAQEBAgKhWh0dHA6Ly93d3cuYW1hem9uLmNvbS9leGVjL29iaWRvcy9yZWRpcmVjdD90YWc9bW9ieWdhbWVzJTI2Y3JlYXRpdmU9RDEySkVYSDg3QjRWTEslMjZjYW1wPTIwMjUlMjZsaW5rX2NvZGU9c3AxJTI2cGF0aD1BU0lOL0IwMDAwMlNVUVY='));
#   ^AgKh^

  my $string3 = characters with  even;

  print h1perl says string 1 and 2 are identical/h1\n if $$string1 eq $$string2;

  print '$string1 is: ul',$$string1,/ul;
  print '$string2 is: ul',$$string2,/ul;
  print '$string3 is: ul',$string3,/ul;
  print hr;

  my $test1 = $string3 . $$string1;
  print '$test1 = $string3 . $string1 is: ul',$test1,/ul;

  my $test2 = $string3 . $$string2;
  print '$test2 = $string3 . $string2 is: ul',$test2,/ul;

  print hrWierd, huh?  If you look in the error log, you'll see that both test1 and 
test2 printed out without that funny looking character.br;

  print /body/html;

  print STDERR test1:[$test1]\n;
  print STDERR test2:[$test2]\n;

  return OK;
}

1;

Title: blah
perl says string 1 and 2 are identical
$string1 is: http://www.amazon.com/exec/obidos/redirect?tag=mobygames%26creative=D12JEXH87B4VLK%26camp=2025%26link_code=sp1%26path=ASIN/B2SUQV$string2 is: http://www.amazon.com/exec/obidos/redirect?tag=mobygames%26creative=D12JEXH87B4VLK%26camp=2025%26link_code=sp1%26path=ASIN/B2SUQV$string3 is: characters with  even$test1 = $string3 . $string1 is: characterÂs with  evenhttp://www.amazon.com/exec/obidos/redirect?tag=mobygames%26creative=D12JEXH87B4VLK%26camp=2025%26link_code=sp1%26path=ASIN/B2SUQV$test2 = $string3 . $string2 is: characters with  evenhttp://www.amazon.com/exec/obidos/redirect?tag=mobygames%26creative=D12JEXH87B4VLK%26camp=2025%26link_code=sp1%26path=ASIN/B2SUQVWierd, huh?  If you look in the error log, you'll see that both test1 and test2 printed out without that funny looking character.

RE: Accessing configuration information

2002-11-21 Thread Grant McLean
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Hi All
  
  I know I can use $r-dir_config() to access parameter values
  set in the config file with PerlSetVar, but is it possible to
  access the value of generic Apache configuration directives?
 
 This is described in the [EagleBook] (worth your money, IMHO),
 and this particular chapter is available on-line: 

Thanks for your reply.  I agree, it is a great book and I 
spent quite some time reading it before asking the question.
Unfortunately, either I have missed something in the book or
you've misunderstood my question.

What I want to do is determine the current setting of the
standard 'DirectoryIndex' parameter used by mod_dir.  This 
is not a simple PerlSetVar and it is not a new directive
I'm creating for my Perl module - both these scenarios are
covered in book.  What I want to know is, for the current
Directory/VirtualHost/Server, what would mod_dir do?

Regards
Grant



Re: am i heading for disaster... ?

2002-11-21 Thread Noam Solomon
I definitely didn't run out of disk space, so it must have been something
else.  There were a number of funky things that happened over the course of
the build.  The first time around, I made mod_perl, then made mod_ssl, and
had an error about util.o being out of sync with mod_ssl, so then I ran the
mod_perl make a second time, without cleaning first.  Maybe the file got
erased in the process.  The next time I ran apache make, I had a linker
error and had to set LD_LIBRARY_PATH explicitly to correct it.  Maybe I
needed to do the same while building mod_perl.

But, knock on wood, the server hasn't choked yet, or behaved weirdly.  Guess
I'll find out when it goes into production...

Thanks

- Original Message -
From: Stas Bekman [EMAIL PROTECTED]
To: Noam Solomon [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 12:39 PM
Subject: Re: am i heading for disaster... ?


 Noam Solomon wrote:
  In the process of building apache_1.3.27 / mod_perl 1.3.27 /
  openssl0.9.6g / mod_ssl mod_ssl-2.8.12-1.3.27 on a Solaris OS 2
  UltraSparc, with Perl 5.8, the apache make failed because of an
  undefined url_delims.  I was using the method where you build mod_ssl,
  then build mod_perl, then configure apache, loading mod_perl statically.
 
  Anyway, I poked around and found that indeed the uri_delims.h file in
  src/main was empty!  So still in src/main, I manually ran gcc
  gen_uri_delims.c, then ran a.out  uri_delims.h to regenerate that
  header file, and got this.
 
 
  /* this file is automatically generated by gen_uri_delims, do not
  edit */
  static const unsigned char uri_delims[256] = {
  T_NUL,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,T_HASH,0,0,0,0,
  0,0,0,0,0,0,0,T_SLASH,0,0,0,0,0,0,0,0,0,0,T_COLON,0,
  0,0,0,T_QUESTION,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  };
 
  Then when I ran make again, everything was hunky-dory.  Now what I want
  to know is, why would this have happened in the first place?  Is it a
  sign that something is fundamentally wrong with the build, but I just
  haven't seen it yet?  Or should I just breathe easy and hope for the
best?

 I doubt this has anything to do with mod_perl. The build hasn't changed
 in years, so it must be some external glitch. For example you might have
 run out of disk space, so when it was writing the file it was zeroed.


 --


 _
 Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
 http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
 mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
 http://singlesheaven.com http://perl.apache.org http://perlmonth.com/







Re: Accessing configuration information

2002-11-21 Thread Geoffrey Young


Grant McLean wrote:

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]


Hi All

I know I can use $r-dir_config() to access parameter values
set in the config file with PerlSetVar, but is it possible to
access the value of generic Apache configuration directives?


This is described in the [EagleBook] (worth your money, IMHO),
and this particular chapter is available on-line: 


Thanks for your reply.  I agree, it is a great book and I 
spent quite some time reading it before asking the question.
Unfortunately, either I have missed something in the book or
you've misunderstood my question.

What I want to do is determine the current setting of the
standard 'DirectoryIndex' parameter used by mod_dir.  This 
is not a simple PerlSetVar and it is not a new directive
I'm creating for my Perl module - both these scenarios are
covered in book.  What I want to know is, for the current
Directory/VirtualHost/Server, what would mod_dir do?

you have very few options here.  one of which is to do

Perl
  $Apache::Server::SaveConfig = 1;
  $DirectoryIndex = 'index.html';
/Perl

then you can access the variable in your script as 
$Apache::ReadConfig::DirectoryIndex

you can also use directive handlers to override the DirectoryIndex 
directive and stash it someplace you know about.  an example of how 
that can be accomplished is here:

http://www.modperlcookbook.org/code/ch14/Cookbook-MIMEMapper-0.01.tar.gz

the last resort is to plug right into mod_dir's private data.  you can 
find an example of that kind of thing here:

http://www.modperlcookbook.org/code/ch08/Cookbook-LanguagePriority-0.01.tar.gz

HTH

--Geoff





Re: mod_Perl script and SSI need advice

2002-11-21 Thread Perrin Harkins
Coexec wrote:


Hi all, I have a question about how to pass form data
with mod_perl and SSI.

I have an HTML page with a mod_perl script included.
The script creates a form and takes its input and then
prints output based on the input (pretty basic).  I
have the form action set to the script
(action=/perl/test.cgi), the problem is that when
the form is submitted, the only thing that gets
printed to the screen is the cgi output.

I could have the mod_perl script process the
information and then generate a new URL and appended a
Query_string and then redirect($url1?$foo=$bar).  I am
sure that there is a better way to do this, I just
don't know what it is.



I'm afraid I don't quite understand your description of the problem.  Is 
it that the SSI is not working, or that the CGI isn't getting the right 
 input, or what?  Can you show us some of the code from the HTML page 
and the CGI script?  How are you running the CGI?  Apache::Registry?

- Perrin



state of the art throttling?

2002-11-21 Thread Justin
What is the state of the art now in apache or modperl
related modules that will throttle based on a combination
of the following metrics:

  * recent bandwidth per IP
  * recent request count per IP
  * max number of parallel requests per IP

I'm using a tweaked version of the Stonehenge utility
and it works ok but a bad robot (and there are SO many
now) can fill all request slots before a long enough
measurement period has elapsed to start denying it
service..  plus the process of denial is not insignificant
because the recent request record has to be opened and
summed for each new request.. ideally the IP or IP+ua
combination should be just bounced out for a defined
period of time to cool off.

Also this mystical throttle module I'm hoping exists
would sit at the front end, along with mod_rewrite,
rather than be installed on multiple back end modperl
servers..

Something that crawled the apache status tree to deny
requests when more than N servers are already engaged
in serving the same IP, would be ideal.. Since I
offload image serving, I think this would not hurt
any legit users.

thanks!
-Justin



Re: Migrating from CGI.pm to Apache::Request question.

2002-11-21 Thread Stas Bekman
Jesse Erlbaum wrote:

Hi Coexec --



I am experienced with using the CGI.pm, and now I want
to rewrite all of my CGI's using mod_perl and
Apache::Request.




Maybe a silly question:  What are you hoping to gain by doing this?


Speed. Apache::Request's guts are implemented in C, CGI.pm is Perl. If 
you do a lot of processing the speed improvement is significant. See:
http://perl.apache.org/docs/1.0/guide/performance.html#Apache__args_vs__Apache__Request__param_vs__CGI__param

_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: make test failed when installing mod_perl 2.0 on Linux

2002-11-21 Thread Stas Bekman
please remember to properly report problems, as explained at:
http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems
(hint: the shortcuts menu on the left side of any page of perl.apache.org)
if you don't provide all the required details it makes it hard to guess 
what configuration you've the problem with.

I had this problem a while ago with the worker mpm over 5.8.0:
http://marc.theaimsgroup.com/?l=apache-modperl-devm=101128927611980w=2
but I think it should be OK now.

 
I am new to linux and mod_perl. We are running perl 5.8.0 and apache 
2.0.43 on linux. First time we are trying to install mod_perl2. But the 
make test failed completed.  Here is the error_log reads:

END in modperl_extra.pl, pid=19385
[Thu Nov 21 11:24:45 2002] [notice] Apache/2.0.43 (Unix) 
mod_perl/1.99_07-dev Perl/v5.8.0
configured -- resuming normal operations
[Thu Nov 21 11:24:45 2002] [info] Server built: Nov 20 2002 15:10:20
[Thu Nov 21 11:24:45 2002] [debug] prefork.c(1039): AcceptMutex: sysvsem 
(default: sysvsem)
[Thu Nov 21 11:24:46 2002] [error] Can't locate TestHooks/init/first.pm 
in @INC (@INC contains: /home/dsun/mod_perl-1.99_07/t 
/home/dsun/mod_perl-1.99_07/blib/lib/Apache2 
/home/dsun/mod_perl-1.99_07/blib/arch/Apache2 
/home/dsun/mod_perl-1.99_07/Apache-Test/lib 
/home/dsun/mod_perl-1.99_07/lib /home/dsun/mod_perl-1.99_07/blib/lib 
/home/dsun/mod_perl-1.99_07/blib/arch 
/home/dsun/mod_perl-1.99_07/t/response 
/home/dsun/mod_perl-1.99_07/t/protocol 
/home/dsun/mod_perl-1.99_07/t/hooks /home/dsun/mod_perl-1.99_07/t/filter 
/home/dsun/mod_perl-1.99_07/t/htdocs/testdirective/perlmodule-vh 
/home/dsun/mod_perl-1.99_07/t/htdocs/testdirective/main 
/usr/local/lib/perl5/5.8.0/i586-linux /usr/local/lib/perl5/5.8.0 
/usr/local/lib/perl5/site_perl/5.8.0/i586-linux 
/usr/local/lib/perl5/site_perl/5.8.0 
/usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl) at 
(eval 23) line 3.
 
[Thu Nov 21 11:24:46 2002] [error] failed to resolve handler 
`TestHooks::init::first'
[Thu Nov 21 11:24:46 2002] [error] [client 127.0.0.1] Can't locate 
TestHooks/init/first.pm
 in @INC (@INC contains: /home/dsun/mod_perl-1.99_07/t 
/home/dsun/mod_perl-1.99_07/blib/lib/Apache2 /home/dsun/mod_perl-
.
 
[Thu Nov 21 11:26:32 2002] [error] failed to resolve handler 
`TestHooks::init::first'
[Thu Nov 21 11:26:34 2002] [error] failed to resolve handler 
`TestHooks::init::first'
[Thu Nov 21 11:27:27 2002] [error] Can't locate TestProtocol/echo.pm in 
@INC (@INC contains: /home/dsun/mod_perl-1.99_07/t 
/home/dsun/mod_perl-1.99_07/blib/lib/Apache2 
/home/dsun/mod_perl-1.99_07/blib/arch/Apache2 
/home/dsun/mod_perl-1.99_07/Apache-Test/lib 
/home/dsun/mod_perl-1.99_07/lib /home/dsun/mod_perl-1.99_07/blib/lib 
/home/dsun/mod_perl-1.99_07/blib/arch 
/home/dsun/mod_perl-1.99_07/t/response 
/home/dsun/mod_perl-1.99_07/t/protocol 
/home/dsun/mod_perl-1.99_07/t/hooks /home/dsun/mod_perl-1.99_07/t/filter 
/home/dsun/mod_perl-1.99_07/t/htdocs/testdirective/perlmodule-vh 
/home/dsun/mod_perl-1.99_07/t/htdocs/testdirective/main 
/usr/local/lib/perl5/5.8.0/i586-linux /usr/local/lib/perl5/5.8.0 
/usr/local/lib/perl5/site_perl/5.8.0/i586-linux 
/usr/local/lib/perl5/site_perl/5.8.0 
/usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl) at 
(eval 25) line 3.
 
[Thu Nov 21 11:27:27 2002] [error] failed to resolve handler 
`TestProtocol::echo'
[Thu Nov 21 11:27:27 2002] [error] Can't locate TestProtocol/echo.pm in 
@INC (@INC contains: /home/dsun/mod_perl-

 
[Thu Nov 21 11:27:29 2002] [error] Can't locate 
TestProtocol/echo_filter.pm in @INC (@INC

 
[Thu Nov 21 11:27:29 2002] [error] failed to resolve handler 
`TestProtocol::echo_filter'
[Thu Nov 21 11:27:29 2002] [error] Can't locate 
TestProtocol/echo_filter.pm in @INC (@INC
.
[Thu Nov 21 11:27:29 2002] [info] removed PID file 
/home/dsun/mod_perl-1.99_07/t/logs/httpd.pid (pid=19387)
[Thu Nov 21 11:27:29 2002] [notice] caught SIGTERM, shutting down
END in modperl_extra.pl, pid=19387
 
 
I've checked the actual module in @INC. It does exist. Then 
I've searched throu the mod_perl archive, and made the change as 
http://www.mail-archive.com/modperl@apache.org/msg29648.html suggested. 
But make test failed again. This time, the error changed from the 
Can't locate TestHooks/init/first.pm in @INC...  to Can't locate 
TestHooks/trans.pm in @INC Other errors remain the same.
 
Any suggestions?
 
Dawn


--


_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





How Can I Install ModPerl on My ISP-based Website???

2002-11-21 Thread David Simcik
I would LOVE to use mod_perl on my personal website -- I have the diskspace
to do so, but the question remains as to whether or not I have the rights.
Can anyone point me to a guide for this? I've poked around the mod_perl site
and didn't find anything too specific.

Thanks!
D. Simcik




Re: state of the art throttling?

2002-11-21 Thread Justin
Well for the purposes of documentation, I'll follow up
to myself.
I was pointed at a netfilter module (rule) available
as a patch, called iplimit, which limits simultaneous
open tcp connections to N from either a single IP or from
a netblock.. this helps a lot..
-Justin

On Thu, Nov 21, 2002 at 05:45:36PM -0500, Justin wrote:
 What is the state of the art now in apache or modperl
 related modules that will throttle based on a combination
 of the following metrics:
 
   * recent bandwidth per IP
   * recent request count per IP
   * max number of parallel requests per IP
 
 I'm using a tweaked version of the Stonehenge utility
 and it works ok but a bad robot (and there are SO many
 now) can fill all request slots before a long enough
 measurement period has elapsed to start denying it
 service..  plus the process of denial is not insignificant
 because the recent request record has to be opened and
 summed for each new request.. ideally the IP or IP+ua
 combination should be just bounced out for a defined
 period of time to cool off.
 
 Also this mystical throttle module I'm hoping exists
 would sit at the front end, along with mod_rewrite,
 rather than be installed on multiple back end modperl
 servers..
 
 Something that crawled the apache status tree to deny
 requests when more than N servers are already engaged
 in serving the same IP, would be ideal.. Since I
 offload image serving, I think this would not hurt
 any legit users.
 
 thanks!
 -Justin




Re: How Can I Install ModPerl on My ISP-based Website???

2002-11-21 Thread Stas Bekman
David Simcik wrote:

I would LOVE to use mod_perl on my personal website -- I have the diskspace
to do so, but the question remains as to whether or not I have the rights.


The rights to do what?


Can anyone point me to a guide for this? I've poked around the mod_perl site
and didn't find anything too specific.


My guess would be:
http://perl.apache.org/docs/general/multiuser/multiuser.html


_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





Re: libperl.so: undefined symbol: PL_dowarn

2002-11-21 Thread Stas Bekman
Dennis wrote:

Hi,

I have compiled mod_perl en installed it without any errors but wen i try to
start Apache witch mod_perl then i get the following error:

Starting Apache 1.3.27:
Syntax error on line 274 of /opt/apache-1.3.27/conf/httpd.conf:
Cannot load /opt/apache/libexec/libperl.so into server:
/opt/apache/libexec/libperl.so: undefined symbol: PL_dowarn
/opt/apache/bin/apachectl startssl: httpd could not be started


As gozer suggest next to me, you might have a stray header file from an 
older perl, which happened to be picked by the build. Any chance you 
have a few installations of perl? Trying install from scratch?


--


_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: Problem with Stream-oriented Output Filter

2002-11-21 Thread Stas Bekman
Esteban Fernandez Stafford wrote:


Hello,

I am currently developing a modperl filter that uses the streaming
approach. I started off with the example in

http://perl.apache.org/docs/2.0/user/handlers/filters.html#Stream_oriented_Output_Filter

  sub handler {
  my $filter = shift;

  my $left_over = '';
  while ($filter-read(my $buffer, BUFF_LEN)) {
  $buffer = $left_over . $buffer;
  $left_over = '';
  while ($buffer =~ /([^\r\n]*)([\r\n]*)/g) {
  $left_over = $1, last unless $2;
  $filter-print(scalar(reverse $1), $2);
  }
  }
  $filter-print(scalar reverse $left_over) if length $left_over;

  Apache::OK;
  }

This seems to work OK when the file is small (smaller than 8192). When
the file is larger, then there is a line that gets cut. This is
because the handler gets called more than once for big requests. Is
there a nice way to overcome this problem?  I was thinking using
filter context to store variable $left_over, but then I dont know how
to detect the real end of the stream.


The problem is that I've written a patch that makes the $filter-print() 
 outside the while() loop work, but it was never committed. So the doc 
is out of sync with the core code. For now please apply this patch:
http://marc.theaimsgroup.com/?l=apache-modperl-devm=102828686110352w=2

I'll see that it gets into the core asap.




--


_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




PATCH: Apache::AuthDBI

2002-11-21 Thread mod_perl_users
I have been having trouble connecting to my user database, according to the logs, 
there was never any password returned.

After browsing through the code, I found the following:
---start code---
undef $passwd if 0 == $sth-rows; # so we can distinguish later on between no password 
and empty password
---start code---

According to the DBI documentation here:
http://search.cpan.org/author/TIMB/DBI-1.30/DBI.pm#rows
---start quote---
So use of the rows method or $DBI::rows with SELECT statements is not recommended.
---end quote---

It seems my particular driver (PgPP) is returning a 0 to $sth-rows, which undefs 
$passwd, even if there was a password returned.

So I cooked up a patch to fix it.  (Attached)

It simply increments a counter while looping through the recordsets and checks that 
counter instead $sth-rows.

My Configuration:
Apache 1.3.26
Apache::AuthDBI 0.88
PostgreSQL 7.2.1
Perl 5.6.1
DBD::PgPP 0.04




--- AuthDBI.pm  Wed Nov 20 06:04:19 2002
+++ old/AuthDBI.pm  Wed Nov 20 05:30:25 2002
@@ -273,10 +273,9 @@
 $dbh-disconnect;
 return SERVER_ERROR;
 }
-   my $password_count = 0;
+
 # fetch result
 while ($_ = $sth-fetchrow_array) {
-   $password_count++;
 # strip trailing blanks for fixed-length data-type
 $_ =~ s/ +$// if $_;
 # consider the case with many users sharing the same userid
@@ -284,7 +283,7 @@
 }
 
 chop  $passwd if $passwd;
-undef $passwd if 0 == $password_count; # so we can distinguish later on 
between no password and empty password
+undef $passwd if 0 == $sth-rows; # so we can distinguish later on between no 
+password and empty password
 
 if ($sth-err) {
 $dbh-disconnect;






Re: How Can I Install ModPerl on My ISP-based Website???

2002-11-21 Thread Aaron Johnson
On Thu, 2002-11-21 at 19:00, David Simcik wrote:
 I would LOVE to use mod_perl on my personal website -- I have the diskspace
 to do so, but the question remains as to whether or not I have the rights.
 Can anyone point me to a guide for this? I've poked around the mod_perl site
 and didn't find anything too specific.
 

http://www.perlmonks.org/index.pl?node_id=145367

 Thanks!
 D. Simcik
 
 
 




Re: mod_Perl script and SSI need advice

2002-11-21 Thread Coexec
 Coexec wrote:
 
  Hi all, I have a question about how to pass form
 data
  with mod_perl and SSI.
 
  I have an HTML page with a mod_perl script
 included.
  The script creates a form and takes its input and
 then
  prints output based on the input (pretty basic). 
 I
  have the form action set to the script
  (action=/perl/test.cgi), the problem is that
 when
  the form is submitted, the only thing that gets
  printed to the screen is the cgi output.
 
  I could have the mod_perl script process the
  information and then generate a new URL and
 appended a
  Query_string and then redirect($url1?$foo=$bar). 
 I am
  sure that there is a better way to do this, I just
  don't know what it is.
 
 
 I'm afraid I don't quite understand your description
 of the problem.  Is 
 it that the SSI is not working, or that the CGI
 isn't getting the right 
   input, or what?  Can you show us some of the code
 from the HTML page 
 and the CGI script?  How are you running the CGI? 
 Apache::Registry?
 
 - Perrin
 

Here is an example of what I mean:
Here is a basic form built with cgi.pm.
Name the script test

print header;
if (param(foo)) {
print start_html,
You Entered: ,em(param(foo)),
}

else {
print start_html,
start_form(-action=/perl/test),
Enter something : ,textfield(foo),
submit,
end_form,
}
print end_html;

Works with no errors under CGI and Apache::Registry
Then I would add the above script as an include in the
following page (demo.shtml):

html
head
titleTest SSI Page/title
/head
body
pThis is a test page/pbr
!--#include virtual=/perl/test --
/body
/html

So the when I access demo.shtml, I see the text from
the HTML page and also the form from the included
scipt.

When I fill out the form and hit submit, the returned
data gets printed to the screen:

You Entered plus whatever you entered in the form.

What I would like to do is fill out the form, submit
it, and end up back to the shtml page with the result
of the script (rather than the form) included in the
shtml.

I understand why this is happening, I am not asking
why, all I am asking is what is the preferred method
of accomplishing this.

Thanks

__
Do you Yahoo!?
Yahoo! Mail Plus – Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com