I have recently upgraded to PHP 8 on Azure which replaced Apache2 with NGINX. I am now experiencing a lot of issues.
I am trying to write to a path inside of Laravel based on the files contents:
\Illuminate\Support\Facades\File::append($path, request()->file('file')->get());
I see this error on larger files:
Illuminate\Contracts\Filesystem\FileNotFoundException File does not exist at path.
If I dd the request()->file('file') I see the following:
Illuminate\Http\UploadedFile {#4194
-test: false
-originalName: "blob"
-mimeType: "application/octet-stream"
-error: 1
#hashName: null
path: ""
filename: ""
basename: ""
pathname: ""
extension: ""
realPath: "/home/site/wwwroot/public"
aTime: 1970-01-01 00:00:00
mTime: 1970-01-01 00:00:00
cTime: 1970-01-01 00:00:00
inode: false
size: false
perms: 00
owner: false
group: false
type: false
writable: false
readable: false
executable: false
file: false
dir: false
link: false
}
The error is thrown on the ->get(). This tells me that the file is not saving correctly to the /tmp directory PHP is using. To this effect, I altered my nginx configuration to contain the following:
client_max_body_size 100M;
I restarted nginx so the changes would take effect but I still recieve this error.
Is there something I need in my php.ini or configure inside of Azure?
If I upload a file of 45368 bytes it works fine, if I upload one with 278712 bytes it works fine, if I upload one with 5712115 I get the error.
Any help appreciated.