Per https://secure.php.net/manual/en/migration56.incompatible.php#migration5..., as of PHP 5.6, OpenSSL verifies SSL certificates by default. This can cause "Error opening socket" errors when using Background Process, caused by underlying (but muted) errors like:

stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

I observed this on a host with an SSL certificate that is widely accepted as valid by major browsers so the problem is not limited to truly invalid certificates. The problem does not exist on PHP 5.5.

Comments

jdleonard created an issue. See original summary.

jdleonard’s picture

The attached patch blindly disables SSL cert verification. A RTBC patch would probably provide a setting to toggle this behavior.

jdleonard’s picture

Issue summary: View changes
reinier-v’s picture

Status: Needs work » Needs review
StatusFileSize
new1.88 KB

Here's another patch, providing the toggle in the most central way (background_process_http_request()) and providing configuration.

amme’s picture

patch works for me.

amme’s picture

Status: Needs review » Reviewed & tested by the community
reinier-v’s picture

@gielfeldt, could you apply this on the 1.x branch and release it ?
Thanks.

alexdmccabe’s picture

Just wanted to add that the patch in #4 worked for me as well.

  • gielfeldt committed 1ef3e17 on 7.x-1.x authored by reinier-V
    Issue #2670068 by jdleonard, reinier-V: Error opening socket over SSL on...
gielfeldt’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.