AcceleratorCacheBundle icon indicating copy to clipboard operation
AcceleratorCacheBundle copied to clipboard

PHP 5.6 and HTTPS

Open TeLiXj opened this issue 10 years ago • 2 comments

If you use this bundle with this combination don't work because SSL streams have been changed in PHP 5.6. You can read more in http://php.net/manual/en/migration56.openssl.php. In the bottom of this page you have the solution: disable verify peer.

<?php
            $streamContext = stream_context_create([
                'ssl' => [
                    'verify_peer'      => false,
                    'verify_peer_name' => false
                ]
            ]);
            $contents = file_get_contents('https://url', false, $streamContext);
?>

If you like I can create a pull request adding this to CacheClearerService, but not just now because I don't have time

TeLiXj avatar Dec 18 '15 02:12 TeLiXj

You can add this to your config.yml:

accelerator_cache:
    curl_opts:
        CURLOPT_SSL_VERIFYHOST: false
        CURLOPT_SSL_VERIFYPEER: false

kbond avatar Dec 18 '15 18:12 kbond

Oh, I misread, you aren't using curl... Is using curl an option?

kbond avatar Dec 18 '15 18:12 kbond