Open mrraindrop555 opened 2 months ago
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
That's always a permissions issue. If that's where you want your temp directory to be, make sure your php.ini has upload_tmp_dir=C:\Windows\Temp
.
We're not really IIS experts here, but this might help: https://stackoverflow.com/questions/16488834/unable-to-create-a-temporary-file-while-uploading
Stack OverflowWhile trying to upload a file using a form and PHP/IIS 7, I get this message: PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0 My form: <form action="
Debug mode
Describe the bug
I am hosting a Snipe-IT application on IIS and encountered an issue when attempting to upload temporary files (e.g., images). The relevant directory C:\Windows\Temp has the correct permissions set for the IUSR, but the file upload fails with the following error:
PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0
Error Logs: Here’s what I found in the log file: `[2024-09-05 05:23:43] production.ERROR: Symfony\Component\Mime\Exception\InvalidArgumentException: The "" file does not exist or is not readable. in D:_My_Folders\Applications\Folders\SnipeIT\vendor\symfony\mime\FileinfoMimeTypeGuesser.php:44 Stack trace:
0 D:_My_Folders\Applications\Folders\SnipeIT\vendor\symfony\mime\MimeTypes.php(123): Symfony\Component\Mime\FileinfoMimeTypeGuesser->guessMimeType('')
...
[2024-09-05 05:23:43] production.ERROR: The "" file does not exist or is not readable. {"userId":1,"exception":"[object] (Symfony\Component\Mime\Exception\InvalidArgumentException(code: 0): The \"\" file does not exist or is not readable. at D:\_My_Folders\Applications\Folders\SnipeIT\vendor\symfony\mime\FileinfoMimeTypeGuesser.php:44) [stacktrace]
0 D:\_My_Folders\Applications\Folders\SnipeIT\vendor\symfony\mime\MimeTypes.php(123): Symfony\Component\Mime\FileinfoMimeTypeGuesser->guessMimeType('')
... `
Additional Information:
Reproduction steps
Expected behavior
The application should be able to create and handle temporary files successfully, allowing the image upload process to complete without errors.
Screenshots
No response
Snipe-IT Version
7.0.11
Operating System
Windows
Web Server
IIS
PHP Version
8.3.4
Operating System
Windows
Browser
Chrome, Edge
Version
No response
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
Additional context
No response