Page tree
Skip to end of metadata
Go to start of metadata

Overview

suPHP is a PHP handler that consists of two parts:

  • mod_suphp – An Apache module that directs Apache to run the suphp program when Apache receives a PHP request.
  • suphp – A program that changes the owner that executes the PHP scripts. Apache executes each PHP script with the permissions of the owner of the request.

Usage

We recommend that you select suPHP as your PHP handler for the following reasons:

  • suPHP makes your PHP scripts server more secure.
  • suPHP allows you to identify which user runs each PHP script.

Warning:

  • If you select suPHP as your PHP handler, extensions that handle caching (such as EAccelerator and XCache) will not provide any benefits on your server.
  • Do not select suPHP as your PHP handler if you use ModRuid2 with the "EXPERIMENTAL: Jail Apache Virtual Hosts using mod_ruid2 and cPanel® jailshell. " option in the Security  tab of WHM's Tweak Settings interface (Home >> Server Configuration >> Tweak Settings).

Warning:

We no longer develop EasyApache 3 and only release security updates. We will deprecate EasyApache 3 on December 31, 2018. After that date, we will no longer update EasyApache 3. In cPanel & WHM version 78, we will remove support for EasyApache 3. For more information, read our cPanel Long-Term Support documentation.

We strongly recommend that you upgrade to EasyApache 4. For more information, read our Easy Apache 4 documentation. 

Featured documentation

  EasyApache 3

IntroductionFAQ

Change Log Release Notes  

ProfilesCustomization

Tomcat

Migrate from Tomcat 5.5 to 7

How to Deploy Java Applications

Important:

EasyApache 3 does not support Tomcat for new installations. EasyApache 4 does not support Tomcat and we do not plan to provide support in the future. 

How to install or uninstall suPHP

Module status in default profiles

The following EasyApache profiles include the mod_suphp Apache module by default:

  • Basic
  • Mod Ruid2

Note:

The Mod Ruid2 profile is only available if you do  not  use CloudLinux.

Installation steps

If your most recent EasyApache build does not include suPHP, perform the following steps to install suPHP:

  1. Navigate to WHM's EasyApache 3interface (Home >> Software >> EasyApache 3).

    Note:

    $body

  2. Select the profile that you wish to modify.

  3. Click the  icon that corresponds to your selection.

  4. Click Next Step in the Apache Version stage.
  5. Click Next Step in the PHP Version stage.
  6. Perform one of the following actions in the Short Options List stage:

    • To install the suPHP PHP handler, select Mod SuPHP.
    • To uninstall the suPHP PHP handler, deselect Mod SuPHP.
  7. Click Save and Build at the bottom of the Short Options List interface.
  8. After the EasyApache build completes, use the Configure PHP and suEXEC interface to set the PHP 5 Handler option to suphp.

If your most recent EasyApache build includes suPHP, perform the following steps to select suPHP as your PHP handler:

  1. In WHM's Configure PHP and suEXEC interface (Home >> Service Configuration >> Configure suPHP and suEXEC), set the PHP 5 Handler option to suphp.
  2. Click Save New Configuration.

How to enable or disable the module in a custom EasyApache profile file

The following table contains the module information that EasyApache stores in the profile file for the module:

EasyApache module namemod_suphp
EasyApache Profile EntryApache : optmods : PHPAsUser

To enable or disable the suPHP PHP handler in a custom EasyApache profile file, set the Apache : optmods : PHPAsUser profile entry to one of the following values:

  • 1 – This value enables the suPHP PHP handler in the profile.
  • 0 – This value disables the suPHP PHP handler in the profile.

Requirements

PHP

suPHP requires PHP. If you do not install PHP, suPHP will not function.

Compatibility

This module has no known compatibility issues.

History

DateEasyApache versionActionDetails
7/16/20143.26.0EA updateCase 68701: Update suPHP to version 0.7.2
2/11/20143.24.11Doc updateRemoved Apache 1.3 and 2.0
5/1/20123.12.3EA updateCase 57958: switching mod_ruid2+DSO to suPHP results in PHP sites no longer functioning
12/28/20113.8.1EA updateCase 53894: Patch mod_suphp for mod_ruid2 compatibility

Related documentation 

Vendor documentation

The following text is an excerpt from the suPHP project homepage:

suPHP is a tool for executing PHP scripts with the permissions of their owners. It consists of an Apache module (mod_suphp) and a setuid root binary (suphp) that is called by the Apache module to change the uid of the process executing the PHP interpreter.

For more information on the suPHP PHP handler, click the following link:

Apache versionDocumentation
2.2 and 2.4suPHP Homepage