Jump to content

Search the Community

Showing results for tags 'error log'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Whenever there's a PHP or MySQL error on my production site, I want the error to be logged in a file. I have found a file called error_log in my site's root folder containing previous PHP and MySQL errors, so error logging is already working. But I want to understand how and why it's working. I checked my php.ini file: error_reporting = E_ALL & ~E_NOTICE display_errors = On display_startup_errors = Off ; Log errors into a log file (server-specific log, stderr, or error_log (below)) ; As stated above, you're strongly advised to use error logging in place of ; error displaying on production web sites. log_errors = On; ; Set maximum length of log_errors. In error_log information about the source is ; added. The default is 1024 and 0 allows to not apply any maximum length at all. log_errors = On; ; Log errors to specified file. error_log = error_log; ; Log errors to syslog (Event Log on NT, not valid in Windows 95). error_log = error_log; Question 1 How can there be two each of log_errors = On and error_log = error_log? Question 2 Will errors be logged in the error_log file no matter what, or do I have to use die()/trigger_error() in my code? In other words, if my database is down, will all of these lines log errors? mysql_query("SELECT * FROM `table` WHERE date IS NULL"); mysql_query("SELECT * FROM `table` WHERE date IS NULL") or die(mysql_error()); mysql_query("SELECT * FROM `table` WHERE date IS NULL") or trigger_error(mysql_error()); Question 3 If I put E_USER_ERROR in trigger_error(), will only that type of errors be logged?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.