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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:49:10+00:00 2026-06-11T02:49:10+00:00

I need PHP errors not to be displayed but logged. I am using PHP

  • 0

I need PHP errors not to be displayed but logged. I am using PHP 5.4 My current code to log errors in my php.ini is:

log_errors = 1
error_log = "/path-to-file/error_log.txt"

Which works however I am getting a 500 internal server error trying to turn error displaying off using display_errors. I have tried using the following, all returning 500 errors.

display_errors = 0
display_errors = "0"
display_errors = false
display_errors = "false"
display_errors = Off
display_errors = "Off"

According to the PHP documentation, as of PHP 5.4, it is a string. What am I suppose to set display_errors to to turn error displaying off?

  • 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-11T02:49:12+00:00Added an answer on June 11, 2026 at 2:49 am

    a 500 error code means there is an invalid server configuration. This is most likely coming from Apache and not from php.

    To get a clear understanding on what is giving you the error, look at your apache logs.

    If you wish to also hide the 500 error,
    you could open your httpd.conf file and add

    ErrorDocument 500 " "
    

    Then make sure to restart apache. Any time you make a config change to php.ini or httpd.conf you will need to restart apache for it to take into effect.

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

Sidebar

Related Questions

I need to write php code to identify common e-mail errors, like inbox full
I need to add new functionalities into /cake/libs/controller/pages_controller.php but I do not want to
The following PHP code is working as expected. I need to echo copy error
I need PHP code to replace comma or whitespace with hyphen For eg: If
I need a php code and sql code that will let someone upload an
I need to change the structure of the displayed client-side URL. I'm not too
I'll try and keep my sample code very straightforward, but it may have errors
I need to search a string in mysql with php. I get an error
I need a PHP script to decrypt the RSA encrypted string generated by this
I need a PHP Regex that can parse .strings files. In particular, it needs

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.