We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

ERROR: The file could not be written to disk.

Development and Programming

stereoi123's avatar
stereoi123
35 posts
one year ago
stereoi123's avatar stereoi123

Hello!

I am suddenly having an issue on multiple EE 7.5+ sites where, intermittently, random images cannot be uploaded and return the error: “The file could not be written to disk.”

This happens with File and File Grid fieldtypes in the CP Publish Entry form.

I have tried various combinations of disabling XXS filtering both in the CP and through Config Overrides. This does not change anything.

The only possible anomaly I see is when I check PHP Info in the CP, “upload_tmp_dir” says “no value.”

However, running echo sys_get_temp_dir() . PHP_EOL; in an independent .php file returns ‘/tmp ’ as expected.

There has been one instance where the client received the error on attempted upload, but I was able to upload the same file they emailed to me. This was not the case for a different file they had the same issue with.

Set Up:

  1. ExpressionEngine 7.5.5

  2. PHP 7.2 and 8.2

  3. Exif Enabled

  4. memory_limit: 768M

  5. post_max_size: 512M

  6. upload_max_filesize: 256M

I can FTP files to the upload Dir and sync the folders in the CP and that works fine, but kinda clunky. No way I can get one of these clients to do that.

Any help or insights would be much appreciated!

       
jelle's avatar
jelle
87 posts
one year ago
jelle's avatar jelle

I guess this is related to https://expressionengine.com/forums/topic/254110/cant-upload-1mb-file-in-control-panel-regardless-of-post-upload-size-ee-v-7.3.14-php-8.2 https://expressionengine.com/forums/topic/254108/ee7.5.5-xampp-file-manager-unable-to-upload-images-above-25kb https://expressionengine.com/forums/topic/254099/error-on-upload-to-channel-images-field https://github.com/ExpressionEngine/ExpressionEngine/issues/4600 https://github.com/ExpressionEngine/ExpressionEngine/issues/4503

       
Matt Johnson's avatar
Matt Johnson
14 posts
one year ago
Matt Johnson's avatar Matt Johnson

Would it be possible to pull this branch/make these changes to your site and try again?

https://github.com/ExpressionEngine/ExpressionEngine/pull/4628

       
abigailjohn's avatar
abigailjohn
3 posts
one year ago
abigailjohn's avatar abigailjohn

Thanks for your answer. I got it.

       
pammelala's avatar
pammelala
1 posts
one year ago
pammelala's avatar pammelala

Your support is invaluable. Thank you so much!

       
5BYFIVE Creative's avatar
5BYFIVE Creative
159 posts
one year ago
5BYFIVE Creative's avatar 5BYFIVE Creative

I got the same ““The file could not be written to disk.” error recently on a site that was previously working ok. I made the update Matt mentions above and it seemed to have fixed things. Thanks Matt!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.