I have a problem. I'm using Bootstrap fileinput to upload 52 images with async AJAX requests. It uploads 90% of the files and randomly gives errors on few of the images.
This is the error:
SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO)
Upload function:
public function uploadTemp360(Request $request)
{
$image = $request->file('view360s');
$fileName = $image->getClientOriginalName().'.'.$image->getClientOriginalExtension();
$path = public_path().'/uploads/temp/';
if ($image->isValid()){
$image->move($path, $fileName);
}
return [
'initialPreview' => [
"<img style='height:160px' src='/uploads/temp/".$fileName."' class='file-preview-image'>",
],
'initialPreviewConfig' => [
['caption' => $fileName, 'width' => '120px', 'url' => route('admin.products.delete-temp-360'), 'key' => $fileName, 'size' => \File::size($path.$fileName)],
],
'append' => true,
'filename' => $fileName,
];
}
I don't know what's going on and how is it causing DB error by running this code...
I have found in laravel log this error:
production.ERROR: exception 'RuntimeException' with message 'The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.'