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 803609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:47:14+00:00 2026-05-14T23:47:14+00:00

I am well aware about error_reporting(0); & ini_set(‘display_errors’, Off); to make error messages go

  • 0

I am well aware about error_reporting(0); & ini_set('display_errors', "Off"); to make error messages go away.

What would be an appropriate way to do this – for a specific file or part of code only?
Surpressing errors with @’s seems like a bad idea since it apparently slows the code down…

The reason? We have a number of memcached servers in a development LAN that is really unreliable due to the network settings, thereby we are recieving errors multiple times every hour and there’s nothing we can do about it except stop using memcache or turning off errors for the whole application, which would be giving us a headache – in the middle of the development stage 🙂

  • 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-05-14T23:47:15+00:00Added an answer on May 14, 2026 at 11:47 pm

    You’ve kind of answered your own question. To do it for a specific file, error_reporting(0); will turn off errors. You can also call it multiple times in a script, I think.

    You can also use php exceptions to ‘catch’ errors over a block of code. For example:

    try {
        // code to ignore errors for here
    } catch {
        // you can output a custom error here, but putting nothing here will effectively mean errors are ignored for the try block
    }
    

    The script will continue running past the try block, even if there is an error within it. See the PHP Manual Entry for more information.

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

Sidebar

Related Questions

I am well aware of PCI Compliance so don't need an earful about storing
First of all, this is not about the usefulness of microbenchmarks. I'm well aware
ok I am well aware there are many other questions about this, but I
I'm reading about Mongodb's indexes for my Mongodb project I am well aware that
First, let me state right off that I'm well aware that cursors are generally
I’m well aware of the Microsoft support base article stating that it’s not supported
While I am well aware that it isn't possible for me to refer to
Disclaimer I am well aware that PHP might not have been the best choice
Let me preface this by saying that I'm well aware that running user supplied
Edit: I'm well aware of that this works very well with value types, my

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.