Php download https picture error Failed to enable crypto

file_get_contents download a https image with the following error

Warning: file_get_contents (): Failed to enable crypto

failed to open stream: operation failed in

openssl extension and fopen url have been opened in php.ini

check that it is turned on correctly in phpinfo

    $arrContextOptions=array(
        "ssl"=>array(
            "verify_peer"=>false,
            "verify_peer_name"=>false,
        ),
    ); 
    // return file_get_contents($url);
    return file_get_contents($url, false, stream_context_create($arrContextOptions));
    

using this code is also invalid, but this error is still reported

Php
Apr.02,2022

Certificate error. Try specifying the certificate, download the certificate in the program accessible directory

$options = [
    "ssl" => [
        'cafile' => "/path/to/file/cacert.pem", // cacert.pem
    ]
];
return file_get_contents($url, false, stream_context_create($options));
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bdc802-31305.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bdc802-31305.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?