Secure Apache Server with mod_ssl and openssl

2001-05-23 Thread Emma Wermström (EMW)

Hi!

RedHat Linux 7.1
Apache 1.3.19
Perl 5.005
mod_perl 1.24
embperl 
mod_ssl and openssl (precompiled from RedHat Linux 7.1)

I'm trying to establish an SSL link between browser and apache web server.
Before, I had a web page located in two different directories (bla/bla/htdocs/Intro 
and /bla/bla/htdocs/CIP). The idea is that the first directory should use the 
non-secure server and the second should use the secure server. I only want to use ONE 
ip-adress. I tried setting up the following environment in my httpd.conf file:

  Listen 443
VirtualHost ip-adress:443

DocumentRoot /bla/bla/htdocs/CIP
ServerName localhost
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
Files ~ \.(cgi|shtml)$
SSLOptions +StdEnvVars
/Files
Directory /usr/local/www/data/site.toddle/htdocs/Intro/cgi-bin
SSLOptions +StdEnvVars
/Directory
SetEnvIf User-Agent .*MSIE.* nokeepalive ssl-unclean-shutdown
Error_log /var/log/httpd/ssl_error_log
CustomLog /var/log/httpd/ssl_request_log \
  %t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \%r\ %b

/VirtualHost

I'm also using AuthCookie to provide authentication procedure in order to enter the 
protected directory (/CIP). I specify the login handling procedures for ../CIP in 
the .htaccess file.

I want to be able to access the unprotected documents(http://...) and from them, the 
protected documents(https://) without having to write https explicitly.
But with the above configuration, none of the documents require SSL. 

When I add the following to my conf file before the virtual host, I get an error 
message saying SSL connection required in my error_log and I can't enter the 
protected directory.

Directory /CIP
SSLrequireSSL
/Directory

Is this something I can specify in the browser I'm using? I'm using a self-signed 
certificate along with the generated key.

Does anyone understand my dilemma? the ssl_error_log shows nothing and I can't enter 
https://localhost.
I'd be grateful for any help on this matter. I've tried the RedHat secure web server 
tutorial but I still don't understand how to configure the webserver for the two 
different directories.
Thanks,

Emma





Antwort: Re: Appending Sessionid to all the urls

2001-05-23 Thread Michael . Jacob

Hi kheeteck,

as said before - a session id at the end of the URL (as path info, GET parameter
or POST parameter) will not stay there if you don't modify all displayed html
pages. As I understand, you can't modify these pages because thay are on another
server. That means you also can't use a leading session id. Bad. There is only
one way left to store information on the browser's side: Cookies.

cu
Michael


Datum: 22.05.2001 19:10
An:Michael Jacob/EXT/GAD@GAD
Kopie: [EMAIL PROTECTED]

Betreff:   Re: Appending Sessionid to all the urls
Nachrichtentext:


Hi Michael :

I am really glad that you reply to my mail.. as i have been trying to solve
this problem for quite some time
Hmm , however i think u slightly misunderstand what i mean..

What i mean is...
For eg,

I have a html page which contains a form page let say allowing the user to
enter certain values... like colorNo etc.
This values would be posted to my server and the data would be stored in a
database(mysql) together with a unqiue
session id which would be generated. ( for this part i have finished and is
working).

Now comes the problematic part, after the values are submitted. I  want this
value to be avaiable to me each time
as user enter a new url from the browser( take note this url is not the
content residing in my server.. it is any remote site url).
The only way is to append a session id at the url.

So for instance.. after the user finished entering the form page. He can now
access any urls(remote site). How do i tell the server that this is the user
who has entered the form earlier based on the session id generated. And for
all the subsquent links... how can i append the session id.

I would greatly appreciated if you could help me out..
Really thanks to you

Regards
kheeteck






- Original Message -
From: [EMAIL PROTECTED]
To: ktgoh [EMAIL PROTECTED]
Cc: mod_perl [EMAIL PROTECTED]
Sent: Wednesday, May 23, 2001 12:27 AM
Subject: Re: Appending Sessionid to all the urls


 Hi ktgoh,

 you don't tell the browser about the session id. Why?

 To use a session id that's appended to the URL is hard work - it has to be
 maintaned in every module and html file. So you must append the session id
to
 every URL in every page and every piece of code that produces html. Ther
is no
 way to automatically keep the id sticky.

 A better way for session ids is to put them in front of the URI:
 http://www.nus.edu.sg/dfd3453/some/path/and/file.html

 This is (part of) my uri-translation-handler:

 sub handler ($r: Apache) {
   # only do initial request - not an internal sub req
   return DECLINED unless $r-is_initial_req;
   return DECLINED unless $r-uri =~ m/$DIR_MATCH/o;

   try my $check_uri = check_uri($r);
   return DECLINED if $check_uri; # URI contains session id and session
object
 could be read from the DB

   # else redirect to mangled URI
   try my $session_id = make_session_id($r);
   redirect($r, $session_id);
   return REDIRECT;
   # end of main handler
 }

 sub check_uri ($r: Apache) {
   my $uri = $r-uri || undef;
   my (undef, $sessionid, $rest) = split '/', $uri, 3;
   if ($sessionid  $sessionid =~ m/^[0-9a-h]{32,32}$/o) {
 $r-uri(/$rest);
 try void lock_session_id($r, $sessionid);
 return 1;
   }
   return undef;
 }

 sub redirect ($r: Apache, $session_id: string min 32 max 32) {
   my $args = $r-args ? '?' . $r-args : '';
   my $uri = $r-parsed_uri;
   $redirect = $uri-scheme . '://' . $uri-$hostinfo . '/'. $session_id .
'/' .
 $uri-path . $args;
   $r-header_out(Location = $redirect);
 }

 These session ids are sticky as long as you only use relative paths in
your
 html. Note: You may want to put your images in a directory that's not
covered by
 this handler and use absolute paths...


 Datum: 22.05.2001 12:03
 An:mod_perl [EMAIL PROTECTED]


 Betreff:   Appending Sessionid to all the urls
 Nachrichtentext:


 Hi all :

 I wanted to write a mod URL rewrite program.

 I wanted to append session ID to the tail of all the urls of a website.

 For instance when i access url http://www.nus.edu.sg?sessionid=dfd3453
 i want all the urls to be appended in all the urls of that website..

 My qns is everytime i found that the session id is lost... through the
many
 requests and responses.
 And the new url does not reflect on the client browser..

 Any one got any idea.. what wrong with my program??

 Thanks for your help...

 sub handler {

  my $r = shift;
  my $url = $r-uri;
  my $sessID;

  if($url =~ m/sessionid/){
   $sessID= getSessionID($url);
  }

  my $append =?sessionid=$sessID
  my $newURL = $r-uri($url$append);

  return DECLINED;

 }

 sub getSessionID{
  my  $url = $_[0];
  my  $position = rindex($url,=)+1;
  my  $sessID = substr($url,$position,8);
  return $sessID;
  }


 Regards
 kheeteck



















Re: Connection to MySQL DB fails when mod_perl enabled...

2001-05-23 Thread Ged Haywood

Hi there,

On Tue, 22 May 2001, Ask Bjoern Hansen wrote:

 If you want to die then

Come on, mod_perl is tricky sometimes but things can't be that bad...

73,
Ged.





Re: Appending Sessionid to all the urls

2001-05-23 Thread kheeteck

Hi Michael :

I am really glad that you reply to my mail.. as i have been trying to solve
this problem for quite some time
Hmm , however i think u slightly misunderstand what i mean..

What i mean is...
For eg,

I have a html page which contains a form page let say allowing the user to
enter certain values... like colorNo etc.
This values would be posted to my server and the data would be stored in a
database(mysql) together with a unqiue
session id which would be generated. ( for this part i have finished and is
working).

Now comes the problematic part, after the values are submitted. I  want this
value to be avaiable to me each time
as user enter a new url from the browser( take note this url is not the
content residing in my server.. it is any remote site url).
The only way is to append a session id at the url.

So for instance.. after the user finished entering the form page. He can now
access any urls(remote site). How do i tell the server that this is the user
who has entered the form earlier based on the session id generated. And for
all the subsquent links... how can i append the session id.

I would greatly appreciated if you could help me out..
Really thanks to you

Regards
kheeteck






- Original Message -
From: [EMAIL PROTECTED]
To: ktgoh [EMAIL PROTECTED]
Cc: mod_perl [EMAIL PROTECTED]
Sent: Wednesday, May 23, 2001 12:27 AM
Subject: Re: Appending Sessionid to all the urls


 Hi ktgoh,

 you don't tell the browser about the session id. Why?

 To use a session id that's appended to the URL is hard work - it has to be
 maintaned in every module and html file. So you must append the session id
to
 every URL in every page and every piece of code that produces html. Ther
is no
 way to automatically keep the id sticky.

 A better way for session ids is to put them in front of the URI:
 http://www.nus.edu.sg/dfd3453/some/path/and/file.html

 This is (part of) my uri-translation-handler:

 sub handler ($r: Apache) {
   # only do initial request - not an internal sub req
   return DECLINED unless $r-is_initial_req;
   return DECLINED unless $r-uri =~ m/$DIR_MATCH/o;

   try my $check_uri = check_uri($r);
   return DECLINED if $check_uri; # URI contains session id and session
object
 could be read from the DB

   # else redirect to mangled URI
   try my $session_id = make_session_id($r);
   redirect($r, $session_id);
   return REDIRECT;
   # end of main handler
 }

 sub check_uri ($r: Apache) {
   my $uri = $r-uri || undef;
   my (undef, $sessionid, $rest) = split '/', $uri, 3;
   if ($sessionid  $sessionid =~ m/^[0-9a-h]{32,32}$/o) {
 $r-uri(/$rest);
 try void lock_session_id($r, $sessionid);
 return 1;
   }
   return undef;
 }

 sub redirect ($r: Apache, $session_id: string min 32 max 32) {
   my $args = $r-args ? '?' . $r-args : '';
   my $uri = $r-parsed_uri;
   $redirect = $uri-scheme . '://' . $uri-$hostinfo . '/'. $session_id .
'/' .
 $uri-path . $args;
   $r-header_out(Location = $redirect);
 }

 These session ids are sticky as long as you only use relative paths in
your
 html. Note: You may want to put your images in a directory that's not
covered by
 this handler and use absolute paths...


 Datum: 22.05.2001 12:03
 An:mod_perl [EMAIL PROTECTED]


 Betreff:   Appending Sessionid to all the urls
 Nachrichtentext:


 Hi all :

 I wanted to write a mod URL rewrite program.

 I wanted to append session ID to the tail of all the urls of a website.

 For instance when i access url http://www.nus.edu.sg?sessionid=dfd3453
 i want all the urls to be appended in all the urls of that website..

 My qns is everytime i found that the session id is lost... through the
many
 requests and responses.
 And the new url does not reflect on the client browser..

 Any one got any idea.. what wrong with my program??

 Thanks for your help...

 sub handler {

  my $r = shift;
  my $url = $r-uri;
  my $sessID;

  if($url =~ m/sessionid/){
   $sessID= getSessionID($url);
  }

  my $append =?sessionid=$sessID
  my $newURL = $r-uri($url$append);

  return DECLINED;

 }

 sub getSessionID{
  my  $url = $_[0];
  my  $position = rindex($url,=)+1;
  my  $sessID = substr($url,$position,8);
  return $sessID;
  }


 Regards
 kheeteck














[Mason] Apache::Session not storing changes to hashref

2001-05-23 Thread Jared Rhine

[Citation date: Tue, 22 May 2001 15:59:52 -0400]

 Chris == Chris Thompson [EMAIL PROTECTED]

Chris I've got a hash %s successfully re tied every request. I'm
Chris using it to store a session id and userid with success, so
Chris I know it's storing.

In the Behavior section of the Apache::Session man page, you'll find:

  Note that Apache::Session does only a shallow check to see if
  anything has changed.  If nothing changes in the top level tied
  hash, the data will not be updated in the back- ing store.  You
  are encouraged to timestamp the session hash so that it is sure
  to be updated.

Basically, you'll need to either:

  1. Use the 'timestamp' technique suggested above.

  2. Deference your variables a bit before updates.  Instead of:

   $s{$x}-[$y]-{$z} = 5;

 you'll need to use some intermediate variables:

   $q = $s{$x}-[$y];
   $q-{$z} = 5;
   $s{$x} = $q;

RTFM.

-- [EMAIL PROTECTED]

A hundred thousand lemmings can't be wrong.
-- attributed to Larry Sheldon, Jr.



Re: Appending Sessionid to all the urls

2001-05-23 Thread Julian Gilbey

On Wed, May 23, 2001 at 12:59:39AM +0800, kheeteck wrote:
 Hi Michael :
 
 I am really glad that you reply to my mail.. as i have been trying to solve
 this problem for quite some time
 Hmm , however i think u slightly misunderstand what i mean..
 
 What i mean is...
 For eg,
 
 I have a html page which contains a form page let say allowing the user to
 enter certain values... like colorNo etc.
 This values would be posted to my server and the data would be stored in a
 database(mysql) together with a unqiue
 session id which would be generated. ( for this part i have finished and is
 working).
 
 Now comes the problematic part, after the values are submitted. I  want this
 value to be avaiable to me each time
 as user enter a new url from the browser( take note this url is not the
 content residing in my server.. it is any remote site url).
 The only way is to append a session id at the url.
 
 So for instance.. after the user finished entering the form page. He can now
 access any urls(remote site). How do i tell the server that this is the user
 who has entered the form earlier based on the session id generated. And for
 all the subsquent links... how can i append the session id.
 
 I would greatly appreciated if you could help me out..
 Really thanks to you

Have you considered using cookies?  They're designed for just this
purpose, and are much simpler to use in general.

   Julian

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 Julian Gilbey, Dept of Maths, Queen Mary, Univ. of London
   Debian GNU/Linux Developer,  see http://people.debian.org/~jdg
  Donate free food to the world's hungry: see http://www.thehungersite.com/



mod_perl and NES/iPlanet

2001-05-23 Thread Niral Trivedi

All,

I know this is stupid question... but I want to confirm this thing from
apache/mod_perl Gurus here..

mod_perl can not be used with NES or iPlanet web server, right?

We are so much screwed up here with iPlanet but we have to use that for some
other reasons.. So, we were exploring the possibilities..

Niral




credit card processing

2001-05-23 Thread Adam Prime


I was looking through the mod_perl archives and saw a post from doug about a
credit card processing system called 'creditor'  i looked on the covalent
web site, but i couldn't find any info.  Did this thing ever see the light
of day?  

If not, what are some alternatives to it?  i was forwarded this url
(http://www.paygateway.com/tech/perl_plug/), but sites without index pages
make me wonder.  Any feedback would be appreciated.  It would be especially
great if we would be able to bill in both US and Canadian Dollar's using the
same thing.

TIA
Adam



RE: mod_perl and NES/iPlanet

2001-05-23 Thread Brendan McAdams

Unfortunately, Mod_perl is completely an apache thing.

Although it would be very cool to see the 'concept' of mod_perl (A perl
wrapper to a Server API) spread to other servers.

-
Brendan W. McAdams   |   [EMAIL PROTECTED]
Senior Applications Developer | (212) 208-9116
TheMuniCenter, LLC | www.themunicenter.com

Always listen to experts. They'll tell you what can't be done, and why.
Then do it.
- Robert A. Heinlein

-Original Message-
From: Niral Trivedi [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 10:22
To: '[EMAIL PROTECTED]'
Subject: mod_perl and NES/iPlanet


All,

I know this is stupid question... but I want to confirm this thing from
apache/mod_perl Gurus here..

mod_perl can not be used with NES or iPlanet web server, right?

We are so much screwed up here with iPlanet but we have to use that for
some
other reasons.. So, we were exploring the possibilities..

Niral




Re: [DIGEST] mod_perl digest 05/13/01

2001-05-23 Thread Issac Goldstand

 --
 
   mod_perl digest
  
  May 13, 2001 - May 19, 2001
 
 --
 
 Recent happenings in the mod_perl world...
 
 
 
 mod_perl status
 
   o mod_perl
 - stable: 1.25 (released January 29, 2001) [1]
 - development: 1.25_01-dev [2]
   o Apache
 - stable: 1.3.19 (released February 28, 2001) [3]
Nope - stable is 1.3.20 (fixing a Win32 issue)  released May 15, 2001
 - development: 1.3.21-dev [4]
   o Perl
 - stable: 5.6.1 (released April 9, 2001) [5]
 - development: 5.7.1 [6]

  Issac

Internet is a wonderful mechanism for making a fool of
yourself in front of a very large audience.
  --Anonymous

Moving the mouse won't get you into trouble...  Clicking it might.
  --Anonymous

PGP Key 0xE0FA561B - Fingerprint:
7E18 C018 D623 A57B 7F37 D902 8C84 7675 E0FA 561B








Re: Real Widgets and Template Languages

2001-05-23 Thread Stephen Adkins

Hi,

I will step up to write this code. (if it is what I think it is)
I have responded to the message by beginning a requirements document.

   http://www.officevision.com/pub/HTML-Widget/

Please read it and send me any comments.
The following are the questions I need advice on in order to proceed.

  * What CPAN package namespace should I use?
I studied the existing packages, and what we are trying to do looks
like it fits under the existing top level package HTML.
I propose to take the space HTML::Widget (see package layout in
design doc).  Gunther suggested the top-level Widget name space.
I was under the impression that we should stay away from creating
new top-level entries at CPAN unless there was really *nothing*
similar.  Confusingly, there is already an HTML::Widgets. Thoughts?

  * What CPAN packages should I begin with and build upon?
CGI and Apache::Request were mentioned.  I figure I will use these.
HTML::StickyWidgets was also mentioned.  Do you mean HTML::StickyForms?
Are there others I should build dependencies on?

  * Should I begin immediately with a new Sourceforge project? another way?
The codebase I will begin with is in CVS on my local server.
Perhaps I should just continue that way and post versions to CPAN
for distribution. However, we may have email traffic for the project
that exceeds the general interests of the modperl list. Thoughts?
I would need to get enough responses from people who would join that
Sourceforge mailing list before it would be worth it to go do that.

Stephen

There has been some discussion on the list lately about generating widgets 
ala CGI.pm, HTML::StickyWidgets etc...

The thing is that these products or plug-ins are very HTML oriented. The 
widget is defined as an HTML widget like a textfield or checkbox or 
dropdown or what-have-you.

What I am really looking for is a library that abstracts and allows widgets 
to be developed that are tied to an application not to a set of HTML 
necessarily. I guess I will start by providing an example of what I want 
based on what we currently do in our Java framework when he use Templating 
there. I'd like it if someone has developed the same thing in Perl that we 
could reuse, otherwise, we may need to write this.
... snip ...






Re: Appending Sessionid to all the urls

2001-05-23 Thread Stuart Frew

Greetings,

One problem with using cookies for session management is that the user
can have two browsers open doing the same process.

Which means the first cookie Session ID will be over writen by the
second one. Which can lead to horrid results if the user continues the
first process but has the session ID from the second process.

May not be an issue out in the Internet but is a true pain in an
intranet environment.

Cheers Stuart.

On 23 May 2001 11:53:32 +0100, Julian Gilbey wrote:
 On Wed, May 23, 2001 at 12:59:39AM +0800, kheeteck wrote:
  Hi Michael :
  
  I am really glad that you reply to my mail.. as i have been trying to solve
  this problem for quite some time
  Hmm , however i think u slightly misunderstand what i mean..
  
  What i mean is...
  For eg,
  
  I have a html page which contains a form page let say allowing the user to
  enter certain values... like colorNo etc.
  This values would be posted to my server and the data would be stored in a
  database(mysql) together with a unqiue
  session id which would be generated. ( for this part i have finished and is
  working).
  
  Now comes the problematic part, after the values are submitted. I  want this
  value to be avaiable to me each time
  as user enter a new url from the browser( take note this url is not the
  content residing in my server.. it is any remote site url).
  The only way is to append a session id at the url.
  
  So for instance.. after the user finished entering the form page. He can now
  access any urls(remote site). How do i tell the server that this is the user
  who has entered the form earlier based on the session id generated. And for
  all the subsquent links... how can i append the session id.
  
  I would greatly appreciated if you could help me out..
  Really thanks to you
 
 Have you considered using cookies?  They're designed for just this
 purpose, and are much simpler to use in general.
 
Julian
 
 -- 
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
  Julian Gilbey, Dept of Maths, Queen Mary, Univ. of London
Debian GNU/Linux Developer,  see http://people.debian.org/~jdg
   Donate free food to the world's hungry: see http://www.thehungersite.com/
 

-- 

Cheers Stuart
---
New Zealand Revolution
[EMAIL PROTECTED] 
+64 9 918 7663





RE: [DIGEST] mod_perl digest 05/13/01

2001-05-23 Thread Geoffrey Young

[snip]
 - stable: 1.3.19 (released February 28, 2001) [3]
Nope - stable is 1.3.20 (fixing a Win32 issue)  released May 15, 2001

actually, the official release wasn't announced to [EMAIL PROTECTED] until
yesterday.  until there is an offical announcement, there is always the
possibility that the release will be pulled and stable will stay where it
was (note I did bump the dev version, though).  I also mentioned that, based
on the noted link from new-httpd, that a release notice was forthcoming...

at any rate, thanks for being a second set of eyes - I've missed releases
before :)

--Geoff



Re: Real Widgets and Template Languages

2001-05-23 Thread Adi Fairbank

Stephen,

I read your proposal and I like it a lot.  I will help filling out the
HTML::Widget::HTML* space (in your package structure suggestion).

However, I like Gunther's suggestion for a namespace of Widget:: better than
HTML::Widget::, because it will not be exclusively HTML, but WML, JS10,
etc.  But either one is fine with me.

Sounds fun!
-Adi

Stephen Adkins wrote:
 
 Hi,
 
 I will step up to write this code. (if it is what I think it is)
 I have responded to the message by beginning a requirements document.
 
http://www.officevision.com/pub/HTML-Widget/
 
 Please read it and send me any comments.




Re: Real Widgets and Template Languages

2001-05-23 Thread Chip Turner


If I could make a suggestion -- don't depend upon a CGI.pm interface
for form variables.  Abstract it away.  One option would be to use
closures:

my $cgi = new CGI;
my $formvar = sub { $cgi-param(@_) };
my $wc = HTML::Widget::Controller-new(\%config, $formvar);

Or possibly, inside the constructor, do something like:

sub HTML::Widget::Controller::new {
  my $class = shift;
  my $config = shift;
  my $cgi = shift;

  if (ref $cgi and ref $cgi eq 'CGI') {
my $tmp = $cgi; # not strictly necessary, but it makes it clearer
$cgi = sub { $tmp-param(@_) };
  }

  ...
}

That way the user can easily give you different sources of formvars
(libapreq, Apache::ASP's hash, plus others not yet public) and yet you
still get the flexibility you need.

I would suggest using a class for this kind of thing, but
realistically it's a bit much to expect users to derive classes just
for something as simple as this.  By supporting the coderef closure
internally, you don't force users to understand what's going on, but
still allow for more advanced users to use different interfaces.  Plus
you remove dependance on a web server.

Chip

Adi Fairbank [EMAIL PROTECTED] writes:

 Stephen,
 
 I read your proposal and I like it a lot.  I will help filling out the
 HTML::Widget::HTML* space (in your package structure suggestion).
 
 However, I like Gunther's suggestion for a namespace of Widget:: better than
 HTML::Widget::, because it will not be exclusively HTML, but WML, JS10,
 etc.  But either one is fine with me.
 
 Sounds fun!
 -Adi
 
 Stephen Adkins wrote:
  
  Hi,
  
  I will step up to write this code. (if it is what I think it is)
  I have responded to the message by beginning a requirements document.
  
 http://www.officevision.com/pub/HTML-Widget/
  
  Please read it and send me any comments.

-- 
Chip Turner   [EMAIL PROTECTED]
  RHN Web Engineer



Problem running CGI Script

2001-05-23 Thread Garima Kishore

Hi,

Assuming I have configured Apache server for running CGI scripts on the
Linux platform , I get an error when I type the URL

 http://MYMACHINENO:8080/cgi-bin/.PLX PROGRAM on the browser

ERROR:The requested item could not be loaded by the proxy.Operation
timed out.

Kindly help!

Thanking you in advance,
Garima.









Sessions with Postgres

2001-05-23 Thread Robert

Hi,

  sorry for crossposting. I'd like to use Apache::Session with Postgres
as a backend (from HTML::Embperl if possible), but I'm still having
problems. People on these lists complain from time to time that they
have problems with this combination but searching archives don't give
many advices / just list of problems...

  Is anybody here using Apache::Session/Postgres combination without
problems? If so, could you be so kind as to post your configuration? If
not, how far did you get last time you tried? Is anybody interested in
using it at all? 

  Sorry if I sound a bit pessimistic - I applied patch Angus Lee posted
week ago on Embperl list and it almost works, but I still have some idle
postgres backend hanging around. It's getting really frustrating.

  - Robert



BUG PATCH (was: Strange status returns from perl_handler)

2001-05-23 Thread Julian Gilbey

On Mon, May 21, 2001 at 06:36:54PM +0100, Julian Gilbey wrote:
 We've just upgraded a SunOS machine from Apache 1.3.9 + mod_perl 1.21
 (dynamically linked) to Apache 1.3.19 + mod_perl 1.25 (statically
 linked).  I have a CGI/Perl script, handled as normal by perl-script
 and Apache::Registry.  Now, this CGI script sometimes returns a page
 with status something like '403 Forbidden', including full content and
 full headers.  With the old version, the perl_handler function
 returned with status=0 (OK), even if the HTTP status was going to be
 403, and then Apache was quite happy with this.  However, in the
 current combination, the perl_handler function returns with the HTTP
 status, so that the Apache core adds on its own content.

Right, here's a patch.  This line of code was erroneously removed some
time between version 1.21 and 1.25 of mod_perl.

--- Apache.xs~  Tue May 15 14:20:51 2001
+++ Apache.xs   Wed May 23 17:18:45 2001
@@ -937,6 +937,7 @@
 r-content_type = pstrdup(r-pool, type);
 send_http_header(r);
 mod_perl_sent_header(r, 1);
+r-status = 200; /* XXX, why??? */
 
 #ifndef PERL_OBJECT
 
An improved comment might help here.  The r-status variable is used
for two distinct purposes:

(1) Once the Perl script has correctly executed (or something like
that; the details are really confusing), and until the HTTP header
is correctly sent, it is used to indicate the HTTP status code
(200 = HTTP_OK, for example).

(2) After this, it is used to record the status of the Perl script.
The perl_call_handler function in mod_perl.c takes a status value
of 200 to mean that everything has gone OK.

(3) The HTTP procedures don't need the HTTP status code again after
the header has been sent.

Therefore, this line of code is necessary to keep the rest of the
system correctly functioning.

So I'd recommend a comment like:
  /* mod_perl needs this to say the code has executed correctly */

   Julian

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 Julian Gilbey, Dept of Maths, Queen Mary, Univ. of London
   Debian GNU/Linux Developer,  see http://people.debian.org/~jdg
  Donate free food to the world's hungry: see http://www.thehungersite.com/



Re: mod_perl and NES/iPlanet

2001-05-23 Thread Ken Williams

[EMAIL PROTECTED] (Niral Trivedi) wrote:
mod_perl can not be used with NES or iPlanet web server, right?

We are so much screwed up here with iPlanet but we have to use that for
some other reasons.. So, we were exploring the possibilities..

It depends - if you need to run iPlanet as your main server but could
run an Apache process as a backend using a proxy, then you could do
fine.  If you're forbidden from running Apache at all, you're out of
luck.


  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum



Re: mod_perl and NES/iPlanet

2001-05-23 Thread Gunther Birznieks

If you just want to speed up CGI Scripts, Speedy::CGI is a good, supported 
persistent perl mechansim that plugs in well in an Iplanet WEb Server 
environment.

I think someone did make an NSAPI_PERL but I Don't know how well that is 
really supported.

At 10:21 AM 5/23/01 -0400, Niral Trivedi wrote:
All,

I know this is stupid question... but I want to confirm this thing from
apache/mod_perl Gurus here..

mod_perl can not be used with NES or iPlanet web server, right?

We are so much screwed up here with iPlanet but we have to use that for some
other reasons.. So, we were exploring the possibilities..

Niral

__
Gunther Birznieks ([EMAIL PROTECTED])
eXtropia - The Open Web Technology Company
http://www.eXtropia.com/




RE: mod_perl and NES/iPlanet

2001-05-23 Thread Niral Trivedi

You are right Gunther 

We are looking something similar as mod_perl for iPlanet.. basically a way
to have perl interpreter running as server process itself...

I will look into Speedy::CGI or NSAPI_PERL.

Thanks a lot..

Niral

-Original Message-
From: Gunther Birznieks [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 10:36 AM
To: Niral Trivedi; '[EMAIL PROTECTED]'
Subject: Re: mod_perl and NES/iPlanet


If you just want to speed up CGI Scripts, Speedy::CGI is a good, supported 
persistent perl mechansim that plugs in well in an Iplanet WEb Server 
environment.

I think someone did make an NSAPI_PERL but I Don't know how well that is 
really supported.

At 10:21 AM 5/23/01 -0400, Niral Trivedi wrote:
All,

I know this is stupid question... but I want to confirm this thing from
apache/mod_perl Gurus here..

mod_perl can not be used with NES or iPlanet web server, right?

We are so much screwed up here with iPlanet but we have to use that for
some
other reasons.. So, we were exploring the possibilities..

Niral

__
Gunther Birznieks ([EMAIL PROTECTED])
eXtropia - The Open Web Technology Company
http://www.eXtropia.com/