Re: mod_perl and CGI.pm and version 1.x and hell

2003-06-05 Thread Henrique Pantarotto
> it helps when problem reports include information that helps to debug the 
> problem. We can't possibly guess what setup you are using. In this case which 
> CGI version are you using? CGI 2.93 works just fine with mp1 and mp2.
> 
> CGI.pm does 'require Apache' only if it detects no mod_perl 2, but mod_perl 1.

Stas,

I thought I had the latest version, but you helped to realize I didn't. 
By mistake I downloaded and used version 2.753, thinking it was the
lastest one available, when actually it's from "March 2001".

The followin URL from CPAN confused me ("CGI.pm-2.753.tar.gz" appears
after "CGI.pm-2.93.tar.gz"):

http://www.cpan.org/modules/by-module/CGI/

Anyway, 2.753 didn't work, but 2.93 seems to work fine.

This is completely my fault, sorry for the trouble.


Regards, Henrique.



Re: mod_perl and CGI.pm and version 1.x and hell

2003-06-04 Thread Henrique Pantarotto
> Henrique Pantarotto wrote:
> > I'm having some trouble with CGI.pm working with mod_perl2.
> 
> What trouble are you having?

logs/error_log reported this:

[Fri May 30 09:21:20 2003] [error] [client 10.29.31.104] Can't locate Apache.pm in 
@INC (@INC contains: /home 
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Apache2 
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 
/usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi 
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl . /usr/local/apache/ 
/usr/local/apache/lib/perl) at /usr/lib/perl5/5.8.0/CGI.pm line 162.

I noticed CGI.pm does a "require Apache", and I don't seem to have this
Apache.pm file.

> > This guy clearly says
> > that CGI.pm is incompatible with mod_perl2:
> > 
> > http://marc.theaimsgroup.com/?l=apache-modperl&m=103619647305553&w=2
> 
> That was 7 months ago.  A lot has changed.

I confess I didn't try to hack this in to much detail.  I searched the
mailing-list and I found many threads saying bad things about CGI.pm and
mod_perl2, so I thought about asking this list this very specific
question.

> You could try CGI::Simple, which has the same (OO) interface as CGI.pm.

That's a really cool hint.  Thanks!!  I've neved used CGI::Simple before,
and I'll take a look at it.  Although 
cpan.org/modules/by-module/CGI/Cgi-Simple-0.06.readme
warns about not using this module with production environment.. but
they all say that right?  Hmm.. little red devil in left shoulder yells
"YES!", "GO FOR IT", little blue angel in another shoulder says "no
henrique, think".

> > Seriously, does mod_perl2 offer much more
> > features and benefits then mod_perl1?  I really only care for speed and
> > stability for simple perl scripts that use CGI/DBI/DBD::mysql modules.
> 
> It offers many new features, which are described here:
> http://perl.apache.org/docs/2.0/user/intro/overview.html#What_s_new_in_mod_perl_2_0
> 
> The most common reasons for switching at this point are to get filtering 
> or to get multi-threading on Win32.

Don't need Win32.  ;-)


> > Is it okay if I use mod_perl and apache 1.x today, or it's better to
> > move to 2.x already?
> 
> Many people are stil developing on 1.x, including me, and there is a new 
> release of it due out any day.  Go ahead, if that makes you more 
> comfortable.

I think I'll do that.  Thanks a lot for sharing your experience with me.



Thanks, Henrique.


Re: mod_perl and CGI.pm and version 1.x and hell

2003-06-04 Thread Henrique Pantarotto
> > Option 3 seems okay, excect for the fact that I am that kind of Linux
> > user that is always upgrading everything to the latest version possible. 
> > This applies to linux kernel, apache, etc.  I don't really have a reason
> > to do this, but I have always done it anyway.
> 
> You're nuts.  I'd fire you.  :)

In other words, are you saying that you'll hire me?  I plan on moving to
England within the next 2 or 3 years.  I'll send you an e-mail then and
ask for a job.  Probrably by then there'll be mod_perl3 and apache 4!
Anyway, I promise I won't rush on upgrading things frenetically.  ;-)

> Just out of interest, which kernel are you using?

This is a production server, so I am using stable 2.4.20.  Wouldn't be
responsible of me running 2.5.x in there right?

> Well *real* Linux users only code in C and assembler - that'll give you the speed...

You're right!  But for simple and/or fast development scripts, I think
perl with mod_perl make an excellent pair.  But if you want ultra-light
and really fast cgi programs, I agree that it really needs to be done in
C.

> By and large, 1.x is what the business world is using, and 2.x is
> not-quite-bleeding-edge.  Before Stas jumps on me again, there's not a
> lot wrong with it, but I won't be using it for anything that involves
> money until things have settled down quite a lot.

I didn't know this.

> Have you asked your employer what he thinks about it?

He would say "WHAT" (in portuguese though)


Regards from Brazil, Henrique.


mod_perl and CGI.pm and version 1.x and hell

2003-06-03 Thread Henrique Pantarotto
Hello!

after being a long time away (over 4 years since my last post on this
list), I started again with some development with mod_perl for this
company that I currently work for.

I'm having some trouble with CGI.pm working with mod_perl2.  I searched
the mailing-list for this and I found many different point of views for
this problem, some say it should work, and some say it doesn't.  I've
tested it and it really doesn't work "as is".  This guy clearly says
that CGI.pm is incompatible with mod_perl2:

http://marc.theaimsgroup.com/?l=apache-modperl&m=103619647305553&w=2

This isn't really a big problem, but I have 3 ways out:

1) help make CGI.pm compatible with mod_perl2 if at all possible

2) replace all CGI.pm calls with simple homemade cgi functions (not
difficult, it's just that we have to correct many scripts that already
count on CGI.pm), or use that "Apache::compat" thing

3) downgrade apache to 1.3.27 and mod_perl to 1.27 and be happy

Option 3 seems okay, excect for the fact that I am that kind of Linux
user that is always upgrading everything to the latest version possible. 
This applies to linux kernel, apache, etc.  I don't really have a reason
to do this, but I have always done it anyway.

So to use apache 1.3.27 and mod_perl 1.27 goes against my nature.  Am I
going to hell if I do this?  Seriously, does mod_perl2 offer much more
features and benefits then mod_perl1?  I really only care for speed and
stability for simple perl scripts that use CGI/DBI/DBD::mysql modules.

Is it okay if I use mod_perl and apache 1.x today, or it's better to
move to 2.x already?


Thanks, Henrique.