XF 1.5 ErrorException: tempnam(): file created in the system's temporary directory - library/XenForo/Model/Attachment.php:499

Hey guys, I've updated php version to 7.1 on my server and Server Error Log is full with this error exception. Here is a screenshot of the error


Please help me get rid of this error exception.
Last edited:


XenForo developer
Staff member
This is really just indicating that XF can't write to the internal_data/temp directory that should be there. You should check permissions on that directory and ensure it's writable.
@Mike, thanks for your response.

/temp directory was not existing there inside of /internal_data directory. I created it and set the permissions 777 on it. The issue got resolved for uploads but now the same error exception is being logged when trying to access media i.e; on Media Index page, New Media page etc.

I'm using [bd]DataStorage, [bd]AttachmentStorage and Xen Media Gallery on my forum. Also, I'm using s3 storage on my server.

Here is a screenshot for new instance of the error exception

Error Exception.png


XenForo developer
Staff member
That errors is from within [bd] Attachment Storage. You'll need to contact the author for guidance.