Can't get remote files via PHP / hosts file won't sync

After updating Local and restarting my Mac, file_get_contents() returns an error.
Also, my hosts file appears to need a sync, but clicking on the link to sync does nothing.

Versions: Local 6.4.2+6012 on MacOS 11.6, hosting a WordPress multisite (subdomains). Mac firewall set to “off”.

Was working fine previously. Updated to new version of Local then restarted my Mac. Now, calls to file_get_contents() functions fail.

I get the following errors:

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

   file_get_contents(): Failed to enable crypto

   file_get_contents(**redacted valid URL**): failed to open stream: operation failed

To try to fix it, I deleted the existing SSL certificate, generated new certificate, set to always trust. Now shows “Trusted” in Local dashboard, and the lock does show when viewing pages.

However, the PHP errors still appear and the function calls are not working, so this did not fix the problem.

Also, since this is a multisite, I tried to “Sync MultiSite domains to hosts file” for my “subdomains” site, but nothing seems to happen when I click on that.

(I wonder if these things are somehow related?)

This site with the existing codebase worked before updating Local and restarting my computer. Any ideas?

Hi @kerri - thanks for using Local! I’m sorry you’re running into issues.

This is when trying to access a file on your machine, or elsewhere via internet/network? Sorry, I’m not familiar with that method. Where did you see the “Sync MultiSite domains to hosts file” option?

I’m going to see if I can recreate this. In the meantime, it would be helpful to narrow down the issue to see if it started in Local 6.4.2 or if it is unrelated to the version. Could you install the previous release - Releases - Local - and try again to see if the issues resolves? Thanks!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.