{"id":572,"date":"2013-12-11T15:23:55","date_gmt":"2013-12-11T15:23:55","guid":{"rendered":"http:\/\/vickistan.com\/?p=572"},"modified":"2013-12-19T14:24:24","modified_gmt":"2013-12-19T14:24:24","slug":"overriding-php-ini-values-locally","status":"publish","type":"post","link":"https:\/\/vickistan.com\/?p=572","title":{"rendered":"Overriding php.ini values locally"},"content":{"rendered":"<p>php directives are listed here: http:\/\/www.php.net\/manual\/en\/ini.list.php<\/p>\n<p>Modes determine when and where a PHP directive may or may not be set. This is explained here: http:\/\/www.php.net\/manual\/en\/ini.list.php<\/p>\n<p>A virtual host may be configured to use a local php.ini file in place of the system one. The local one would override the entire system php.ini file in this case. Do this as follows:<\/p>\n<p>copy the php.ini file to a local directory such as \/var\/www\/vhosts\/mydomain.com<br \/>\nadd the following to the virtual host file:<\/p>\n<p>PHPINIDir \/var\/www\/vhosts\/mydomain.com<\/p>\n<p>You could simply make your changes in an .htaccess file, if your host doesn&#8217;t allow you to touch the php.ini file or you want to change only a few values leaving the values in php.ini as default, manage changes in a local .htaccess file:<\/p>\n<p>For reference, the proper lines for an .htaccess file would have to be prepended with php_values as follows:<\/p>\n<p>php_value suhosin.post.max_vars 100000<br \/>\nphp_value suhosin.request.max_vars 100000<br \/>\nphp_value memory_limit 128<\/p>\n<p>Note: php_flag and _php_value can be written in httpd.conf for FastCGI, but not in .htaccess file. if PHP is running as module, you can do anything with .htaccess<\/p>\n<p>Still another way to do it is to use PHP\u2019s native ini_set() function.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>php directives are listed here: http:\/\/www.php.net\/manual\/en\/ini.list.php Modes determine when and where a PHP directive may or may not be set. This is explained here: http:\/\/www.php.net\/manual\/en\/ini.list.php A virtual host may be configured to use a local php.ini file in place of &hellip; <a href=\"https:\/\/vickistan.com\/?p=572\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-572","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=572"}],"version-history":[{"count":2,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/572\/revisions"}],"predecessor-version":[{"id":577,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/572\/revisions\/577"}],"wp:attachment":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}