Skip to content

ini_set('error_log') sets filepath outside open_basedir #6197

@mvorisek

Description

@mvorisek
Contributor
Q A
PHPUnit version 12.1.0-now
PHP version unrelated
Installation Method Composer

Summary

introduced in #6127 & #6118

merged as 3f275eb

/cc @staabm

Current behavior

Time: 00:00.573, Memory: 8.00 MB
1 test triggered 1 PHP warning:
1) /builds/mvorisek/atk4-hintable/vendor/phpunit/phpunit/src/Framework/TestCase.php:1290
ini_set(): open_basedir restriction in effect. File() is not within the allowed path(s):
    (/builds/mvorisek/atk4-hintable:/tmp)
Triggered by:
* Mvorisek\Atk4\Hintable\Tests\Core\MethodTest::testMethodName
  /builds/mvorisek/atk4-hintable/tests/Core/MethodTest.php:13
OK, but there were issues!
Tests: 151, Assertions: 463, Warnings: 1.

How to reproduce

Run phpunit with open_basedir configured.

repro code: https://github.com/mvorisek/atk4-hintable-mirror/tree/dde63a7362f2aacacf1e91b8fda2ea6adcb0bcc9

(but it seems it is not related with https://github.com/mvorisek/atk4-hintable-mirror/blob/dde63a7362f2aacacf1e91b8fda2ea6adcb0bcc9/tests/Core/MethodTest.php#L13 specific test, the test name in the report is there as it is the 1st one executed)

Expected behavior

no error

Activity

staabm

staabm commented on May 10, 2025

@staabm
Contributor

Could you PR a small reproducer of the problem as PHPT test?

mvorisek

mvorisek commented on May 11, 2025

@mvorisek
ContributorAuthor

@staabm can I have your review on #6208?

changed the title [-]`ini_set('error_log'` sets filepath outside `open_basedir`[/-] [+]`ini_set('error_log')` sets filepath outside `open_basedir`[/+] on Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething is brokenversion/12Something affects PHPUnit 12

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sebastianbergmann@staabm@mvorisek

        Issue actions

          `ini_set('error_log')` sets filepath outside `open_basedir` · Issue #6197 · sebastianbergmann/phpunit