On Unix, it is possible to use your own php.ini. Possible reasons for using your own php.ini:
- If you need to use a certain php extension that isn't normally loaded by our default configuration
- If you need to change php options that aren't normally changeable via the .htaccess or .user.ini mechanism
There are some disadvantages when using your own php.ini:
- You lose the ability to select the php version via the control panel
- Any changes we made on the global php.ini will not be reflected on your site
- Changes you made to php.ini will not be applied instantly
1. Create a directory yourdomain.com/php
2. Create a php script wrapper: yourdomain.com/php/php-wrapper
exec /hsphere/shared/php53/bin/php -c /hsphere/local/home/youracct/yourdomain.com/php.ini "$@"
Replace php53 with the corresponding version that you wish to use. For example, for php 5.5, use "php55".
If you just want to load a custom php extension, there's no need to go with the whole shebang of having your own php.ini. You can still use the global php.ini and only instruct php to additionally load your extension like this:
exec /hsphere/shared/php53/bin/php -d extension=yourextension.so "$@"
3. Set the execute bit for this file chmod 755 yourdomain.com/php/php-wrapper
4. Create yourdomain.com/php/.htaccess
5. Create / edit yourdomain.com/.htaccess
AddType application/x-httpd-fastphp .php
Action application/x-httpd-fastphp /php/php-wrapper