Closed Whizzzer closed 6 years ago
It looks like you are using Magento's compilation mode. Please disable this before installing the extension and Rerun the compilation mode after finishing the installation.
Actually what version of php do you currently use?
Can you try changing
return (
Mage::getStoreConfigFlag('google/analyticsplus_optimize/enabled')
&& !empty($this->getGoogleOptimizeContainerId())
);
to
$containerId = $this->getGoogleOptimizeContainerId();
return (
Mage::getStoreConfigFlag('google/analyticsplus_optimize/enabled')
&& !empty($containerId)
);
During installation compilation mode was disabled (I followed the installation instructions)
I'm using PHP-FPM on CentOS in combination with Apache: [whizzer@server ~]$ php-fpm -v PHP 5.4.16 (fpm-fcgi) (built: Nov 15 2017 16:35:28) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies [whizzer@server ~]$ php -v PHP 5.4.16 (cli) (built: Nov 15 2017 16:33:54) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies [whizzer@server ~]$
Changing the code to the proposed one fixed the issue. Because my coding skills are "horrible", can you explain to me why the change fixed the problem?
@Whizzzer, it's a new feature in PHP 5.5 which is being used, the code won't work in PHP 5.4, see this page to see it was only added in PHP 5.5: http://php.net/manual/en/migration55.new-features.php#migration55.new-features.empty
I tried to install this plugin (plus the common one) via modman, but after clearing the cache it gave an error 500 on the webpage.
With some debugging enabled, it shows:
Which then should be this??
Disabling the module via app/etc/modules/Fooman_GoogleAnalyticsPlus.xml (and refreshing the cache) makes the website working again, yet without the plugin.
What am I doing wrong?
O, I'm running Magento 1.9.3.7..