Urgent.News

What's breaking now, across thousands of outlets.

Tech

Activate WP_DEBUG and read debug.log without breaking the site in production

A site that crashes without saying anything is a site that is hiding the answer from you. WordPress knows about it, it simply refuses to display it, and this is intentional: showing a PHP trace to your visitors would reveal your file paths and software versions. There is a setting that writes the error to a file instead of displaying it. That's the one you need, not the other one. The three constants, and…

Translated from French Read in French

WordPress has a setting that writes errors to a file instead of displaying them, which is crucial for debugging issues without revealing sensitive information to visitors. To enable this, users must define three constants in wp-config.php: WP_DEBUG, WP_DEBUG_LOG, and WP_DEBUG_DISPLAY. The WP_DEBUG_DISPLAY constant is often overlooked but is essential in production, as it prevents errors from being displayed on the site.

The debug log file, located in wp-content/debug.log, can grow indefinitely and potentially expose sensitive information, so it should be deleted after use.

Written by urgent.news from Dev.to's report — not a translation of it. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

BOLA, the #1 API Vulnerability: a One-Line Fix and an A-B Test in Go and PHP

An invoicing application exposes an API : web addresses, or URLs, that other programs call to read or change invoices. Bob is logged in with his account.

  • BOLA (Broken Object Level Authorization) ranks as top API vulnerability in 2023
  • Fix involves single line of code checking user ownership of invoice
  • Test requires two accounts: one to create invoice, another to access it expecting 404

Data center health worries animate midterm campaigns

Opposition to the rapid emergence of data centers in states such as Ohio and Arizona has ginned up activism and unified voters. A range of public health issues have played into the resistance.

  • Doug Herrera fears data center may harm health due to uranium mining.
  • City Council approved land sale for data center, awaiting zoning.
  • Midterm elections highlight contentious issue in Arizona's 1st Congressional District.

More from Thursday 29 October →