How to compile php as CGI via WHM? Currently running php as apache.

Smaily

Well-Known Member
Sep 19, 2011
46
0
56
cPanel Access Level
Root Administrator
I have php compiled as apache. How can I compile php as CGI and what shall I do? - Beginner on this.
May anything go wrong and could I reverse changes if it does? Eg need of backup before I do anything?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
I did want to ask why you would want to use CGI rather than either suPHP or FCGI? CGI is slower than suPHP and no more secure than it, while FCGI is faster than CGI and suPHP and FCGI is as secure. There is very little reason to use CGI any longer as the PHP handler in place of any of the other handlers that exist (suPHP, FCGI, DSO).
 

Smaily

Well-Known Member
Sep 19, 2011
46
0
56
cPanel Access Level
Root Administrator
I was told php as apache shall never ever be used because of vulnerabilities.
Php as CGI was supposed to be secure and less attack able.

Mainly had issues getting MySQL some kind of attacks against my server. Simply by running one website hackers were able to take down entire server by slowly growing it's resource usage. But at this point you might be right that suphp is good for permission protection and such attacks might not happen at all, I have started using it but yet still unsure if this will be enough or shall I move over to php as CGI.