Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 40435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:01:24+00:00 2026-05-10T15:01:24+00:00

I don’t want PHP errors to display /html, but I want them to display

  • 0

I don’t want PHP errors to display /html, but I want them to display in /html/beta/usercomponent. Everything is set up so that errors do not display at all. How can I get errors to just show up in that one folder (and its subfolders)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:01:24+00:00Added an answer on May 10, 2026 at 3:01 pm

    In .htaccess:

    php_value error_reporting 2147483647 

    This number, according to documentation should enable ‘all’ errors irrespective of version, if you want a more granular setting, manually OR the values together, or run

    php -r 'echo E_ALL | E_STRICT ;' 

    to let php compute the value for you.

    You need

    AllowOverride All 

    in apaches master configuration to enable .htaccess files.

    More Reading on this can be found here:

    • Php/Error Reporting Flag
    • Php/Error Reporting values
    • Php/Different Ways of Tuning Settings

    Notice If you are using Php-CGI instead of mod_php, this may not work as advertised, and all you will get is an internal server error, and you will be left without much option other than enabling it either site-wide on a per-script basis with

    error_reporting( E_ALL | E_STRICT );  

    or similar constructs before the error occurs.

    My advice is to disable displaying errors to the user, and utilize heavily php’s error_log feature.

    display_errors = 0 error_logging = E_ALL | E_STRICT  error_log = /var/log/php  

    If you have problems with this being too noisy, this is not a sign you need to just take error reporting off selectively, this is a sign somebody should fix the code.


    @Roger

    Yes, you can use it in a <Directory> construct in apaches configuration too, however, the .htaccess in this case is equivalent, and makes it more portable especially if you have multiple working checkout copies of the same codebase and you want to distribute this change to all of them.

    If you have multiple virtual hosts, you’ll want the construct in the respective virtual hosts definition, otherwise, yes

      <Directory /path/to/wherever/on/filesystem>        <IfModule mod_php5.c>          php_value error_reporting 214748364       </IfModule>   </Directory> 

    The Additional ‘ifmodule’ commands are just a safety net so the above problem with apache dying if you don’t have mod_php won’t occur.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.