Re: mod_perl mod_php

2002-08-29 Thread Andy Lester

 I have a general question for the list:  Do people often use BOTH of these
 environments at the same time?  It seems to me that there would be little
 benefit to using both.  Am I mistaken?

I'm using both at work because we're slowly migrating from PHP to Perl.

PHP is better than Perl in some cases, I've found.  If you're
predominantly templating and don't want to futz around with Mason or TT
or whatever, PHP will do a fine job.

xoxo,
Andy

-- 
'Andy Lester[EMAIL PROTECTED]
 Programmer/author  petdance.com
 Daddy  parsley.org/quinn   Jk'=~/.+/s;print((split//,$)
[unpack'C*',n2]3%+\34.'%.'^%4+!o.'])



Re: T switch is ignored modperl2.0

2002-07-23 Thread Andy Lester

 I have put PerlSwitches -T in my httpd.conf file,  yet keep getting the
 following warning
 in the server's error_log:
 
 [Tue Jul 23 10:43:06 2002] [warn] T switch is ignored, enable with
 'PerlSwitches -T' in httpd.conf

You want the PerlTaintCheck On directive.

xoxo,
Andy

-- 
'Andy Lester[EMAIL PROTECTED]
 Programmer/author  petdance.com
 Daddy  parsley.org/quinn   Jk'=~/.+/s;print((split//,$)
[unpack'C*',n2]3%+\34.'%.'^%4+!o.'])



Re: Hiding perl code

2002-07-22 Thread Andy Lester

 At my former employer's, we built an Enterprise Management System out of
 mod_perl. He wants to distribute it to clients w/o risking theft of his
 code.

If w/o risking theft means eliminating risk of theft, then he can't
do it.  He can lower risk to some degree, but it can't be eliminated.
See
http://www.perldoc.com/perl5.6/pod/perlfaq3.html#How-can-I-hide-the-source-for-my-Perl-program-

xoxo,
Andy

-- 
'Andy Lester[EMAIL PROTECTED]
 Programmer/author  petdance.com
 Daddy  parsley.org/quinn   Jk'=~/.+/s;print((split//,$)
[unpack'C*',n2]3%+\34.'%.'^%4+!o.'])



Re: Perl-directive unknown

2002-07-10 Thread Andy Lester

 Perl
  my $test=hans;
 /Perl

Don't you also need

PerlModule Apache::PerlSections

Maybe?

xoxo,
Andy

-- 
'Andy Lester[EMAIL PROTECTED]
 Programmer/author  petdance.com
 Daddy  parsley.org/quinn   Jk'=~/.+/s;print((split//,$)
[unpack'C*',n2]3%+\34.'%.'^%4+!o.'])



Re: [OT] Encrypting Embedded URLs

2002-04-18 Thread Andy Lester

   # For example, something that converts this URL:
   $url = 'http://www.foo.com?a=1212u=http://www.foo1.com?a=12323';

   # that looks like this:
 http://www.foo.com?params=aJHKJHKJHKJHHGHFTDTDGDFDFGDGHDHG879879

Why are you trying to do this?  What's the goal here?

xoox,
Andy

-- 
'Andy Lester[EMAIL PROTECTED]
 Programmer/author  petdance.com
 Daddy  parsley.org/quinn   Jk'=~/.+/s;print((split//,$)
[unpack'C*',n2]3%+\34.'%.'^%4+!o.'])




Re: Found a sprintf() bug inPerl 5.6.1 (and mod_perl)

2002-04-15 Thread Andy Lester

 correct -269; that's because it's really more like
 -268.94315658 instead.  Usually, the
 sprintf, printf, or the POSIX::floor and

And in this case, that means:

alester@flr4[~/play]$ more sprintf.pl
#!/usr/bin/perl -w

$a=0.57 * 100;
print sprintf(%03d %20.19f\n, $a,$a);


alester@flr4[~/play]$ perl sprintf.pl
056 56.9928946

...

In general, the chances that you've found a bug in the language or
implementation that's been around as long and is as widely used as Perl
5.6 is preeetty small.

#!Andy


-- 
'Andy Lester[EMAIL PROTECTED]
 Programmer/author  petdance.com
 Daddy  parsley.org/quinn   Jk'=~/.+/s;print((split//,$)
[unpack'C*',n2]3%+\34.'%.'^%4+!o.'])




Re: Unsubscribe me please

2002-04-09 Thread Andy Lester

  Please unsubscribe me from this group.
 
 MAybe if we add it to the guide?!?  I don't know why all of the sudden
 people can't do this, but...

There's only so much hand-holding and coddling one group can do.

-- 
'Andy Lester[EMAIL PROTECTED]
 Programmer/author  petdance.com
 Daddy  parsley.org/quinn   Jk'=~/.+/s;print((split//,$)
[unpack'C*',n2]3%+\34.'%.'^%4+!o.'])




Re: Java???

2002-04-01 Thread Andy Lester

 Why does CPAN.org say Comprehensive Java Archive Network

Because it's April Fools Day.

xoxo,
Andy

-- 
'Andy Lester[EMAIL PROTECTED]
 Programmer/author  petdance.com
 Daddy  parsley.org/quinn   Jk'=~/.+/s;print((split//,$)
[unpack'C*',n2]3%+\34.'%.'^%4+!o.'])




Re: Blank Pages ( Revisited ) [Semi-OT]

2002-03-13 Thread Andy Lester

  However, when I do a random query I get some blank pages. I traced this to
  the DBI Log using the DBH-Trace(2, /tmp/DBI.log). I found that sometimes
  the execute() returns 0E0. Does anybody knows why??

 It probably means zero multiplied by ten to the power zero, or to put
 it another way, zero.

Perl has three values that are false: 0,  and undef.  Anything else is
true.

OE0 is the 0 but true value that DBI uses to signal that zero rows were
returned, but succeeded.

xoxo,
Andy

-- 
'Andy Lester[EMAIL PROTECTED]
 Programmer/author  petdance.com
 Daddy  parsley.org/quinn   Jk'=~/.+/s;print((split//,$)
[unpack'C*',n2]3%+\34.'%.'^%4+!o.'])




Re: virtual host server root

2002-03-01 Thread Andy Lester

  I'm trying to create a root directory for each of my virtuals.
  the realm of the virtual that certainly shouldn't be within
 [snip]
  I've come up with three solutions, none of which I
  particularly like for various reasons.

 Have you looked at mod_macro?

mod_macro has been a godsend for me.  I was about thisclose to writing
something to generate my http.conf for me.



-- 
%_=split/;/,.;;n;u;e;ot;t;her;c; .   #   Andy Lester
'Perl ;@; a;a;j;m;er;y;t;p;n;d;s;o;'.  #   http://petdance.com
hack;print map delete$_{$_},split//,q   [EMAIL PROTECTED]   





Making perl handlers handle non-Perl

2002-02-27 Thread Andy Lester


How can I get mod_perl to handle all Apache output, whether or not it
originates with mod_perl?

I'm writing a module that needs to analyze all output generated by Apache.
That's easy enough with stacked handlers, but I'm goofing something up
with, say, static HTML.

If I do this:

Location /test
PerlHandler MyFilter
/Location

Then static HTML gets served up OK, but MyFilter doesn't seem to get
called.  Or is it, and I'm screwing something up in the filter?

And of course if I do this:

Location /test
SetHandler  perl-script
PerlHandler MyFilter
/Location

Then I get no output because the .html files that I'm trying to serve up
out of /test aren't Perl.

Pointers please?  I've got both the Cookbook and the Eagle book if you
want to just point to a page.

Thanks,
Andy


-- 
%_=split/;/,.;;n;u;e;ot;t;her;c; .   #   Andy Lester
'Perl ;@; a;a;j;m;er;y;t;p;n;d;s;o;'.  #   http://petdance.com
hack;print map delete$_{$_},split//,q   [EMAIL PROTECTED]   





Re: Making perl handlers handle non-Perl

2002-02-27 Thread Andy Lester

 ok, SetHandler sets a content handler for a given Location - it supersededs 
everything else.

 unlike with normal Apache, mod_perl needs two things in order for your handler to be 
called:
 the content hander to be perl-script (for Apache) and the name of your handler with 
PerlHandler (for
 mod_perl)

So what we're saying is that with static .html files, there's no way for
me to get mod_perl to interject itself into Apache's chain?  Or PHP for
that matter?

I want my MyFilter to process EVERYTHING that Apache spits out, whether
with mod_perl, mod_php or just reading a .html file from the filesystem,
especially the mod_php stuff.

Should I be looking at one of the later phases (cleanup?) instead of
content generation?

Thanks,
Andy

-- 
%_=split/;/,.;;n;u;e;ot;t;her;c; .   #   Andy Lester
'Perl ;@; a;a;j;m;er;y;t;p;n;d;s;o;'.  #   http://petdance.com
hack;print map delete$_{$_},split//,q   [EMAIL PROTECTED]   





Articles

2002-02-27 Thread Andy Lester


Don't forget the fledgling The Perl Review, available at
http://www.theperlreview.com/  We're always lookin' for good stuff...

Andy

-- 
%_=split/;/,.;;n;u;e;ot;t;her;c; .   #   Andy Lester
'Perl ;@; a;a;j;m;er;y;t;p;n;d;s;o;'.  #   http://petdance.com
hack;print map delete$_{$_},split//,q   [EMAIL PROTECTED]   





Re: Making perl handlers handle non-Perl

2002-02-27 Thread Andy Lester

 Assuming you mean you want to look at the generated content from
 non-mod_perl handlers and do something with it, apache doesn't work that
 way.  Apache 2.0 does, but that won't help you right now.  You might try
 using a proxy server setup to do this instead.

THAT'S the answer I was looking for.  Not what I wnated, but at least it
answers my question. :-)

So, my HTML::Lint checking is only going to work on output from the
mod_perl chain.  I guess that's better than nothing, but I've got plenty
of PHP code that I'd like to filter thru it as well.

Thanks, all.

Andy

-- 
%_=split/;/,.;;n;u;e;ot;t;her;c; .   #   Andy Lester
'Perl ;@; a;a;j;m;er;y;t;p;n;d;s;o;'.  #   http://petdance.com
hack;print map delete$_{$_},split//,q   [EMAIL PROTECTED]   





Re: Weird (unwanted) text on page

2002-02-25 Thread Andy Lester

 And at least as weird problem is with Mac's (though I don't have a mac
 to test it, but clients complain). The whole page is screwed up, tables
 are broken, cookies won't get stored (send?) etc etc.

I haven't looked into it, but I would check to make sure that you're
sending proper linefeeds in your headers where appropriate.  I've run into
problems in the past where HTTP headers were getting printed with \r
instead of \n, and some browsers were fine with that, and some weren't.
The Mac version of IE, as I recall, was especially picky.

xoxo,
Andy

-- 
%_=split/;/,.;;n;u;e;ot;t;her;c; .   #   Andy Lester
'Perl ;@; a;a;j;m;er;y;t;p;n;d;s;o;'.  #   http://petdance.com
hack;print map delete$_{$_},split//,q   [EMAIL PROTECTED]   





Re: htaccess and mime types

2002-02-24 Thread Andy Lester

 I'm reading my Apache bible and the section on MIME types and my
 question is: Is there a way to modify the htaccess file so that
 regardless of the file requested (.gif, .wav, .jpg, etc.) they
 would receive a file recognizable as an html document or a plain text
 file when clicked on?

Whyncha just have it return a 403 ?

xoxo,
Andy

-- 
%_=split/;/,.;;n;u;e;ot;t;her;c; .   #   Andy Lester
'Perl ;@; a;a;j;m;er;y;t;p;n;d;s;o;'.  #   http://petdance.com
hack;print map delete$_{$_},split//,q   [EMAIL PROTECTED]