Home Hosting Domains IT Services Support Contact Us
MyAccount PortalClient AreaAnnouncementsKnowledgebaseSupport TicketsDownloads

Knowledgebase
You are here: MyAccount Portal > Knowledgebase > Web Development & Coding > I've added a php.ini file as requested, but some of my variables do not work. What do I do?

I've added a php.ini file as requested, but some of my variables do not work. What do I do?

In order to get the values in your php.ini to be inherited by all the subdirectories, you will need to add the following lines to the .htaccess file in your public_html folder:

suPHP_ConfigPath /home/username/public_html
<Files php.ini>
order allow,deny
deny from all
</Files>

Note: Replace username with your cPanel username

This will make php look for a php.ini file in the public_html folder. It is important to leave off the trailing slash and to not specify a filename, the file must be called php.ini.  If you need different php settings in a particular folder, then simply place a php.ini file in that folder and it will override the main php.ini in the public_html folder.  The section ensures that no one can view the php.ini file from the internet.



Was this answer helpful?

Add to Favourites
Print this Article

Also Read


Network Status Client Area Knowledgebase Datacentre  
 
Terms of ServicePrivacy PolicyCustomer Security