I am using a WIMP stack to host a server on an Amazon EC2 instance. Through a Backpack CRUD panel, users can upload an image or video. This image or video is supposed to be uploaded to an Amazon S3 bucket. The following code should handle this upload:
public function imageUploadPost(Request $request)
{
... // Validation of request
$imageName = time().'.'.$request->image->getClientOriginalExtension();
$image = $request->file('image');
$t = Storage::disk('s3')->put($imageName, file_get_contents($image), 'public');
$imageName = Storage::disk('s3')->url($imageName);
... // Return
}
When a file is submitted for upload, I encounter the following error:
Error executing "PutObject" on "https://'bucketname'.s3.'region'.amazonaws.com/'filename'"; AWS HTTP error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
I have downloaded the most recent cacert.pem, and included the path in my php.ini. The issue persists. Is this issue caused by using a WIMP stack instead of a WAMP stack? If so, would it be more efficient to refactor my server under a WAMP stack rather than force the WIMP stack to work?