Directory /usr/local/directadmin/data/users/*/php/ content to include into backups

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
15,366
Location
www.poralix.com
Hello,

Here is a guide: http://help.directadmin.com/item.php?id=183 (Setup a per-user php.ini to allow open_basedir with suPhp)

according to which we should add:

Code:
SetEnv PHP_INI_SCAN_DIR /usr/local/directadmin/data/users/|USER|/php/

First of all if to follow this we at a risk that an end-user can re-define PHP_INI_SCAN_DIR in .htaccess file and set it to whatever location:

Code:
SetEnv PHP_INI_SCAN_DIR /home/userbob/

To avoid it we need to put the directive between <Location />...</Location>, so it would look like this:
Code:
<Location />
        SetEnv PHP_INI_SCAN_DIR /usr/local/directadmin/data/users/|USER|/php/
</Location>

Please note suggested variant should be moved out <Directory...></Directory>. So please update the guide.


Secondly since we use /usr/local/directadmin/data/users/|USER|/php/ to store per-user php.ini not only with suPHP and with other PHP modes, I'd suggest to add its content into backup made at admin and reseller(?) level.
 
Martynas,

thank you for your suggestion.

It's not a good idea to use htscanner at all on shared hosting servers, as we use suPHP so not to allow to override limits, which can be changed in .htaccess if we install htscanner.

Unfortunately we still have users with PHP 5.2. Currently we use /home/userbob/php.ini which is protected with chattr. And a variant with /usr/local/directadmin/data/users/|USER|/php/ seems to be the best for now.
 
Back
Top