Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 php speed. mod php5 or cgi php?
Google
Post new topic Reply to topic
Author Message
DeliriumServers
 
 


Joined: 20 Feb 2006
Posts: 13
Location: H Town

PostPosted: Fri Mar 17, 2006 2:21 am Reply with quoteBack to top

Which is faster php through mod php5? or through cgi? Based on the default install I would guess mod php5 is faster, but I just wanted to make sure, thanks.
View user's profileSend private messageSend e-mailAIM AddressMSN Messenger
Vlad Alexa Mancini
lead developer
lead developer


Joined: 07 Jul 2003
Posts: 1539

PostPosted: Sat Mar 18, 2006 4:15 pm Reply with quoteBack to top

thanks you for this question , i seldomly get to explain something on these forums that is not in a manual

Ok , apache has 2 mechanisms for providing access to a external compiler :
1 - Dynamic Shared Object (DSO) , a apache module for the compiler is loaded on apache startup
2 - Common Gateway Interface (CGI) , apache queries the compiler executable each time it is requested to

Unanimously DSO is the preferred way from two major considerations , performance and security.

First off , with CGI apache has to start a new instance of the compiler for each request , given some simultaneous requests the performance is highly impacted

Second off with CGI the compiler startup overhead is on a per-request basis , as opposed with only on apache startup in the case of DSO , which also impacts performance

Finally , CGI because of it's design has some major security implications especially on shared servers where scripts runned on the server do not come from a trusted source
View user's profileSend private message
DeliriumServers
 
 


Joined: 20 Feb 2006
Posts: 13
Location: H Town

PostPosted: Sun Mar 19, 2006 3:15 am Reply with quoteBack to top

thanks, I really appreciate getting a clear reply, especially from the devoloper of the app suite. Thanks! mod_php will continue to speed along on my server Very Happy
View user's profileSend private messageSend e-mailAIM AddressMSN Messenger
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT