Security Verified
Browse Categories
 Affiliates
 Backup & Restore
 Billing & MyAccount FAQs
 Control Panels
 Customer Tools
 Databases
 Dedicated Servers
 DNS and Domain Registration
 Email
 Glossary
 Network
 News
 PCI Compliance
 Postmaster
 Pre-sales FAQ
 Publishing Your Site
 Reseller Tips
 Search Engine Optimization
 Security Topics
 SSL and HTTPS
 Support: Getting Help
 Virtual Desktops
 Virtual Servers
 Website Design & Development
 Website Errors

DotNetNuke Hosting
SQL 2008 R2 / IIS 7.5 Hosting
WordPress Hosting
Forex Trader Hosting
Personal Desktop Hosting

Using a custom php.ini - PHP on Linux

Article ID: 728

 Back to Search

This articles provides information on using a custom PHP.ini file on your PHP based site hosted on 3Essentials Linux hosting plans.  For information on this topic for Windows hosting plans, please see Using a custom php.ini - PHP on Windows.

If you place a php.ini file into your website root, PHP will automatically find it and use it.  However, due to the fact we use suPHP, any PHP code existing in lower folder will not use that php.ini by default due to a difference in the inheritence of php.ini when suPHP is involved.  You can modify this behavior by placing the following entry into your .htaccess file at your website root.  Once in place, all PHP executed anywhere on your site will utilize the php.ini in your website root:

  • If on 3Essentials cPanel based servers:
    • your htaccess should go here: /home/username/public_html/.htaccess
    • and should contain these lines:
      • suPHP_ConfigPath /home/username/public_html
        <Files php.ini>
        order allow,deny
        deny from all
        </Files>

  • If on 3Essentials Plesk based WEB5 server: 
    • your htaccess should go here: /home/httpd/vhosts/domainname.com/httpdocs/.htaccess
    • and should contain these lines: 
      • suPHP_ConfigPath /home/httpd/vhosts/domainname.com/httpdocs
        <Files php.ini>
        order allow,deny
        deny from all
        </Files>

  • If on 3Essentials Plesk based WEB7 server:
    • your htaccess should go here: /var/www/vhosts/domainname.com/httpdocs/.htaccess
    • and should contain these lines:
      • suPHP_ConfigPath /var/www/vhosts/domainname.com/httpdocs
        <Files php.ini>
        order allow,deny
        deny from all
        </Files>

 
Downloads Associated With This Article
No downloads are currently associated with this article.

© 2001 - 2012 3Essentials Inc.
Terms Of Service | Privacy Policy | Copyright Policy | Affiliates