Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 




      :: Apache-Talk
Apache-Talk mailing list archive (apache-talk@lists.lexa.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [apache-talk] Apache + PHP vs. Apache + CGI

AV>> I'm considering to use mySQL with Apache for a Web-interface to
AV>> database. What are the performance differences when using plain
AV>> (e.g.written in C) CGIs versus using PHP to manipulate database?
AV>> Is it critical? And are there any drawbacks of using PHP?

The benefits of PHP are as follows:
1. no new process on every call (if installed as module) - it's
significantly faster
2. no need to handle details of DB communication by yourself - you have
all needed functions at your hands
3. PHP is "The Tool" for simple web-DB-interface tasks - it's from

The drawbacks are:
1. You have to learn a new tool (syntax is like C - or more Perl, but some
things aren't - you got no strict types, almost no variable scoping, etc).

I, personally, strongly advise towards PHP - it will save you a lot fo
time, unless you are going to write something more complex than PHP allows
you to do. 

In the latter case you may look on mod_perl + DBI/DBD - it's very powerful
tool, though you'll have to learn a bit. It is faster, than CGI, too, and
adds you the unlimited power of Perl - if you know Perl, of course :)

P.S. you could write Russian too.
frodo@sharat.co.il      \/  There shall be counsels taken
Stanislav Malyshev      /\  Stronger than Morgul-spells
phone +972-3-9316425    /\              JRRT LotR.
http://sharat.co.il/frodo/      whois:!SM8333

=               Apache-Talk@lists.lexa.ru mailing list                      =
Mail "unsubscribe apache-talk" to majordomo@lists.lexa.ru if you want to quit.
=       Archive avaliable at http://www.lexa.ru/apache-talk                 =


Copyright © Lexa Software, 1996-2009.