PHP error_reporting per directory with htaccess

Finally figured it out how to set custom error_reporting in specific directory without changing the global configuration, this prevents me from forgetting setting it back.
This is useful when I need to hack something in Joomla or other older CMS 😛

Just add the following line into .htaccess:

php_value error_reporting 6135

For figuring out the suitable integer for your needs check


Author: Michal Zuber

Full stack developer, biker and rollerblader. Owner and developer at Co-founded Blog at

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s