How to make the php.ini recursive in the .htaccess
The PHP settings defined in your php.ini file are not recursive. What this means is that they do not modify settings in any child folders (which are subdirectories of the current directory).
Let's say you have a php.ini file in your public_html folder. That php.ini file has the PHP memory_limit set to 256M. Only scripts that run directly in your public_html folder will have the memory_limit set to 256M. If you have a folder named public_html/employees, that "employees" folder will not be affected by the public_html/php.ini file, it would only be affected by a php.ini file located in its own folder, public_html/employees.
If you have many folders, creating a php.ini file for each folder would be quite tedious. What you can do is update your .htaccess to tell the server that the public_html/php.ini file should apply not only to public_html, but to any folders within that folder (such as public_html/employees or public_html/about-us).
Updating the suPHP_ConfigPath value in your .htaccess file
Making your php.ini file affect all child folders is referred to as making the file recursive. To make your public_html/php.ini file recursive, edit your public_html/ .htaccess file and add the following code:
This line you entered specifies the directory where the php.ini is located that you want to make recursive. Be sure to replace username with your hosting username.
This change is immediate, so you should see the update right away.
Fantastic...Thank you for your feedback =)
Sorry... Please submit a support ticket or try another search.
- How to change the default Index page in .htaccess
- Increase the File Upload size in php.ini
- How to show .htaccess (hidden files) with the File Manager
- How to change the PHP time zone using php.ini
- What is the .htaccess file?