I'm building a php site and using MAMP pro on my mac.
I've got json.php echo'ing out some json when called directly, but when another script tries to call it using file_get_contents I get this error:
[26-Aug-2023 10:47:04 UTC] PHP Warning:
file_get_contents(../json.php?endpoint=Organisations&action=list): Failed to open stream:
No such file or directory in /Users/mymac/Sites/CKM/widgets/tenancy-picker.php on line 2
Is there a setting I need to change? I saw something about a php.ini setting but the thread was very old and it didn't indicate if I should find the right file and edit that or if there's a ux option to change it.
If I explicitly call it using the mamp URL I get this error message
Warning: file_get_contents(): SSL operation failed with code 1.
OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /Users/mymac/Sites/CKM/widgets/tenancy-picker.php on line 3