1
votes

In my Laravel project, I am using the laravelgooglemaps api by farhanwazir on my "contact us" page to display a fixed location.

Route for contactus page:

Route::get('/contactus', function () {
      $config['center'] = 'California State University, Fullerton';
      $config['zoom']='15';
      $config['map_height'] = "300px";
      $config['map_width'] = "300px";
      $config['scrollwheel']= false;
      GMaps::initialize($config);
      $marker['position'] = 'California State University, Fullerton';
      $marker['infowindow_content'] = 'Easywash Centre';
      GMaps::add_marker($marker);
      $map = GMaps::create_map();
return view('contactus')->with('map', $map); });

In my contactus.blade.php file:

  {!! $map['html'] !!}

But sometimes when I load the "contact us" page I get the error:

ErrorException (E_WARNING) file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed

enter image description here

Can anyone help me understand why I am getting such error and how it can be solved?

2
Probably your issue is related to issuetracker.google.com/issues/67842936 - xomena

2 Answers

5
votes

Try this:

$arrContextOptions=array(
            "ssl"=>array(
                "verify_peer"=>false,
                "verify_peer_name"=>false,
            ),
        );
file_get_contents($link, false, stream_context_create($arrContextOptions));
-3
votes

Just in case anyone wondering I solved this error by changing https:// to http:// .