Skip to content

Remove the track_errors directive from the PHP 8.3 and 8.4 images - #539

Open
mangeshraut712 wants to merge 2 commits into
sclorg:masterfrom
mangeshraut712:fix-track-errors-84-83
Open

mangeshraut712 wants to merge 2 commits into
sclorg:masterfrom
mangeshraut712:fix-track-errors-84-83

Conversation

@mangeshraut712

@mangeshraut712 mangeshraut712 commented Nov 28, 2026 •

Copy link
Copy Markdown

Problem

track_errors was removed in PHP 8.0. #458 dropped it from the 8.0, 8.1 and 8.2 images, but the 8.3 and 8.4 images were added afterwards from the older template and still carry it:

  • s2i/bin/run exports TRACK_ERRORS (default OFF)
  • php.ini.template renders it as track_errors = ${TRACK_ERRORS}
  • README.md still documents TRACK_ERRORS as a supported variable

Because the README documents it, a user can reasonably set TRACK_ERRORS=ON in .s2i/environment. The container then fails on startup:

PHP Fatal error:  Directive 'track_errors' is no longer available in PHP in Unknown on line 0

Fixes #357.

Change

Same change as #458, applied to 8.3 and 8.4. Pure deletion, 6 files, -38 lines:

File (per version) Lines
README.md -3 (the TRACK_ERRORS bullet)
root/opt/app-root/etc/php.ini.template -15 (both track_errors blocks)
s2i/bin/run -1 (the TRACK_ERRORS export)

This matches #458's result in 8.0 and 8.2: no TRACK_ERRORS entry remains in the README, the template or run. (An earlier version of this description claimed #458 left orphaned README lines. That was wrong; the 8.0 and 8.2 READMEs are clean.)

Verification

I rendered the 8.3 and 8.4 templates the way s2i/bin/run does (substituting the environment variables, with TRACK_ERRORS=ON), then loaded each resulting php.ini with the official CLI images:

Template php:8.3-cli (8.3.37) php:8.4-cli (8.4.28)
before (this branch's base) exit 1, Directive 'track_errors' is no longer available exit 1, same
after (this PR) exit 0, starts cleanly exit 0, starts cleanly

Also checked:

  • bash -n passes on both edited s2i/bin/run scripts; the executable bit is unchanged.
  • The default path (TRACK_ERRORS unset) still starts, and other settings from the template still apply (display_errors=1, memory_limit=128M).
  • The lines missing from the rendered php.ini are exactly the 15 deleted lines; nothing else in the file changes.

Not verified

I could not run the full container-tests.yml suite locally, since it builds the RHEL/UBI images on a Linux container host. The verification above uses the stock php CLI images rather than the assembled S2I images.

Made with Cursor

Summary by CodeRabbit

  • Documentation
    • Removed references to the deprecated PHP error-tracking setting and its environment variable from the documentation and configuration guides.
  • Chores
    • The application no longer sets or exports a default for that environment variable.

The track_errors ini directive was removed in PHP 8.0. PR sclorg#458 dropped
it from the 8.0, 8.1 and 8.2 images, but 8.3 and 8.4 were added later
from the older template and still carry it:

  - s2i/bin/run exports TRACK_ERRORS (default OFF)
  - php.ini.template renders it to "track_errors = ${TRACK_ERRORS}"
  - README still documents TRACK_ERRORS as a supported variable

With TRACK_ERRORS=ON in .s2i/environment the container therefore fails
at startup:

  PHP Fatal error: Directive 'track_errors' is no longer available in PHP

Reproduced with the 8.3 and 8.4 templates rendered the way s2i/bin/run
does (TRACK_ERRORS=ON) and loaded by php:8.3-cli (8.3.37) and
php:8.4-cli (8.4.28); both exit 1 before this change and start cleanly
after it.

Same change as sclorg#458, applied to 8.3 and 8.4. The whole README bullet is
removed rather than only its title line, so no description is left
orphaned under DISPLAY_STARTUP_ERRORS.

Fixes sclorg#357

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PHP 8.3 and 8.4 container configurations remove the TRACK_ERRORS environment variable export and the track_errors php.ini setting. Their READMEs and php.ini templates also remove related documentation.

Changes: TRACK_ERRORS removal

Layer / File(s) Summary
Remove configuration and documentation
8.3/s2i/bin/run, 8.3/root/opt/app-root/etc/php.ini.template, 8.3/README.md, 8.4/s2i/bin/run, 8.4/root/opt/app-root/etc/php.ini.template, 8.4/README.md
Both startup scripts remove the TRACK_ERRORS export. Both php.ini templates remove the track_errors setting and documentation. Both READMEs remove the environment variable entry.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: phracek, hhorak

Merge Risk: Minimal · up to b70d0

Merge Risk: ⚪ Minimal · up to b70d0

This removes the obsolete TRACK_ERRORS setting from the PHP 8.3 and 8.4 images so PHP no longer fails to start when it is set. No remaining references were found in those images. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: removing the track_errors directive (TRACK_ERRORS support) from the PHP 8.3 and 8.4 images. The summary shows the README, php.ini.template, and s2i/bin/run changes for both…
Linked Issues check Passed Issue #357 requires the PHP ini template to stop using the removed track_errors directive, which causes a PHP startup error. The PR removes the track_errors blocks (-15 lines) from 8.3/root/opt/app-ro…
Out of Scope Changes check Passed All changes in the PR remove TRACK_ERRORS support from the 8.3 and 8.4 images: the README bullet, the track_errors template blocks, and the TRACK_ERRORS export in s2i/bin/run. Each change directly imp…
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names the change: removing the track_errors directive (TRACK_ERRORS support) from the PHP 8.3 and 8.4 images. The summary shows the README, php.ini.template, and s2i/bin/run changes for both versions all remove TRACK_ERRORS handling, so the title matches the main change. The title is specific and concise.

Full details: Linked Issues check

Explanation

Issue #357 requires the PHP ini template to stop using the removed track_errors directive, which causes a PHP startup error. The PR removes the track_errors blocks (-15 lines) from 8.3/root/opt/app-root/etc/php.ini.template and 8.4/root/opt/app-root/etc/php.ini.template, removes the TRACK_ERRORS export from both s2i/bin/run scripts, and removes the README entries. The PR description reports that rendered 8.3 and 8.4 templates with TRACK_ERRORS=ON failed on php:8.3-cli and php:8.4-cli before the change and started cleanly after it. The PR summary matches this. Caveat: a repository read of the head 8.3 and 8.4 templates was truncated at 16000 bytes before the Error handling section, so the absence of track_errors in those files is established from the diff summary and PR description, not from a complete file read. The issue does not name 8.0 to 8.2 images in scope of this PR; the PR description states those were already cleaned up in #458. No non-coding acceptance criteria exist in #357.

Full details: Out of Scope Changes check

Explanation

All changes in the PR remove TRACK_ERRORS support from the 8.3 and 8.4 images: the README bullet, the track_errors template blocks, and the TRACK_ERRORS export in s2i/bin/run. Each change directly implements the removal required by #357. The change set contains no other files according to the whole-PR summary (6 files, -38 lines). The removal of the full README bullet rather than only its title line is a documentation choice that stays within the same objective, so it is not out of scope. Caveat: the complete diff was not read in full, so this verdict relies on the whole-PR summary and PR description.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a84c9863-d33c-486d-91c8-9112b283a2e5
Commits

Reviewing files that changed from the base of the PR and between eb99b76 and 69e9a41.

Files selected for processing: 6

  • 8.3/README.md
  • 8.3/root/opt/app-root/etc/php.ini.template
  • 8.3/s2i/bin/run
  • 8.4/README.md
  • 8.4/root/opt/app-root/etc/php.ini.template
  • 8.4/s2i/bin/run
Files with no reviewable changes: 6

  • 8.3/README.md
  • 8.3/root/opt/app-root/etc/php.ini.template
  • 8.3/s2i/bin/run
  • 8.4/README.md
  • 8.4/root/opt/app-root/etc/php.ini.template
  • 8.4/s2i/bin/run

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Pull Request validation

Failed

🔴 Review - Missing review from a member (1 required)

Success

🟢 CI - All checks have passed


Triggered by Workflow Run

The previous commit says sclorg#458 "removed only the TRACK_ERRORS title line"
from the README and left its description orphaned. That is not true:
the 8.0 and 8.2 READMEs on master carry no TRACK_ERRORS entry at all.
The claim was read from the patch's context lines, not from the files.

No file changes. The diff against master is still the removal of
track_errors from 8.3 and 8.4 only.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mangeshraut712

Copy link
Copy Markdown
Author

Follow-up runtime verification on b70d02a8: I ran the PR’s actual S2I run script and php.ini template in the published UBI 9 PHP 8.3 and CentOS Stream 10 PHP 8.4 builder images, with TRACK_ERRORS=ON. Both started Apache and served a PHP page over HTTP (200); the response reported 8.3 and 8.4 respectively. The files were mounted from the PR commit into each image. This covers the configured startup path beyond the stock PHP CLI test; it does not exercise the full image build or cluster suite.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

track-errors got removed in php 8.0

1 participant