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

  • SEARCH
  • Home
  • 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 7937471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:32:01+00:00 2026-06-03T22:32:01+00:00

We recently upgraded a server from PHP4 to PHP5.4 There is an application running

  • 0

We recently upgraded a server from PHP4 to PHP5.4

There is an application running that is logging a lot of errors in the log file. Most of them are deprecated errors, or some minor things due to the change in PHP versions.

I don’t have time to fix all the problems right now, but the error_log file has ballooned to 10G in just a few days.

In php.ini I set
log_errors = Off

What else can I do ?

  • 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. Editorial Team
    Editorial Team
    2026-06-03T22:32:02+00:00Added an answer on June 3, 2026 at 10:32 pm

    It depends on which errors you want to report, if any. If you don’t want any errors to be reported (bad idea, I think), go with:

    error_reporting(0);
    

    At the top of the script.

    If you only want to turn off the deprecated errors, you would need to use some bitwise operators using the predefined error constants. I believe the following would work and fit what you have in mind:

    error_reporting(E_ALL ^ (E_DEPRECATED & E_STRICT & E_NOTICE))
    

    This would still leave in fatal errors and catchable errors, (2 of those 3 will halt the script so they are good to catch), but leave out the “your script is old” type errors.

    It is also possible to send the less desired errors to another error log, so that they can be dealt with later, but not clog the main error log. Ask if interested.

    Quick Edit:

    Because E_STRICT is not included in E_ALL, the above would turn on E_STRICT (which is only confusing when we assume that ALL means, well, all of them (all bits flipped). So this would produce the desired result of the those three errors being turned off:

    error_reporting(E_ALL ^ (E_DEPRECATED & E_NOTICE))
    

    or, to eat my words on the comment on zuul’s answer, this would also work (though the logic hurts my head):

    error_reporting(E_ALL & ~(E_DEPRECATED | E_STRICT | E_NOTICE))
    

    Also, since you mentioned Apache specifically, you should know that you can’t use the predefined error constants outside of a PHP script, you have to use the actual bitmask values. In this case, you would add the following to the config or htaccess file:

    php_value error_reporting 22519
    

    I’m not finding anywhere in the documentation where bitwise operations are supported in this scenario, so if you wanted to tweak the error_reporting level, you could simply create a php script with the following:

    echo E_ALL & ~(E_DEPRECATED | E_STRICT | E_NOTICE);
    

    Which will output the decimal form of that bitmask to use (obviously changing the constants to match what you want to turn off).

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

Sidebar

Related Questions

I recently upgraded my server running CentOS 5.0 to a quad-core CPU from a
Fairly exotic it seems to me. We recently upgraded/migrated from Windows Server 2003 to
I have recently upgraded from websphere 5.1.2 to websphere 6.1 server. I had some
Our dev server was recently upgraded to PHP v5.2.13. With that upgrade we have
I recently upgraded a web server from IIS6 to IIS7 for a classic asp
I recently upgraded my subversion server from 1.4.6 to 1.6.11. The repos all seem
I've recently upgraded a page on our server from classic asp to asp.net The
Recently I upgraded a couple of CruiseControl.NET server from version 1.3 to version 1.4.2.14.
All - I have recently upgraded our production environment from Sql Server Reporting Services
At work we recently upgraded from Microsoft SQL Server 7 to SQL 2005. The

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.