Using custom php.ini in a specific folder Using custom php.ini in a specific folder apache apache

Using custom php.ini in a specific folder


add an htaccess file to the dir with the rule php_flag display_errors on


In complement to @i_forget answer: You can use the php_admin_value & php_value & php_flag & php_admin_flag directives to alter specific settings on a Virtualhost or on a directory.

<Directory /path/to/foo>    php_value       include_path   ".:/var/www/foo/lib:/usr/share/php5/apc"    php_admin_flag  file_uploads   on    php_admin_value upload_tmp_dir "/my/tmp/upload/"</Directory>

php_admin_value is safer than php_value (idem for flag) as the application cannot use ini_set to alter the value.

Here's it's one a Directory tag, so it could be as well on a .htaccess but you should'nt use .htaccess files if you have access to the configuration, use AllowOverride None :-). It could be as well on the VirtualHost, so before the the Directory tag.