Skip to content

fix(windows): log PHP errors at the right level - #2839

Open
lazerg wants to merge 2 commits into
php:mainfrom
lazerg:fix/windows-php-log-levels
Open

lazerg wants to merge 2 commits into
php:mainfrom
lazerg:fix/windows-php-log-levels

Conversation

@lazerg

@lazerg lazerg commented Nov 14, 2026

Copy link
Copy Markdown

Fixes #2838.

On Windows, PHP's win32/syslog.h doesn't use the standard syslog priorities (LOG_ERR is 4, LOG_WARNING is 5, LOG_NOTICE and LOG_INFO are both 6), but go_log() reads them as standard values. So a fatal error was logged as warn and a warning as info. The log callback now maps the Windows values back to the standard ones before passing them to Go.

The new test runs on the Windows CI job and fails there without the fix.

@lazerg

lazerg commented Nov 14, 2026

Copy link
Copy Markdown
Author

The Linux test failures are not caused by this change. Other PRs have hit the same errors (memrchr in extgen, GLib abort) since Nov 12.

@dunglas dunglas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: PHP errors are logged one level too low

2 participants