Article ID: 113537, created on Mar 23, 2012, last review on May 10, 2014

  • Applies to:
  • H-Sphere

Symptoms

Sometimes it is necessary to apply custom PHP settings per single domain on H-Sphere Linux hosting.

Resolution

It is necessary to perform following actions:
1. Activate htscanner - it is easy because htscanner is already included in hsphere, but deactivated by default.

edit /hsphere/local/config/httpd/php5/php.d/htscanner.ini
or
edit /hsphere/local/config/httpd2/php5/php.d/htscanner.ini


Uncomment extension=htscanner.so line:

; Enable htscanner extension module
;extension=htscanner.so


2. Add the following lines to both htscanner.ini files:

[htscanner]
config_file=".htaccess"
default_docroot="/"
default_ttl=300
stop_on_error = 0


3. Add php value in user's .htaccess file

/hsphere/local/home/<username>/<domain_name>/.htaccess

with the following format (for example):

<IfModule mod_php.c>
php_value register_globals off
</IfModule>


4. Verify that setting applied:
- create phpinfo.php in domain root
- got to www.<domain_name>/phpinfo.php

f213b9fa8759d57bee5d547445806fe7 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF