How To Enable WHM Apache PHP SuExec

By default PHP on WHM/Cpanel is loaded as DSO (Dynamic Shared Object) module and is run by the user “nobody” by default. Though this method of loading the PHP module is normally the fastest way to serve PHP request, running it as using user “nobody” will be a real pain in the ass if you are serving multiple sites run by multiple users, you will be for sure run into file permission problems.

This is where the SuExec comes in play, every executed PHP scripts will be executed by the user who owns the VirtualHost that is server the request, this method has a lot of drawbacks too on both speed and security.

Anyway, if you still want to enable it then read on below.

1. Login to your Web Host Manager as root account then under the Service Configuration menu, look for the “Configure PHP and SuExec” and click on it.

WHM Cpanel Service Config


2. On the “Configure PHP and SuExec” page, under “alter configuration” section, look for the PHP handlers and then change its values to “cgi” and then set the Apache SuExec to On. (by default the value is on)

WHM Cpanel SuExec

3. Finally, click on “Save new configuration” button and wait til the Apache server restarted and your done.

To verify that SuExec is working as intended, try to upload a file or create a folder using an upload file script on PHP.

That’s all about it.

Permalink • Print • Comment

Trackback uri

http://seoroot.com/blog/computing/how-to-enable-whm-apache-php-suexec.html/trackback

Related Entries

3 Comments on How To Enable WHM Apache PHP SuExec »

dglite @ 1:30 pm:

This had been very helpful, you are a genius, thanks or sharing, geetings from Argentina!!!

Master @ 5:41 pm:

Man, thanks for writing this great tutorial. Now my PHP script is working fine… I wasted almost a day with my hosting company to fix issues with PHP Suexe!

Is there any security problem with this fix?
Thanks :)

Dave @ 7:51 pm:

Thank you guys. I just got a VPS server and your site rocks.

This info helped me configure my server so Wordpress is not asking anymore for FTP access.

Cheers

Leave a Comment