On Tue, Dec 05, 2000 at 01:27:02PM +0400, [EMAIL PROTECTED] wrote: > hi. sorry for the off-topic post. i'm embarking on a journey > to be a web developer and would like to know if i should use > mod.perl or mod.php for cgi? i've searched and read alot of > faqs and so far they're all just howtos. the only conclusion i > can come up with is with php u can use it directly with html > (plus also call it from html code) whereas with perl the only > way u can use it is to call it from your html code. > > am i right with that assumption?
did you ever get a reply here? if not... mod_perl is perl that's joined-at-the-hip with apache. basically you have perl itself acting as yuor web server, so you have access to all your httpd.conf settings via perl code, and it zip along very very quickly. there are some major issues to be aware of, since the perl interpreter never quits (i.e. apache doesn't die at the end of a cgi script) so your mod_perl scripts have to be more careful about closing files, cleaning up globals and so forth. as for php, i'm not too up on that just yet, but there's no conflict i can see -- if php is the better tool for project X, use it; if mod_perl is better for project Y, use it instead. i don't think there's any reason you can't mix the two, either. cgi scripts, keep in mind, are taken to be files-on-disk that are executed by an interpreter at request time, whether written in perl, C or apl. :) mod_perl scripts are actually modifications to the behavior of your web server. embperl is perl-saturated html, which is basically a prefilter for perl cgi scripts. php is an apache-resident interpreter for php scripts, similar to mod_perl (i think). so to answer your first question -- a perl CGI script is effectively run by an interpreter external to your abache web server (not really, but much effort is put into making it seem that way). a mod_perl 'script' is a module that's embedded into the apache server itself, to make it dance and sing per your instructions. i think php is similar to mod_perl with different features and different syntax. use the best tool for the job at hand, i say. -- It is always hazardous to ask "Why?" in science, but it is often interesting to do so just the same. -- Isaac Asimov, 'The Genetic Code' [EMAIL PROTECTED] http://newbieDoc.sourceforge.net/ -- we need your brain! http://www.dontUthink.com/ -- your brain needs us!