Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect with TLS on PHP 7.4 #55

Open
danielnguyen1612 opened this issue Aug 14, 2024 · 0 comments
Open

Unable to connect with TLS on PHP 7.4 #55

danielnguyen1612 opened this issue Aug 14, 2024 · 0 comments

Comments

@danielnguyen1612
Copy link

Hi all, I'm trying to connect to Elasticahe Memcached with TLS on PHP 7.4. I already installed PHP extension which downloaded from AWS Console. But I am getting these errors (it does not happen with extension on PHP 8.2)

Fatal error: Memcached::createAndSetTLSContext(): Failed to create/set TLS context: Client cert and key must both be specified

These are my code for your reference

$client = new Memcached();
$client->addServers([
   ...
]);

$client->setOption(MemcachedDriver::OPT_USE_TLS, 1);
$client->createAndSetTLSContext([
    'hostname'             => '*.....',
    'skip_cert_verify'     => false,
    'skip_hostname_verify' => false,
]);

$client->set('test_memcached', 'memcached');

Thanks you in advanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant