Have a Question?

Categories

How to use suPHP on my webspace

You are here:
< All topics
Table of contents

What is the suPHP?

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.

Works with the PHP versions available in the PHP version option on the cPanel interface.

If you don’t want to use the default PHP version under on your domain name, you need to create a .htaccess file in a particular domain name assigned to a folder (document_root) will be placed into one of the following lines. After setting recursively, all sub-directories will be applied to the setting.

PHP version 4.4:

AddHandler application/x-httpd-suphp44 .php .php5 .php4 .php3

PHP version 5.1:

AddHandler application/x-httpd-suphp51 .php .php5

PHP version 5.2:

AddHandler application/x-httpd-suphp52 .php .php5

PHP version 5.3:

AddHandler application/x-httpd-suphp53 .php .php5

PHP version 5.4:

AddHandler application/x-httpd-suphp54 .php .php5

PHP version 5.5:

AddHandler application/x-httpd-suphp55 .php .php5

PHP version 5.6:

AddHandler application/x-httpd-suphp56 .php .php5

PHP version 7.0:

AddHandler application/x-httpd-suphp70 .php .php5

PHP version 7.1:

AddHandler application/x-httpd-suphp71 .php .php5

PHP version 7.2:

AddHandler application/x-httpd-suphp72 .php .php5

PHP version 7.3:

AddHandler application/x-httpd-suphp73 .php .php5

PHP version 7.4:

AddHandler application/x-httpd-suphp74 .php .php5

The module enabled per PHP version is a global setting, but you can change your php.ini settings with a .php.ini file placement. Starting with PHP 5.4 version, you can put a .user.ini file, each of which can override PHP settings for that folder (and its subdirectories).

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we correct this article?
Please submit the reason for your vote so that we can improve the article.
Tags:
Previous How to redirect my site from HTTP to HTTPS?
Next URL redirect/rewrite using the .htaccess file