Skip to content

CpuCoreCounter access files outside open_basedir #4147

@mvorisek

Description

@mvorisek

Steps to reproduce

run the most simplest analyse command

vendor\phpstan\phpstan\phpstan analyse src tests

which currently shows

Warning: is_file(): open_basedir restriction in effect. File(/proc/cpuinfo) is not within the allowed path(s): (...basic;C:\data\temp) in phar://...basic/vendor/phpstan/phpstan/phpstan/src/Process/CpuCoreCounter.php on line 17
Fatal error: Uncaught TypeError: fgets() expects parameter 1 to be resource, null given in phar://...basic/vendor/phpstan/phpstan/phpstan/src/Process/CpuCoreCounter.php:29

Expected output

analyser runs successfully

PS: what is the reason to not distribute src directly? One very strong reason do to so is very easy modification/debug like this. Please consider or link issue if already discussed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions