Hi,
I have an application that works perfectly in development. But, in production for all cached operation, I'm getting this error message :
SQLSTATE[HY000] [2026] SSL connection error
This is how I configured my cache :
//Set the models cache service $di->set('modelsCache', function() {
//Cache data for one day by default
$frontCache = new \Phalcon\Cache\Frontend\Data(array(
"lifetime" => 86400
));
//Memcached connection settings
$cache = new \Phalcon\Cache\Backend\Memcache($frontCache, array(
"host" => "localhost",
"port" => "11211"
));
return $cache;
});
I know the cache is working on the server cause I made this little test and it's working :
<?php $memcache = new Memcache; $memcache->connect("localhost", 11211); # You might need to set "localhost" to "127.0.0.1" echo "Server's version: " . $memcache->getVersion() . "<br />\n"; $tmp_object = new stdClass;
$tmp_object->str_attr = "test";
$tmp_object->int_attr = 123;
$memcache->set("key",$tmp_object,false,50);
$stat = $memcache->getExtendedStats();
echo "Store data in the cache (data will expire in 10 seconds)<br />\n";
echo "<pre>";
print_r($stat);
echo "Data from the cache:<br />\n";
print_r($memcache->get("key"));
?>
Any help ?
Thx