{"record":{"id":"cd6cbb4d050c645e","repo":"symfony/process","slug":"unable-to-read-ini","errorCode":null,"errorMessage":"Unable to read ini: ","messagePattern":"Unable to read ini: ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"PhpSubprocess.php","lineNumber":111,"sourceCode":"    }\n\n    private function writeTmpIni(array $iniFiles, string $tmpDir): string\n    {\n        if (false === $tmpfile = @tempnam($tmpDir, '')) {\n            throw new RuntimeException('Unable to create temporary ini file.');\n        }\n\n        // $iniFiles has at least one item and it may be empty\n        if ('' === $iniFiles[0]) {\n            array_shift($iniFiles);\n        }\n\n        $content = '';\n\n        foreach ($iniFiles as $file) {\n            // Check for inaccessible ini files\n            if (($data = @file_get_contents($file)) === false) {\n                throw new RuntimeException('Unable to read ini: '.$file);\n            }\n            // Check and remove directives after HOST and PATH sections\n            if (preg_match('/^\\s*\\[(?:PATH|HOST)\\s*=/mi', $data, $matches, \\PREG_OFFSET_CAPTURE)) {\n                $data = substr($data, 0, $matches[0][1]);\n            }\n\n            $content .= $data.\"\\n\";\n        }\n\n        // Merge loaded settings into our ini content, if it is valid\n        $config = parse_ini_string($content);\n        $loaded = ini_get_all(null, false);\n\n        if (false === $config || false === $loaded) {\n            throw new RuntimeException('Unable to parse ini data.');\n        }\n\n        $content .= $this->mergeLoadedConfig($loaded, $config);","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/symfony/process/blob/99b85026db14a68f02c6f3eeb01a1170ca25c491/PhpSubprocess.php#L93-L129","documentation":"Thrown from PhpSubprocess::writeTmpIni when one of the discovered php.ini files cannot be read with file_get_contents (unreadable or removed since discovery). The resulting error message includes the failing file path.","triggerScenarios":"Thrown at PhpSubprocess.php:111 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the php.ini files referenced are readable by the current user","Pass an explicit $php/ini setup avoiding inaccessible ini files","Verify permissions on the loaded ini files (php --ini lists them)"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"99b85026db14a68f02c6f3eeb01a1170ca25c491","analyzedAt":"2026-09-14T11:23:33.683Z","contentChangedAt":"2026-09-14T11:23:33.683Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}