PDA

View Full Version : PHP and CPU resources


Rich
01-22-1999, 09:48 PM
Not considering any database usage, is PHP considered to be less, about the same, or more demanding of processing resources compared to Perl/CGI? Assume the same functionality is being implemented in the most efficient manner for each language.

Don't need in-depth analysis but I'm wondering if there is a difference, whether it is significant enough to make this a reason to seriously consider PHP.

Thanks


------------------
Rich

"What time is it in _____?"
www.timezoneconverter.com (http://www.timezoneconverter.com)

Terra
01-22-1999, 11:30 PM
PHP has a much lower overhead than Perl/CGI scripts, due to startup/teardown of perl/compile/execute/die...

But there is a bad side to PHP, only 1 that I've seen thus far... I cannot switch uid/gid with suEXEC like I can do for external CGI scripts...

e.g.
test.pl == runs as user/xdomain
test.php == runs as apache/apache (same as webserver)

Now - I have gotten around that limitation with PHP3 (burnt **many** brain cells with this one), but it will only be utilized for FQuest's internal use with the CNC modules, where uid/gid switching is a must-have requirement... Unfortunately the switching of PHP's uid/gid has it's own high overhead, but a tad less than Perl/CGI combination...

--
Terra
--Whom do I want to be today???--
FutureQuest