New to Ubuntu but have some RHEL experience. On a fresh 22.04 install attempting to pull a file using:
php -r "copy('https://somesite.com/file.txt', 'mylocalfile.txt');"
I get the following error:
PHP Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages:
error:0A0000:SSL routines::certificate verify failed in Command line code on line 1
PHP Warning: copy(): Failed to enable crypto in Command line code on line 1
PHP Warning: copy('https://somesite.com/file.txt', 'mylocalfile.txt');: Failed to open stream: operation failed in Command line code on line 1.
This happens with any site. I tried downloading the server cert and placing it in /etc/ssl/certs/ca-certificates but no luck. I'm also getting similar errors when trying to do https file downloads.
I can use wget with --no-check-certificate but I need to get it to work without bypassing security. I'm assuming this is an easy fix but being new to Ubuntu is making it more complex than it should be.
