On Tuesday 01 April 2003 9:59 pm, Paul Kraus wrote: > Is one more efficient then the other. > > My hesitation with perl (I would like to use is as I already know the > language) is that coming from a windows environment perl scripts do not > like to run quickly and having a web server getting hammered and a > 10,000 processing having to kick off seems to me it have really slow > down the server. Is php faster then perl (when called from apache or > IIS) ?
Hi Paul, Joseph has already covered the choice of platform, an opinion I agree with. However, to answer the Perl/PHP speed question for you, you need to understand how they work. The PHP interpreter is loaded as an apache module when the process is started. It is therefore immediately available to process the PHP pages. When apache needs to run a Perl CGI it has to fork/exec/load (or the windows equivelent) the perl interpreter and then perl has to compile your script before it can be run. This obviously increases dramatically the startup time. However, it does mean that you script is running in a compiled form with the implicit speed improvement that that gives. Personally, I have found very little difference in speed between Perl CGI's and PHP but none of my sites have enough traffic to make it an issue. There are also ways of getting round the speed problems with Perl. Apache supports mod_perl which is a way of embedding the perl interpreter into apache and pre-load/compiling scripts. In this way the scripts are immediately available for use. (Note: I've never personally used mod_perl so I can't give help on it's use). Gary > > -----Original Message----- > From: Dan Muey [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 01, 2003 10:02 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: Php perl? > > > Is perl used to compliment PHP or is perl better to use by > > itself instead of php? How does one relate to the other. I am > > coming from a asp.NET vp.NET .asp vb background and am trying > > to get away form M$. So I am looking at apache php and perl > > Apache serves the web pages whether those are html, text, perl, php, > etc... > > What you'll find about perl and php people is that they strongly guard > 'their language' as the best. I don't find it as bad in the perl > community but the php community will > swear up and down how Bad perl is and how much better php is. > > In my experience and HO Perl is much more flexible and useful and easy > to expand. PHP is a bloated little sucker that I've found an irritation > to deal with on our Servers. Any problems we've had to deal with on our > server were all regarding php. > ( Even Qmail had a breezy installation and configuration ) > > When a user says, "Hey can you add this to php" it's a stinking > nightmare but when someone Says "hey I could use this modules" it takes > the better part of twenty seconds to install it. > > You'll probably hear PHP people talk about how great PHP works with > MySql and how super > it is at sending Mail and generating images. That one has always > confused me because if you look at cpan there's Tons of stuff for > databases, email, and images, and about anythign else you can think of. > > So to sum it up :: > Try both, use whichever you like. > In my experience as a system administrator Perl has been much > more useful and easy to use, JMHI. > Be wary of the way PHP people rip on Perl. > ( if you have to brag about it or put others down it's > not as big as you make it out to be, no? ) > > I already saw a post describing what they were so I won't get into that. > > Oh yeah , the .NET stuff I almost forgot. Perl has all kinds of modules. > I've never done .NET myself so I'm not sure about it ( check > http://search.cpan.org ) but there are all kinds of other web service > stuff. I've used SOAP and WSDL stuff and It works nicely with other > clients/servers in other languages. > > Hope that helps > > DMuey > > > trying to figure out how all the pieces fit together. > > > > To show you my ignorance I thought php and apache where the same thing > > > > :) > > > > Paul -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]