Re: [RELEASE CANDIDATE] Apache-Test-1.27 RC

2005-10-05 Thread Philip M. Gollucci

Philip M. Gollucci wrote:
I've noticed we include the RELEASE file in the release tarball.  I 
don't believe mod_perl or apreq do.  Is this intentional ?

Appologies, this was not correct.  Too many directories of this thing.

--
END

What doesn't kill us can only make us stronger.
Nothing is impossible.

Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
  http://www.liquidityservicesinc.com
   http://www.liquidation.com
   http://www.uksurplus.com
   http://www.govliquidation.com
   http://www.gowholesale.com



perl.apache.org

2005-10-05 Thread Stone, Derrick J *HS








Anybody else having a hard time getting to http://perl.apache.org?

 

Derrick Stone

Internet
Specialist

Web Development Center

UVa Health System

 








Re: perl.apache.org

2005-10-05 Thread Frank Wiles
On Wed, 5 Oct 2005 12:12:57 -0400
"Stone, Derrick J *HS" <[EMAIL PROTECTED]> wrote:

> Anybody else having a hard time getting to http://perl.apache.org?

  Yes I am as well. 

 -
   Frank Wiles <[EMAIL PROTECTED]>
   http://www.wiles.org
 -



Re: perl.apache.org

2005-10-05 Thread Philip M. Gollucci

Frank Wiles wrote:

Anybody else having a hard time getting to http://perl.apache.org?

Working for me.  I'm in DC (at the moment)

--
END

What doesn't kill us can only make us stronger.
Nothing is impossible.

Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
  http://www.liquidityservicesinc.com
   http://www.liquidation.com
   http://www.uksurplus.com
   http://www.govliquidation.com
   http://www.gowholesale.com



What am I missing?

2005-10-05 Thread Octavian Rasnita
Hi,

I am trying to use Apache::Session with mod_perl because I heard that it is
a little faster than CGI::Session. The problem is that I cannot save
variables in the created sessions. They are created, but no data is saved.

Here is what I have tried and I am sure I am missing something:

#Create session:
my %session;
eval {
tie(%session, 'Apache::Session::MySQL', undef, {Handle => $dbh, LockHandle
=> $dbh});
};

#Put a variable in it:
$session{username} = 'etc';

#get the session id:
my $session_id = $session{_session_id};

undef %session;

#Get the saved session:
my %new_session;
eval {
tie(%new_session, 'Apache::Session::MySQL', $session_id, {Handle => $dbh,
LockHandle => $dbh});
};

#Get the var from the session:
print $new_session{username};

undef %new_session;

###

After running this script, nothing is printed and the hash element
"username" is not saved in the MySQL table, but just the session ID.

I have created the MySQL table using:

create table sessions(id varchar(32) not null primary key, a_session text);

Thank you.

Teddy




RE: What am I missing?

2005-10-05 Thread Barksdale, Ray
 set a timestamp in your sessions before untying.

> -Original Message-
> From: Octavian Rasnita [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, October 05, 2005 2:51 PM
> To: modperl@perl.apache.org
> Subject: What am I missing?
> 
> Hi,
> 
> I am trying to use Apache::Session with mod_perl because I 
> heard that it is a little faster than CGI::Session. The 
> problem is that I cannot save variables in the created 
> sessions. They are created, but no data is saved.
> 
> Here is what I have tried and I am sure I am missing something:
> 
> #Create session:
> my %session;
> eval {
> tie(%session, 'Apache::Session::MySQL', undef, {Handle => 
> $dbh, LockHandle => $dbh}); };
> 
> #Put a variable in it:
> $session{username} = 'etc';
> 
> #get the session id:
> my $session_id = $session{_session_id};
> 
> undef %session;
> 
> #Get the saved session:
> my %new_session;
> eval {
> tie(%new_session, 'Apache::Session::MySQL', $session_id, 
> {Handle => $dbh, LockHandle => $dbh}); };
> 
> #Get the var from the session:
> print $new_session{username};
> 
> undef %new_session;
> 
> ###
> 
> After running this script, nothing is printed and the hash 
> element "username" is not saved in the MySQL table, but just 
> the session ID.
> 
> I have created the MySQL table using:
> 
> create table sessions(id varchar(32) not null primary key, 
> a_session text);
> 
> Thank you.
> 
> Teddy
> 
> 
> 


RE: What am I missing?

2005-10-05 Thread Barksdale, Ray
This needs to stay on the list.

Assuming you did create your table as a MyISAM table
which I think forces atomic updates (implicit commits),
that shouldn't be a problem and it is writing something.

I've only used this thing once so I'm no expert but it does
work unchanged after several years. My code resembles yours
except the last thing done is an explicit untie as follows:

my %session;
tie %session, 'Apache::Session::MySQL', undef, { Handle => $dbh,

LockHandle => $dbh}; 
# set the dsn
$session{dsn} = $PONTIS::DB::dsn;
$session{username} = $PONTIS::DB::db_user;
$session{password} = $PONTIS::DB::db_pass;

# set timestamp to force update
$session{timestamp} = time();

# get the session id and return it
my $id = $session{_session_id};
untie %session;


Looking at the Apache::Session code the DESTROY method forces a save op
but I can't remember if undef short-circuits that or not.


> -Original Message-
> From: Octavian Rasnita [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, October 05, 2005 4:30 PM
> To: Barksdale, Ray
> Subject: Re: What am I missing?
> 
> Ok, and how can I do that?
> 
> I have tried to create a first level element named 
> "timestamp" in the hash which is saved, but with the same results.
> 
> I have done:
> 
> $session{timestamp} = time();
> 
> Thanks.
> 
> Teddy
> 
> 



Re: Apache segfaults with Oracle AS10g (9.0.4.0) when attempting to use mod_perl

2005-10-05 Thread Rafael Caceres
Maruthi,

The only time anything is written to the logs is the case where the
'script.pl' under /perl has no XS components. In that case, no error or
warning results.
Any of the other cases mentioned in my initial posting results in
absolutely nothing output to the logs (with LogLevel debug) and apache
coredumps.

Regards,
Rafael Caceres

On Wed, 2005-10-05 at 10:02 +0530, Maruthi Vara Prasad Chirravuri wrote:
> Hi,
> 
> Can u send the /var/log/httpd/error.log and /var/log/messages output.
> 
> Ch. Maruthi Vara Prasad.
> 
> On 10/5/05, Rafael Caceres <[EMAIL PROTECTED]> wrote:
> > When trying to use any mod_perl functionality in the Apache server
> > included with Oracle AS10g under AIX 5.3, such as
> > -'PerlModule Apache::Status'
> > -'PerlModule Apache::DBI'
> > or others using XS, Apache does a coredump.
> >
> > The same coredump occurs if no XS using module is loaded from httpd.conf
> > but used in a script run from the /perl location.
> >
> > The same occurs if an XS using module is run with 'PerlRequire
> > initial_load.pl'
> >
> > The PERL5LIB value is correctly set in the Apache httpd.conf, so that is
> > not the problem. Oracle support has provided very little help to date,
> > and mod_perl usage is critical for our SingleSignOn system.
> >
> > Any help is appreciated,
> > Rafael Caceres
> >
> >
> 
> 
> !DSPAM:4343d6aa291741820910393!
> 



Re: What am I missing?

2005-10-05 Thread Perrin Harkins

Barksdale, Ray wrote:

 set a timestamp in your sessions before untying.


That's for telling it that the session has changed by doing a first 
level write to the tied hash.  This is only necessary when you are 
writing to the second level and not touching the first, e.g.


$session->{'user'}->{'favorite_color'} = 'mauve';

It doesn't need to be a timestamp either.  Just doing this every time 
will work fine:


$session->{'touch'} = 1;

In any case, that doesn't seem to be the problem here.

- Perrin


Re: What am I missing?

2005-10-05 Thread Perrin Harkins

Octavian Rasnita wrote:

I am trying to use Apache::Session with mod_perl because I heard that it is
a little faster than CGI::Session.


This used to be true, but CGI::Session is under new management and has 
been improving.



The problem is that I cannot save
variables in the created sessions. They are created, but no data is saved.


That usually indicates that your session is not going out of scope and 
thus never getting DESTORYed, which is when it gets saved.



#Create session:
my %session;
eval {
tie(%session, 'Apache::Session::MySQL', undef, {Handle => $dbh, LockHandle
=> $dbh});
};


You need to check $@ here.  That may not succeed.


undef %session;


This should work, unless you have put the session in some other place 
(an object, a closure, a global) that is still in scope.


You can turn on DBI tracing to see if it's making any database contact. 
 See DBI_TRACE in the DBI man page.


- Perrin


Re: What am I missing?

2005-10-05 Thread Octavian Rasnita
From: "Barksdale, Ray" <[EMAIL PROTECTED]>

> This needs to stay on the list.
>
> Assuming you did create your table as a MyISAM table
> which I think forces atomic updates (implicit commits),
> that shouldn't be a problem and it is writing something.
>
> I've only used this thing once so I'm no expert but it does
> work unchanged after several years. My code resembles yours
> except the last thing done is an explicit untie as follows:


Ok, I have solved it.
The only thing I needed to do was to change from undef %session to untie
%session.

The program used was exactly the program I have sent on the list. I have
just defined $dbh, and nothing more.

I don't know why it works with untie() but not with undef.

The Apache::Session POD says:

As shown in this example, you should undef or untie your session hash as
soon as you are done with it. This will free up any locks associated
with your process.

So it should also work with undef, but it is OK with untie.

Thank you all.


Teddy