Announcements
The Google Cloud Community will be in read-only from July 16 - July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

PHP Error: Unable to create temporary file. Check permissions in temporary files directory.

Hi,

I'm getting a completely unknown error message when I make at POST request with PHP8.2. The request is somewhat large but post_max_size is 32M so this shouldn't be a problem.

This is the message

 

PHP message: PHP Warning:  PHP Request Startup: Unable to create temporary file, Check permissions in temporary files directory. in Unknown on line 0; 

PHP message: PHP Warning:  PHP Request Startup: POST data can't be buffered; all data discarded in Unknown on line 0" while reading response header from upstream

 

Anyone have an idea what this could be?

Solved Solved
0 1 894
1 ACCEPTED SOLUTION

Turns out that adding this to the form tag solved the problem.

<form method="post" action="" enctype="multipart/form-data">

Still a bit weird, imo, since far for 32M data was sent.

View solution in original post

1 REPLY 1

Turns out that adding this to the form tag solved the problem.

<form method="post" action="" enctype="multipart/form-data">

Still a bit weird, imo, since far for 32M data was sent.