{"record":{"id":"053051340da2f761","repo":"krayin/laravel-crm","slug":"could-not-create-temporary-files-for-attachments","errorCode":null,"errorMessage":"Could not create temporary files for attachments. Your tmp directory may be un-writable by PHP.","messagePattern":"Could not create temporary files for attachments\\. Your tmp directory may be un-writable by PHP\\.","errorType":"exception","errorClass":"\\Exception","httpStatus":null,"severity":"error","filePath":"packages/Webkul/Email/src/Helpers/Parser.php","lineNumber":130,"sourceCode":"            || $meta['eof']\n        ) {\n            throw new \\Exception(\n                'setStream() expects parameter stream to be readable stream resource.'\n            );\n        }\n\n        $tmp_fp = tmpfile();\n\n        if ($tmp_fp) {\n            while (! feof($stream)) {\n                fwrite($tmp_fp, fread($stream, 2028));\n            }\n\n            fseek($tmp_fp, 0);\n\n            $this->stream = &$tmp_fp;\n        } else {\n            throw new \\Exception(\n                'Could not create temporary files for attachments. Your tmp directory may be un-writable by PHP.'\n            );\n        }\n\n        fclose($stream);\n\n        $this->resource = mailparse_msg_create();\n\n        // parses the message incrementally (low memory usage but slower)\n        while (! feof($this->stream)) {\n            mailparse_msg_parse($this->resource, fread($this->stream, 2082));\n        }\n\n        $this->parse();\n\n        return $this;\n    }\n","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/krayin/laravel-crm/blob/13d6988cda8d69ece45ee1890effc90a7f21cdc1/packages/Webkul/Email/src/Helpers/Parser.php#L112-L148","documentation":"Error \"Could not create temporary files for attachments. Your tmp directory may be un-writable by PHP.\" thrown in krayin/laravel-crm.","triggerScenarios":"Thrown at packages/Webkul/Email/src/Helpers/Parser.php:130 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"13d6988cda8d69ece45ee1890effc90a7f21cdc1","analyzedAt":"2026-08-17T00:58:29.000Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}