Knowledgebase
Portal Home > Knowledgebase > Scripting (HTML, PHP, Perl/CGI) > What is suPHP? What is being changed from phpsuexec to suPHP? How to use php4 or php5 on JCW Hosting shared server?
What is suPHP? What is being changed from phpsuexec to suPHP? How to use php4 or php5 on JCW Hosting shared server?
| suPHP is a tool for executing PHP scripts with the permissions of their owners. Currently our servers use phpsuexec which also executes PHP with the permission of their owners. However these are two different tools and there are some improvements with moving to suPHP.
Once suPHP is available on your server, you can login to your control panel and find a link 'PHP Configuration' under 'Software/Services'. On that page
1. You can switch your account's php to php4 or php5
2. You can read how to configure php and how suPHP works.
Changes from phpsuexec to suPHP:
1. By default php CLI is php5. Here are the paths for your reference:
/usr/bin/php (php5 cgi) /usr/local/bin/php (php5 cli) /usr/php4/bin/php (php4 cgi) /usr/local/php4/bin/php (php4 cli)
2. There are some significant improvments in suphp such as
- HTTP based authentication auth works via php
- symbolic links to php files also work
- permissions of public_html does not need to be changed for using shared SSL with php5
- Custom error pages will work with both php4 and php5
3. ionCube PHP Loader will be available server wide alongwith Zend Optimizer. If you use custom php.ini you will need to update it by downloading it from your control panel so that latest Zend Optimizer can load for your scripts as well.
4. If you are setting up custom php settings, the custom php.ini file will be required in a folder where the php script needs to execute. Or you can place php.ini anywhere and have this directive in public_html/.htaccess
suPHP_ConfigPath /home/username/php5-config
where username is your cpanel account username, and php5-config is just a folder name (you can name it anything) and it will pick php.ini from that folder. Yes, you can have php.ini outside of your webroot in suPHP. This is a new feature.
5. To activate php5 on a subfolder or in your whole account, this directive was added in .htaccess in phpsuexec
AddHandler application/x-httpd-php5 .php .php3 .phtml
or a variant of it. Now this must be proceeded by the marker comment to block cpanel from changing your settings:
# Use PHP5 as default AddHandler application/x-httpd-php5 .php .php3 .phtml
Or if you use control panel to activate php5 (upgraded servers), then you do not need to manually add the above directive.
Other updates
1. For semi-dedicated clients, ffmpeg will be available via both php4 and php5.
2. mod_gzip is being installed as well on all servers.
|
Add to Favourites
Print this Article
|
Also Read