This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
computers:php_wisdom [2015/03/25 08:06]
daniel [PHP Wisdome]
computers:php_wisdom [2015/04/19 21:57] (current)
daniel [PHP Wisdome] suPHP_ConfigPath & php.ini recursive
Line 2: Line 2:
 PHP Pearls below ... enjoy. PHP Pearls below ... enjoy.
 Security/​safety first https://​www.owasp.org/​index.php/​PHP_Security_Cheat_Sheet Security/​safety first https://​www.owasp.org/​index.php/​PHP_Security_Cheat_Sheet
 +====== Make PHP.INI Recursive ======
 +Php.ini files are not recursive, and can override the global php directives in the same folder only, not the sub-folders. ​ However, htaccess files are recursive. ​ To make php.ini recursive, you can set the path to php.ini in one master htaccess by ''​suPHP_ConfigPath'',​ often in same folder as the php.ini:
 +In .htaccess file
 +suPHP_ConfigPath /​home/​user/​public_html
 +In php.ini file in the folder stated in the suPHP of htaccess write the needed directives you need to be recursive, for example setting timezone or limits for upload file size, memory, and execution times. ​ See http://​php.net/​manual/​en/​ini.list.php
 +<code php>
 +date.timezone = "​America/​Los_Angeles"​
 +upload_max_filesize = "​15M"​
 +post_max_size = "​15M"​
 +memory_limit = "​128M"​
 +max_execution_time = "​30"​
 ===== folder/file names ===== ===== folder/file names =====