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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:32:24+00:00 2026-05-28T19:32:24+00:00

I am creating a PHP application and I want to display the number of

  • 0

I am creating a PHP application and I want to display the number of times an error has occurred. The problem that I am trying to figure out is if an error has already been reported or if its new using the following values:

  1. Message (ie: Attempted to divide by zero.)
  2. Stack trace (ie: at componentNETapp.Form1.btnTrackExceptionsUn_Click(Object sender, EventArgs e) …)
  3. Source (ie: componentNETapp)
  4. Target site (ie: Void btnTrackExceptionsUn_Click(System.Object, System.EventArgs))

Thanks

  • 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-28T19:32:24+00:00Added an answer on May 28, 2026 at 7:32 pm

    First of all Errors or Exceptions? PHP differs between errors and exceptions. Generally the Error Handling and Logging­Docs section of the manual might be of interest.

    For Errors:

    error_get_last­Docs will return the last error with the following information: Type (integer), Message (string), File (string) and Line (integer). I would say this is self explanatory. You might also want to look into set_error_handler­Docs which will – next to these four bits of information – also offer you an error context you could make use of.

    If you need more information about an error, there is also the backtrace in PHP debug_backtrace­Docs which can add even more context.

    For Exceptions:

    Each Exception­Docs has similar members: Message (string), Code (integer), File (string) and Line (integer). It also has a Trace which contains more information and could be used as context. It’s also possible to set a previous exception to nest exceptions. Like the the error handler, it’s possible to use an exception handler as well: set_exception_handler­Docs.


    With the information given, you should be able to handle and log all errors/exceptions in a manner that you can analyse them later on. Next to that it’s also possible to make use of PHP error logging and to store those errors into a database. See Outputting all PHP errors to database not error_log for a simple example. I would say the key point is that you store the error information in a more or less normalized form, so that you can define criteria later on how to count/group them.

    If you’re looking for more infrastructure, take a look into the apache logging services project that offers some tools (e.g. a viewer) and a PHP logger exists for it, too (log4php).

    But this is just exemplary, other tools exist as well, some of them are using a MySQL backend and you can not only track PHP but also other errors.

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

Sidebar

Related Questions

I'm working on an online PHP application that has a need for delayed PHP
I'm creating an application that I want to run on either MySQL or SQL
I am creating application in facebook using iframe. In that i want to redirect
I'm creating a new PHP application and want to make sure I get the
I am creating an intranet application in php that is running on a client's
I am creating a php/mysql application for a university project and I am looking
I am creating a poll script for a facebook fan page: http://www.facebook.com/apps/application.php?id=115400635147687&v=app_115400635147687 I am
i am creating rss reader application with php.it is basicly getting rss url's from
I am creating a login system for a web application using PHP. My question
I am part of a team creating a web application using PHP and MySQL.

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.