Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
rct2·com Posted February 10, 2014 Posted February 10, 2014 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?
Grumpy Posted February 11, 2014 Posted February 11, 2014 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?
rct2·com Posted February 11, 2014 Author Posted February 11, 2014 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?
Grumpy Posted February 11, 2014 Posted February 11, 2014 It appears though that you recommend FastCGI anyway? Seems like that's your only choice given the requirements.
rct2·com Posted February 11, 2014 Author Posted February 11, 2014 I can hack the PLESK configuration if necessary. I am root. Appreciate anything further you have to say on pros and cons of each.
Makoto Posted February 16, 2014 Posted February 16, 2014 If you're not restricted by PLESK, you should be using PHP-FPM.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.