Open andermarchi opened 7 years ago
What version of the module are you using? This should be fixed in the latest release.
I am using 0.7.10 (stable) with nignx v 1.10.2 with PHP 5.4.16 (fpm-fcgi)
This is the latest release https://github.com/nexcess/magento-turpentine/releases/tag/release-0.7.3
Magento connect shows that version number (0.7.10) as the latest stable.
Weird, if I go to https://www.magentocommerce.com/magento-connect/turpentine-varnish-cache.html and then to the M1 Extension Versions tab I can see 0.7.3 there
I have same error after update plugin ->
Failed to save the VCL file: Declaration of Nexcessnet_Turpentine_Model_Varnish_Configurator_Version4::_vcl_director_backend() should be compatible with Nexcessnet_Turpentine_Model_Varnish_Configurator_Abstract::_vcl_director_backend($host, $port, $descriptor = '', $probeUrl = '', $options = Array)
VCL successfully applied to: 127.0.0.1:6082
A configuração foi salva.
Can you open that file and post the declaration of the function in question please?
vcl 4.0; backend default { .host = "127.0.0.1"; .port = "8080"; }
sub vcl_recv { } sub vcl_backend_response { }
sub vcl_deliver { }
Sorry I meant this two Nexcessnet_Turpentine_Model_Varnish_Configurator_Version4::_vcl_director_backend Nexcessnet_Turpentine_Model_Varnish_Configurator_Abstract::_vcl_director_backend
I do not have much knowledge where I can find these files
I strongly recommend hiring a developer for this. If this is not possible for some reason, the files in question should be under app/code/community/Nexcessnet/Turpentine
Abstract.php :
/**
* Format a VCL backend declaration to put inside director
*
* @param string $host backend host
* @param string $port backend port
* @param string $probeUrl URL to check if backend is up
* @param array $options extra options for backend
* @return string
*/
protected function _vcl_director_backend($host, $port, $probeUrl = '', $options = array()) {
$tpl = <<<EOS
{
.backend = {
.host = "{{host}}";
.port = "{{port}}";
{{probe}}
EOS; $vars = array( 'host' => $host, 'port' => $port, 'probe' => '' ); if ( ! empty($probeUrl)) { $vars['probe'] = $this->_vcl_get_probe($probeUrl); } $str = $this->_formatTemplate($tpl, $vars); foreach ($options as $key => $value) { $str .= sprintf(' .%s = %s;', $key, $value).PHP_EOL; } $str .= <<<EOS } } EOS; return $str; }
Version4.php :
/**
* Format a VCL backend declaration to put inside director
*
* @param string $host backend host
* @param string $port backend port
* @param string $descriptor backend descriptor
* @param string $probeUrl URL to check if backend is up
* @param array $options extra options for backend
* @return string
*/
protected function _vcl_director_backend($host, $port, $descriptor, $probeUrl = '', $options = array()) {
$tpl = <<<EOS
backend web{$descriptor} {
.host = "{{host}}";
.port = "{{port}}";
{{probe}}
EOS; $vars = array( 'host' => $host, 'port' => $port, 'probe' => '' ); if ( ! empty($probeUrl)) { $vars['probe'] = $this->_vcl_get_probe($probeUrl); } $str = $this->_formatTemplate($tpl, $vars); foreach ($options as $key => $value) { $str .= sprintf(' .%s = %s;', $key, $value).PHP_EOL; } $str .= <<<EOS }
EOS; return $str; }
Failed to save the VCL file: Declaration of Nexcessnet_Turpentine_Model_Varnish_Configurator_Version4::_vcl_director_backend() should be compatible with Nexcessnet_Turpentine_Model_Varnish_Configurator_Abstract::_vcl_director_backend($host, $port, $descriptor = '', $probeUrl = '', $options = Array)