Jump to content

CGI versus mod_php


Recommended Posts

I am on a server that uses PLESK as its Control Panel.

I have a need for a single subdomain to be able to use the exec() call from a PHP script.

In PLESK I can only do this if I set the subdomain to use Fast_CGI or CGI versions of PHP, and not Apache mod_php.

What are the pros and cons of CGI variants, especially for Ip.Board?

Link to comment
Share on other sites

mod_php - fastest php handler. Problem is extremely resource intensive due to how apache loads it for everything, even if it's not needed. Another problem is unable to do suexec (ie run php under separate users) causing security issues on shared environment.

su_php - similar to mod_php but slower and more resource intensive. But able to run via suexec. This is the default and recommended option for shared hosting providers.

cgi - sucks. No need to consider this.

fast_cgi - A serious improvement to cgi by featuring shared libraries and basic resources. Should only consider this if fcgi is not available.

fcgi - basically same as fast_cgi, but even newer and made to be better than fast_cgi. But the entire cgi line has an issue of completely separated processes with no sharing of data for caches. See below relevant thread for details.

Relevant thread:

http://community.invisionpower.com/topic/397358-to-cache-or-not-to-cache-and-how-to-cache/

But!!!

As to your original stated problem of not being able to call exec() under mod_php. That makes no sense to me. mod_php should have no issues with exec function calls. Are you saying you want only that single subdomain to be able to call exec function and no one else?

Link to comment
Share on other sites

Thanks. I didn't phrase the question well. When using PLESK + mod_php, a 'feature' in the PLESK product means that every domain+sub domain use the same /etc/php.ini as the first loaded, and can include changes via additional php.ini's. But in PLESK using FastCGI, they are all able to use different versions of a parent php.ini.

The php disable_functions parameter that prevents use of exec() MUST be in the parent php.ini, it cannot be included. So exec() permissions would have to switched on for all mod_php users just to satisfy the needs of this single subdomain.

Thus the 'engineering' of PLESK is my challenge, rather than mod_php itself. I've raised this with PLESK!

It appears though that you recommend FastCGI anyway?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...