LPM: Not quite Perl - PHP

Mike Andrews mandrews at bit0.com
Sat Aug 14 14:56:16 CDT 1999


On Wed, 11 Aug 1999, John Soward wrote:

> David Hempy wrote:
> > 
> > Just saw this on CNet...
> > 
> > "PHP is a server-side, cross-platform, HTML embedded scripting
> > language."  I haven't used it yet, but it smells an awful lot like
> > Perl.  It lets you embed right into your HTML document code that will
> > be interpreted by the web server on its way to the client.  Hence, you
> > can do stuff like this:
> 
> I've used PHP for a couple of years now. It's very nice, it's not perl,
> but it is similar, and pretty easy for a perl programmer to pick up.
> with mod_perl and things like Mason or Embed perl php becomes slightly
> less attractive, since those devices allow for similar integration with
> the web server. However, php still offers a few advantages, and php v4,
> currently at beta release 2, will offer significant performance
> advantages over mod_perl based applications...

This reminds me of something I was going to ask at the last meeting, but
unfortunately fighting with a customer's Windows 98 problems kept me from
making it there in time...

Someone mentioned at one point that the CPAN CGI module was evil, but
didn't go into detail.

What's evil about it?

So far I've been using Steve Brenner's cgi-lib.pl script to grab form
variables, but it's very old and very crusty (kinda Perl 4-ish) and very
unhappy with "use strict" and the -w flag...  and I don't know if it has
security problems or not.

I was considering ripping it all out and starting over with something more
up to date and "standard" until I read that. :)

Most of the CGI's I'm looking at are very resource intensive and get run a
LOT (they do a lot of SNMP to USR Total Control modem pools)... so, for
performance reasons I'm also considering mod_perl instead.  Or something
similar -- I've never heard of Mason or Embed up until now.  How do they
compare to mod_perl?  I haven't yet tried mod_perl out, mostly because the
FreeBSD port of it doesn't work right now.  (The Makefile in the ports
collection is broken this week.)

Ideally, I'd like the programs to be able to run with or without it --
detect and use mod_perl (or equivalent) if it's there, and run without it
if it isn't.

So I guess I'm looking for opinions on various ways to both replace the
crusty cgi-lib.pl and to speed up frequently run CGI Perl scripts....



Mike Andrews (MA12) -=-=-  VP & Sysadmin, Digital Crescent, Frankfort KY
mandrews at dcr.net  -=--=-  mandrews at bit0.com  -=--=-  http://www.bit0.com
"If you're not part of the solution.... you're part of the precipitate."




More information about the Lexington-pm mailing list