Hosting Talk | Web Hosting talk India

Web Hosting   Add Host and Hosting News 


Go Back   Hosting Talk | Web Hosting talk India > Web Hosting Main Forums > Hosting Security and Technology > Hosting Security and Technology Tutorials


Thread Tools Display Modes
Old 06-22-2012, 11:59 AM
bullten bullten is offline
Junior Member
Join Date: Jun 2012
Posts: 12
Default Force User to Use Single php.ini

If you have a Dedicated Server or VPS and use it to sell shared hosting then this article is for you. Today I am going to explain how you can force your users to use same php.ini under suPHP by disallowing .htaccess override. Limiting php.ini use will add security to your server and will disallow users to use custom php.ini file by overriding default php settings set by server administrator (root).

How to make it work:

Its very simple to enable this function in server using suPHP. Just by enabling phprc_paths in /opt/suphp/etc/suphp.conf will do the work for you. See the steps below:

vi /opt/suphp/etc/suphp.conf
Find the code below and press I to insert text.

;Uncommenting these will force all requests to that handler to use the php.ini
;in the specified directory regardless of suPHP_ConfigPath settings.
Remove ( ; ) from the last three lines ie.

Now press ESCAPE button and enter :wq to save the file.

Restart Apache

/sbin/service httpd restart
Now Users wont be able to override your default php.ini file.

Article Source: Harden php.ini Security
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT. The time now is 01:49 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2019, SEO by YABBSEO 1.0 2012,