0

I have an instance of a php site that requires a script running behind an https link on the intranet for my company. The https link is using a self-signed cert. I have tried updating the cacert.pem to allow it but I still get the following:

Warning: require(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed 

If I were using cURL I would just bypass the ssl on this request but with require I cannot.

Any ideas?

  • The argument to `require` isn't usually a URL, it's a local filename. Accessing a PHP script through a webserver normally runs the script and returns the output, it doesn't return the script code, which is what `require` needs. – Barmar Apr 21 '20 at 20:58
  • What @Barmar said. Is the required file executing on the remote webserver? If so then why no just curl it? – AbraCadaver Apr 21 '20 at 20:59
  • Yes it is on a remote server but the production version is not. According to php require documentation a URL is just as valid, I am just trying to get a round the self-signed certificate error on my dev environment. – phoenixpinpoint Apr 21 '20 at 21:03
  • "If I were using cURL I would just bypass the ssl on this request" Whatever the problem is this is never the adequate solution. – Patrick Mevzek Apr 22 '20 at 01:26

0 Answers0