Overiding php.ini settings

According to my PHP info file, register_long_arrays is set to off on the php.ini file, it seems I can override this setting in a htaccess file, using the following: php_flag register_long_arrays on. WHere on the servers directory would I need to place this, also what is the correct formatting etc needed for this file?


Such methods of overriding php settings will not work on Dreamhost, as it is running PHP as CGI. You can however, compile your own version of PHP, or use a customized php.ini file with Dreamhost’s installed PHP. Both procedures are explained in the DH wiki.

Note that these procedures are marked as being “advanced” and “unsupported”; DH tech support will not help you with this and will not bail you out if you screw up your site doing this. :wink:


Excellent. thanks for the help.

Now just to see if I can figure out how to use a custom php.ini file.

The easiest method is to simply copy one of the default DreamHost php executables and php.ini to your domain directory and configure .htaccess to use this local install. The procedure is detailed in the wiki article linked below. Note: This procedure does require a fairly good working knowledge of the shell.



Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)