[99903] in RedHat Linux List

home help back first fref pref prev next nref lref last post

RE: Getting to know CGI through httpd/Apache

daemon@ATHENA.MIT.EDU (Jiandong Ye)
Tue Nov 17 14:04:40 1998

Date: Tue, 17 Nov 1998 14:06:48 -0500
To: redhat-list@redhat.com
From: Jiandong Ye <dragonfly@gocougs.wsu.edu>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

I never used PHP3, I think it's some kind of web server
API type of stuff.  Since the code is in a module loaded
when the httpd server starts up, every subsequent request
to that module simply results in spawning a thread from
the httpd server, thus giving better performance compare
to commmon CGI scripts, since CGIs need to be loaded
into memory every time when they get called.  Using C/C++
is better than Perl, since Perl is an interpreter, well,
there are some fast-cgi/perl out there....

On the other hand, the learning curve for CGI scripting
is much lower than learning the PHP3 (I think). Since
there are lots of docs/samples for CGI programing out
there, and very few PHP3s' out there. Plus, CGI is much
easier to debug than PHP3. I remembered when I did some
testing on server API a while ago, I have to restart the
httpd server every time I made some changes to the API
module.

Deciding which form to go should depend on the
load on the cgi/php3 application. If the load is heavy,
like hundreds request per second, use PHP3. If the load
is just a few requests per second, you will be better off
with regular CGI.

Oh, when connecting the internet to the database, the real
bottleneck usually lies on the initialization of the database
connection, but that's another issue...

Hope this helps.
--dragonfly


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post