AxKit Segfaults

2002-01-28 Thread Aaron E. Ross


 Hi all,

  I was excited about AxKit. :(

  I'm getting segfaults on the first request, but have neither expat
  (strings shows now symbols in httpd, mod_perl built with DO_HTTPD=1),
  nor php installed.

  Any other ideas?  I'm building with debug flags now.

  apache-1.3.22
  mod_perl-1.26
  perl-5.6.1

  Thanks, Aaron

-- 
aaron ross . alias i, inc
 email . [EMAIL PROTECTED]
 phone . 215 545 6428



Re: Problem with exception handler in guide?

2002-01-09 Thread Aaron E. Ross


> die (My::Exception->Return(code => "abc"));

$ perl -I/tmp -MMy::Exception -e 'die "My::Exception"->RetCode( code => 204 )'
$ My::Exception::RetCode=HASH(0x8185570)

 not much better, but no parens. :) 

 i don't really understand the precedence problem though.

 Aaron



Re: Apache::Session getting DESTROYed in wrong order

2002-01-02 Thread Aaron E. Ross

 
 Hi Ken,

> refcount destruction.  I've declared %session as a locally-scoped 
> variable, so it should evaporate before global destruction, unless it's 
> got circular data structures or something.  Anyone know what might be 
> going on?

 Do you have a simple case we can test yet?

 Aaron




Re: [ANNOUNCE] TicketMaster.com sponsors mod_perl development

2001-09-20 Thread Aaron E. Ross

On Fri, Sep 21, 2001 at 02:01:31AM +0800, Gunther Birznieks wrote:
> "You can reach your goals.
> 
> I'm living proof.
> 
> beefcake.
> 
> BEEFCAKE!!"
> 
> -- Eric Cartman


 LOL!  sounds like a great project stas! thanks ticketmaster!



Re: Persitant data accross processes

2001-06-26 Thread Aaron E. Ross


>Hi all,
>
>create a new dbh for every process. I've looked at IPC::Shareable, but =

 why is a new dbh for each process a problem? how else would it work?

>it has to copy data. Meaning that I can only have a certain amount of =
>complexity to my data structures.

 I'm not sure why IPC::Shareable doesn't work, but maybe if you explain the problem 
 we can help.

 I've had the best success with BerkeleyDB for most tasks, I like the balance of 
simplicity, 
 speed, locking, and concurrency.  Just be sure to use BerkeleyDB and not DB_File, ok?

 You might also take a look at Cache::Cache for some sessions.

 There are also a number of modules that provide persistance frameworks: Alzabo, 
 Persistent::*, Tangram, Storable. See Data Type Marshalling and Persistent Storage
 in the Modules list on CPAN: http://www.cpan.org/modules/00modlist.long.htm

 Let me know how it works out.

 Aaron



Re: Apache::Session::MySQL question regarding lenght of _session_id

2000-12-18 Thread Aaron E. Ross

at a time earlier than now, Andreas Marienborg wrote:
> I just can't seem to find any info on how to specify that Apache::Session
> should create session_id's that are shorter than 32 hex chars? could
> someone point me in the right direction??

 Just write a module to sub class Apache::Session. Apache::Session::MySQL is 
 remarkably simple.  Here it is:

package Apache::Session::MySQL;
 
use strict;
use vars qw(@ISA $VERSION);
 
$VERSION = '1.01';
@ISA = qw(Apache::Session);
 
use Apache::Session;
use Apache::Session::Lock::MySQL;
use Apache::Session::Store::MySQL;
use Apache::Session::Generate::MD5;
use Apache::Session::Serialize::Storable;
 
sub populate {
my $self = shift;
 
$self->{object_store} = new Apache::Session::Store::MySQL $self;
$self->{lock_manager} = new Apache::Session::Lock::MySQL $self;
$self->{generate} = \&Apache::Session::Generate::MD5::generate;
$self->{validate} = \&Apache::Session::Generate::MD5::validate;
$self->{serialize}= \&Apache::Session::Serialize::Storable::serialize;
$self->{unserialize}  = \&Apache::Session::Serialize::Storable::unserialize;
 
return $self;
}
 
1;

You can have any subroutine you want generate id's. Just change the two lines
where generate is set to Apache::Session::Generate::MD5::generate and validate
to Apache::Session::Generate::MD5::validate. For example:

package Apache::Session::MyOwnPackage;
 
use strict;
use vars qw(@ISA $VERSION);
 
$VERSION = '1.01';
@ISA = qw(Apache::Session);
 
use Apache::Session;
use Apache::Session::Lock::MySQL;
use Apache::Session::Store::MySQL;
use Apache::Session::Serialize::Storable;
 
sub populate {
my $self = shift;
 
$self->{object_store} = new Apache::Session::Store::MySQL $self;
$self->{lock_manager} = new Apache::Session::Lock::MySQL $self;
$self->{generate} = \&generate;
$self->{validate} = \&validate;
$self->{serialize}= \&Apache::Session::Serialize::Storable::serialize;
$self->{unserialize}  = \&Apache::Session::Serialize::Storable::unserialize;
 
return $self;
}

sub generate
{
# some code to generate ids
}

sub validate
{
# some code to validate ids
}
 
1;

Of course, you'll actually need to write some code to generate and validate
ids. :)

HTH, 
 Aaron
 
> 
> thanks in advance
> 
> Andreas
> 
> 
> -- 
> Andreas Marienborg+47 92 28 63 82
> [EMAIL PROTECTED] www.palle.net

-- 

---
 Caution! The beverage you are about to enjoy may be hot.




Re: RFC: mod_perl advocacy project resurrection

2000-12-07 Thread Aaron E. Ross

at a time earlier than now, Stas Bekman wrote:
> > Installing: 
> What's so complicated about this:
> 
>   % cd /usr/src
>   % lwp-download http://www.apache.org/dist/apache_x.x.x.tar.gz
>   % lwp-download http://perl.apache.org/dist/mod_perl-x.xx.tar.gz
>   % tar xzvf apache_x.x.x.tar.gz
>   % tar xzvf mod_perl-x.xx.tar.gz
>   % cd mod_perl-x.xx
>   % perl Makefile.PL APACHE_SRC=../apache_x.x.x/src \
> DO_HTTPD=1 USE_APACI=1 EVERYTHING=1
>   % make && make test && make install
>   % cd ../apache_x.x.x
>   % make install

 nothing.. but it's even better as a shell script, set the versions and go!

-=-=- start -=-=-=-

#!/bin/sh

#TMPDIR='/tmp'
TMPDIR=$1
#APACHE_VER='1.3.14'
APACHE_VER=$2
#MODPERL_VER='1.24_01'
MODPERL_VER=$3

if [ $# -lt 3 ]; then
 echo "Usage: mod_perl.sh   ";
 exit;
fi

cd $TMPDIR

lwp-download "http://www.apache.org/dist/apache_$APACHE_VER.tar.gz"
lwp-download "http://perl.apache.org/dist/mod_perl-$MODPERL_VER.tar.gz"
tar vzxf apache_$APACHE_VER.tar.gz
tar vzxf mod_perl-$MODPERL_VER.tar.gz
cd mod_perl-$MODPERL_VER

# Add this arg to APACI_ARGS if you are on RedHat 
# --with-layout=RedHat
perl Makefile.PL APACHE_SRC=../apache_$APACHE_VER/src DO_HTTPD=1 USE_APACI=1 
EVERYTHING=1 APACI_ARGS='--enable-shared=max --disable-shared=perl 
--enable-module=most'

make && make test && make install
cd ../apache_$APACHE_VER
make install

echo "* Done! **"

-=-=- end -=-=-=-=-

Anyone have code to handle the config file?

Aaron
  
> 
> and slurping into httpd.conf:
> 
>   PerlModule Apache::Registry 
>   Alias /perl/ /home/httpd/perl/ 
>   
> SetHandler perl-script 
> PerlHandler Apache::Registry 
> PerlSendHeader On 
> Options +ExecCGI
>   
> 
> and running:
> 
>   % apachect start
> 
> to get started with... works out of box on most Unix flavors.
> 
> Your problem is that you try to use the precompiled broken packages
> provided by distros. 
> 
> Try this command :)
> 
> perl -le \
> 'print "Build from source! Do NOT use mod_perl binary rpms!" while 1'
> 
> _
> Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
> http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
> mailto:[EMAIL PROTECTED]   http://apachetoday.com http://jazzvalley.com
> http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Smart installing (Re: mod_perl advocacy project resurrection)

2000-12-07 Thread Aaron E. Ross

at a time earlier than now, kevin montuori wrote:
> >>> Aaron E Ross writes:
> 
> 
>   aer> the possibility of being able to untar one package to get
>   aer> mod_perl w/ persistent db connections, [&c.] is very glamorous!
> 
>agreed.  but fundamentally impossible.  what database are you
>going to provide persistent connections to?  mysql?  not on my
>solaris box you're not, unless you're going to include mysql in 
>your distribution.  besides, i want sybase.  ok, so skip the
>database and use DBM files, gdbm's everywhere, right?  again,
>not (standard, anyway) on solaris.  so, package up gdbm too.

Well, I see the problem, but ... when you install J2EE or WebSphere, you
don't actually get DB2 or Oracle installed too.  You do however, get 
an interface to a connection pooling mechanism, all you have to do is
code it ( and maybe configure it ). I'm imagining the same thing.  If 
you need a feature, turn it on. No CPAN, Compilation, etc ...

Rather than having to install Apache::Session,DBI,DBD each time, it should 
be ready to go with whatever database you are using.. or not at all.  

Providing compiled version of DBD drivers is harder, but not necessarily 
in the scope of this project. Oracle provides their own jdbc drivers, not
Sun and yet it is still a easier install.

I agree that providing a complete working, just add water environment is 
impossible, but providing the groundwork for one is not. So let's start, 
as you suggested, with two goals

1) bundling working versions of apache and mod_perl
2) providing summaries and descriptions of mod_perl development 
environments.

Aaron

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Smart installing (Re: mod_perl advocacy project resurrection)

2000-12-06 Thread Aaron E. Ross

at a time earlier than now, Dave Rolsky wrote:
> On Wed, 6 Dec 2000, brian moseley wrote:
> 
> But I'd also like to point out, as Matt Sergeant said, this stuff is
> _really_ hard, and not very glamorous.  I would've done much less of it

 while the install and auto configure part is not very glamorous, the 
 possibility of being able to untar one package to get mod_perl w/ persistent 
 db connections, transaction management, data relational modeling/objects and 
 a nice templating/servlet engine is very glamorous! you could be a folk hero!

 honestly it seems like a pretty worthwhile project to me. basically, what is
 missing is (cough! cough!) simply a lot of hard work. 
 
 except for transaction management, which is apparently of questionable value, 
 all the pieces exist, right?

   database abstraction and connection pooling => DBI
   session management  => Apache::Session
   load balancing  => mod_backhand??
   data relational mapping => Tangram or Alzabo
   templates or whatever you want to call them => HTML::Embperl/Mason/TemplateToolkit
   ide => pick an editor with a few hooks to call make, install and restart

 granted this may not get us everything, but if we could package up the stuff
 we all use over and over again, wouldn't that get us pretty far? 

 Aaron

 I'm willing to contribute time to this project if given some input on how 
 to proceed.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]