{"record":{"id":"ea94a149cf1eded4","repo":"Intervention/image","slug":"directory-dirname-contained-in-splfileinfo-is","errorCode":null,"errorMessage":"Directory \"{dirname}\" contained in SplFileInfo is not readable","messagePattern":"Directory \"(.+?)\" contained in SplFileInfo is not readable","errorType":"exception","errorClass":"Intervention\\Image\\Exceptions\\FileNotReadableException","httpStatus":null,"severity":"error","filePath":"src/Traits/CanParseFilePath.php","lineNumber":113,"sourceCode":"            throw new DirectoryNotFoundException(\n                'The directory \"' . $dirname . '\" contained in SplFileInfo does not exist',\n            );\n        }\n\n        if (!file_exists($path)) {\n            throw new FileNotFoundException(\n                'File \"' . $basename . '\" contained in SplFileInfo was not found in directory \"' . $dirname . '\"',\n            );\n        }\n\n        if (!is_file($path)) {\n            throw new FileNotFoundException(\n                'File \"' . $basename . '\" contained in SplFileInfo is no file in directory \"' . $dirname . '\"',\n            );\n        }\n\n        if (!is_readable($dirname)) {\n            throw new FileNotReadableException(\n                'Directory \"' . $dirname . '\" contained in SplFileInfo is not readable',\n            );\n        }\n\n        if (!is_readable($path)) {\n            throw new FileNotReadableException(\n                'File \"' . $path . '\" contained in SplFileInfo is not readable',\n            );\n        }\n\n        $realpath = $splFileInfo->getRealPath();\n\n        if ($realpath === false) {\n            throw new FileNotReadableException('Failed to read file \"' . $path . '\" from ' . SplFileInfo::class);\n        }\n\n        return $realpath;\n    }","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/Intervention/image/blob/5598b9e39751c34afc5cdee84abef77f92c26f68/src/Traits/CanParseFilePath.php#L95-L131","documentation":"Error \"Directory \"{dirname}\" contained in SplFileInfo is not readable\" thrown in Intervention/image.","triggerScenarios":"Thrown at src/Traits/CanParseFilePath.php:113 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the directory permissions (is_readable($dirname)) and fix with chmod/chown","Run the PHP process as a user that can read the directory","Verify the path is not inside a restricted location (open_basedir, container mount)"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5598b9e39751c34afc5cdee84abef77f92c26f68","analyzedAt":"2026-08-23T02:17:31.068Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}