Issue when migrating from Piwik 1.12 to Piwik 2.15.0 - upgrade

I've encountered the following error when upgrading Piwik from 1.12 to 2.15.0 by using the one-click installer:
PHP Fatal error: Class 'Piwik_Plugin' not found in path_to_application/plugins/DoNotTrack/DoNotTrack.php
How to recover my Piwik instance from there?

I've done this in the past a few times, succesfuly. I followed "major" versions at http://piwik.org/changelog/ and designed an incremental upgrade path.
In your case, this would be something like:
Piwik 1.12 -> 2.1 -> 2.2 -> 2.3 -> 2.4 -> 2.5 -> 2.6 -> 2.7 -> 2.7 -> 2.8 -> 2.9 -> 2.10 -> 2.11 -> 2.12 -> 2.13 -> 2.14 -> 2.15
Of course backup DB + code base before each one, make sure you're in maintenance mode.

Short answer is to follow the documentation from
http://piwik.org/faq/how-to-install/faq_18271/
--
I've also tried to run the following command without success:
php console core:update
After saving the database and the configuration file (config/config.ini.php), I've decided to checkout the latest version manually to recover from there.
git remote add upstream https://github.com/piwik/piwik.git
git checkout -B 2.15.0 tags/2.15.0
Accessing the dashboard worked but some panels were still not loading and also the following error message was logged:
PHP Fatal error: require_once(): Failed opening required 'path_to_application/libs/PiwikTracker/PiwikTracker.php'
I had also to initialize the git submodules, to update them and to install the vendors using composer:
git submodule update --init --recursive
# Download composer
curl -sS https://getcomposer.org/installer | php
php composer.phar install --prefer-dist --no
# Run the upgrade command
php console core:update --yes
# Disable development mode
./console development:disable

Related

how to fix issue when magento upgrade from 2.3.4 to 2.4.3?

I'd like to upgrade magento from 2.3.4 to 2.4.3.
But I cannot upgrade it.
this is error.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires magento/product-community-edition 2.4.3 -> satisfiable by magento/product-community-edition[2.4.3].
- magento/product-community-edition 2.4.3 requires php ~7.3.0||~7.4.0 -> your php version (7.2.34) does not satisfy that requirement.
Problem 2
- Root composer.json requires dealerdirect/phpcodesniffer-composer-installer ^0.5.0 -> satisfiable by dealerdirect/phpcodesniffer-composer-installer[v0.5.0].
- dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.2.0] but it does not match the constraint.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
I am using cpanel now. In cpanel I set php version is 7.4
PHP 7.4.33 (cli) (built: Nov 10 2022 11:12:07) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
what is the reason?
See if you're really using php 7.4 by typing php -v in the terminal. When you are sure that your php version is correct, delete the composer.lock file (make a backup beforehand). Try updating with the command:
composer require magento/product-community-edition:2.4.5 -W
If that doesn't work, post the contents of the composer.json file
If you are migrating from 2.3.4 to 2.4.3, you need to make the following and please follow these below steps:
1: Backup composer.json: Run the command
cp composer.json composer.json.bak
2: Upgrade your Magento: Run the commmand
composer require-commerce magento/<product> <version> --no-update [--interactive-root-conflicts] [--force-root-updates] [--help]
3: Update the dependecies:
composer update
For example, Specify the metapackage:
Magento Open Source: composer require-commerce magento/product-community-edition 2.4.4 --no-update
Adobe Commerce: composer require-commerce magento/product-enterprise-edition 2.4.4 --no-update
4: Composer Update: Run composer update
5: Update the database schema and data. bin/magento setup:upgrade
6: Disable Magento maintenance mode. bin/magento maintenance:disable
7: Restart Varnish. (Optional) Restart Varnish If you use it for page caching: service varnish restart
Please switch to PHP 7.4 first then check perform the upgrade.

Set up CI with Travis for .NET Core

I'm trying to set up a CI for my .NET Core 3.1 class library. I created an account at https://travis-ci.org/github and selected my repository containing the code for my class library for a CI build.
Travis is successfully watching my master branch for commits, but I cannot get the CI build to succeed.
My repository: https://github.com/MintPlayer/MintPlayer.AspNetCore.SitemapXml
Target framework: .NET Core 3.1
My latest .travis.yml file:
language: csharp
mono: none
dotnet: 3.1.302
script:
- dotnet restore
dist: trusty
sudo: required
History of attempted travis.yml files (all failed):
But somehow this always errors, this time with the following output:
Clean output:
docker stop/waiting
resolvconf stop/waiting
C# support for Travis-CI is community maintained.
Please open any issues at https://travis-ci.community/c/languages/37-category and cc #joshua-anderson #akoeplinger #nterry
Installing .NET Core
$ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
$ export DOTNET_CLI_TELEMETRY_OPTOUT=1
E: Unable to locate package dotnet-sdk-3.1
E: Couldn't find any package by glob 'dotnet-sdk-3.1'
E: Couldn't find any package by regex 'dotnet-sdk-3.1'
The command "sudo apt-get install -qq dotnet-sdk-3.1=3.1.302*" failed and exited with 100 during .
Your build has been stopped.
Raw output: https://api.travis-ci.org/v3/job/709293291/log.txt
What's wrong with my travis.yml configuration. Why can't I CI test my class library with this config?
I mainly want to CI test for .NET Core. If mono could be included this would be very nice. All the examples you'd find in the git history are also examples that I digged up in other repositories.
You are using:
dist: trusty
That's Ubuntu 14.04.6 LTS which is not supported by .NET Core 3.1. Try a newer version of Ubuntu such as bionic.
This is also answered in the travis community post:
dotnet-sdk-3.0 is not available for Trusty (presumably because it’s EOL): https://packages.microsoft.com/ubuntu/14.04/prod/dists/trusty/main/binary-amd64/Packages Move to dist: xenial (which is the default so you can just omit it) or dist: bionic.

Install mongodb on mac os 10.15 for php7

I have installed mongodb on my mac Catalina 10.15. I have php7.3 version installed as well. Now, I want to use the mongoClient() class with PHP. I tried composer require mongodb/mongodb but it says that the mongodb extension is missing :
Using version ^1.5 for mongodb/mongodb
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- mongodb/mongodb 1.5.1 requires ext-mongodb ^1.6 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.5.0 requires ext-mongodb ^1.6 -> the requested PHP extension mongodb is missing from your system.
- Installation request for mongodb/mongodb ^1.5 -> satisfiable by mongodb/mongodb[1.5.0, 1.5.1].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
So I tried to install the extension for php using the php doc and I get this error :
pear/install/mongodb/php_phongo.c -fno-common -DPIC -o .libs/php_phongo.o
/private/tmp/pear/install/mongodb/php_phongo.c:22:10: fatal error: 'php.h' file not found
#include <php.h>
^~~~~~~
1 error generated.
make: *** [php_phongo.lo] Error 1
ERROR: `make' failed
Any help ?
I also had the same issue after upgrading to MacOS Catalina
Run these two commands;
brew doctor
brew link --overwrite php
I fixed that by installing PHP7.3 using homebrew
here is a post that helped Install PHP 7.3 + xdebug on MacOS Catalina (with homebrew)
I also updated the macos to 10.15 catalina and started the setup. As same as error came during installing the mongodb driver
After Resolving my issue I updated the answer by given below steps:
Step 1:
Run the command: brew install php71
Step 2:
Edit httpd.conf under directory of /etc/apache2/httpd.conf
Add below line
LoadModule php7_module /usr/local/opt/php#7.1/lib/httpd/modules/libphp7.so
then check there should be no other php7_module enabled.
Also add these lines
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
Step 3: Restart apache: sudo apachectl restart
Step 4:
If you need to have php#7.1 first in your PATH run:
echo 'export PATH="/usr/local/opt/php#7.1/bin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/php#7.1/sbin:$PATH"' >> ~/.bash_profile
For compilers to find php#7.1 you may need to set:
export LDFLAGS="-L/usr/local/opt/php#7.1/lib"
export CPPFLAGS="-I/usr/local/opt/php#7.1/include"
Step 5:
To have launched start php#7.1 now and restart at login:
brew services start php#7.1
Step 6:
Open new terminal & check php version & it should be 7.1
Step 7:
Then run the command: sudo pecl install MongoDB
& it will install php mongodb driver successfully without any error.
Make sure all step should be followed!!
I did these steps to resolve my MongoDB driver issue for laravel project which not found.

error: SERVER does not appear in AM_CONDITIONAL

I am trying to install Lustre on CentOS 7. I followed this link. When I try to run sh ./autogen.sh to generate the configure script I get the above error as illustrated below.
[root#localhost lustre-release]# sh ./autogen.sh
configure.ac:10: installing 'config/config.guess'
configure.ac:10: installing 'config/config.sub'
configure.ac:12: installing 'config/install-sh'
configure.ac:12: installing 'config/missing'
autoMakefile.am:127: error: SERVER does not appear in AM_CONDITIONAL
libcfs/libcfs/autoMakefile.am: installing 'config/depcomp'
Does anyone know how I can resolve this?
To build lustre from git use "autogen.sh" in the top level directory to setup the build environment:
$ bash autogen.sh
libcfs/libcfs/autoMakefile.am: installing 'config/depcomp'
$
Did you try downloading a pre-built package from https://downloads.whamcloud.com/public/lustre/ ? That is usually the easiest compared to building your own.
If you want to build your own Lustre code, which version of the source are you using? The latest code is available at git.whamcloud.com. Most users should use the LTS release (b2_10 branch currently), but if you are doing new development you should use the master branch.

MongoDB php7 driver installation

I'm working on an Ubuntu 16 server and I can't seem to get the mongodb driver for php 7 to work. I installed it successfully on my xampp on my windows machine but Ubuntu and php7 seemingly have vast differences.
I did try to install it via pecl install mongodb and used composer to put in the dependencies but it still does not work. I'm using the same php file from my windows Xampp and when I access the page it throws a 500 status code.
Could someone provide a definitive walkthrough on how to install this driver and maybe also how to revert any changes I made using composer and pecl?
Cool even I tried with pecl but didn't work as expected. It work with pecl7 Also, I received this warning along with error, WARNING: "pecl/mongo" is deprecated in favor of "channel:///mongodb" pecl/mongo requires PHP (version >= 5.3.0, version <= 5.99.99), installed version is 7.1.8. Also, got 500 Internal server error.
Before that MongoDB php7 driver, I needed the memcache and getting phphize error that I solved using this repo. Then finally I use this low level PHP driver for MongoDB.
$ git clone https://github.com/mongodb/mongo-php-driver.git
$ cd mongo-php-driver
$ git submodule sync && git submodule update --init
$ /usr/bin/phpize
$ ./configure
$ make all -j 5
$ sudo make install
You can confirm from the output that mongodb.so driver is installed.
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
extension=mongodb.so
Then only step remaining is make it available in your respective path. You can check your extensions_dir in php.ini with the following command,
$ php -i | grep extension_dir
extension_dir => /usr/lib64/php/7.0/modules => /usr/lib64/php/7.0/modules
And, I can verify that mongodb.so is present into the above directory. Then reload the composer and you are good to go ! Hope this helps as it work for me.