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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:09:44+00:00 2026-05-27T22:09:44+00:00

Occasionally I will have some badly formed PHP code and I will get a

  • 0

Occasionally I will have some badly formed PHP code and I will get a 500 error. I’m running Apache 2.2 on a Windows 7 laptop. As an IDE I have started using PhpStorm.

What is the best way to catch these errors and be informed of the line number?
Why do the OOP-related syntax errors tend to throw 500 errors and function problems tend to return normal errors?

Example of syntax mistake: calling a static method from a class with a single colon instead of two colons.

UPDATE:
Please see accepted answer and all comments.

  • 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-27T22:09:45+00:00Added an answer on May 27, 2026 at 10:09 pm

    PHP will respond with a “500” when it encounters a Fatal error, such as E_PARSE, E_ERROR and uncaught exceptions. 500 is the HTTP response code for “Internal Server Error” – something unrecoverable happened while processing the request.

    In your php.ini, on a development machine, you should set your error_reporting level to (at least) E_NOTICE – preferably E_ALL – and make sure display_errors is on. This will show you the error message in the browser, including for “500” errors.

    You can also check your Apache error logs, the errors will be listed there, as long as log_errors is enabled in php.ini. By default, this will be at <apache_ServerRoot>\logs\error.log.

    You can also control all this at run time with ini_set() and error_reporting()

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

Sidebar

Related Questions

I'm writing some documentation that will occasionally include C# or C++ code snippets. In
Occasionally, on a ASP (classic) site users will get this error: [DBNETLIB][ConnectionRead (recv()).]General network
I have some code in which I'm worried I'll occasionally exceed write-rate limits. Is
I have some functions which occasionally (not always) will receive a callback and run
I have a batch file that calls various commands, some of which will occasionally
We have built a Windows Service that is running on client's machines, which occasionally
I have a table of transactions which will occasionally have duplicate entries. If/When an
Occasionally working in Windows Vista the O.S. will desaturate the screen, rendering all colors
Occasionally in our lab, our postgres 8.3 database will get orphaned from the pid
I'm working with PHP and have got the error logging turned on and turned

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.