@mattab opened this Issue on September 2nd 2015 Owner

The goal of this issue is to verify and ensure that Piwik is fully compatible with PHP7.

PHP7 will surely be quickly adopted by the PHP community. By officially supporting PHP7 our community will be able to enjoy the latest PHP running their Piwik platform.

@mattab commented on September 2nd 2015 Owner

Here is a change we may need to make, regarding error handling and fatal errors

Reading: http://daveyshafik.com/archives/69237-an-exceptional-change-in-php-7-0.html

Another important change in PHP 7 is with catchable fatal errors. Previously, these would have been caught and handled using set_error_handler(). However, with PHP 7, they are now \Error exceptions, which, because an uncaught exception is now a real fatal error, will no-longer be catchable in set_error_handler().
This is a backwards compatibility break and means that to work in both PHP 5.x and 7, you need to use both set_error_handler() and try... catch.
This is considered a minor BC break due to limited usage.

@tsteur commented on September 2nd 2015 Owner

I finally got PHP 7 running via phpbrew after compiling PHP > 20 times and trying php-build+phpenv etc and nothing really worked. Using phpbrew now as I want to manage different versions of PHP in one VM (under Ubuntu). In case someone wants to do the same I used phpbrew install next +apxs2 +json +hash +mhash +ctype +pdo +zip +gd +mysql +mbstring +mbregex +iconv +zlib +filter +sockets +mcrypt +fileinfo +bz2 +sqlite && phpbrew ext install curl && phpbrew ext install openssl && phpbrew ext install xdebug && phpbrew -d ext install gd -- --with-libdir=lib/x86_64-linux-gnu --with-gd=shared --enable-gd-native-ttf --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr

At some point I got stuck though with this error:

image

Having a look at this issue they might not start working on support for PHP 7 before it is released: https://github.com/twigphp/Twig/issues/1695#issuecomment-103869108 which could be a blocker for us.

Update: Noticed issue is about extension and I think only mbstring extension was missing see https://github.com/piwik/piwik/issues/4999

@mattab commented on September 2nd 2015 Owner

@tsteur were you able to install piwik on php7 without this extension? (the mbstring extension should be marked as required)

@tsteur commented on September 3rd 2015 Owner

I used my existing installation, so just updated the PHP version. I think this can be quite a common scenario, especially now that maybe more will upgrade to newer PHP versions for Piwik 3.0. For this I created: https://github.com/piwik/piwik/issues/8700

@tsteur commented on September 3rd 2015 Owner

This will be a big problem for our tests: https://bugs.php.net/bug.php?id=69158 and it is not considered a bug for PHP: usort changes how it treats equal values. You can see a simple example in the issue tracker. Many of our unit, integration, system and ui tests are now failing because the order is different and I'm not sure how we're supposed to make the tests run on PHP 5.X and PHP 7.

You can also see it eg https://travis-ci.org/piwik/piwik/jobs/78564129#L678 in unit tests, http://builds-artifacts.piwik.org/piwik/piwik/8689/15171/ in UI tests and in https://travis-ci.org/piwik/piwik/jobs/78564127 for system tests

We'd basically have to rewrite each usort and somehow never return 0. Instead we probably need to compare the index of array entries etc (which can be slow)

@mattab commented on September 5th 2015 Owner

this was an un-expected "BC break"!

Many of our unit, integration, system and ui tests are now failing because the order is different and I'm not sure how we're supposed to make the tests run on PHP 5.X and PHP 7.

Not a great solution, but maybe acceptable for now: could we skip these tests on PHP7?

@tsteur commented on September 7th 2015 Owner

Depends how many there are, we'd need to skip quite a few of them but would be possible. We'd also need to skip many UI tests and I'm not sure if the framework can do this.

We need to go through each failing test and see if it is only a "different order issue" or whether there are also other things wrong.

@nikic commented on September 7th 2015

Is it feasible to change your sorting callback to guarantee a certain order even if it doesn't matter? Say if you're sorting elements ['a' => ..., 'b' => ...] by column 'a', then instead of

function ($x, $y) {
    return $x['a'] <=> $y['a'];
}

use

function ($x, $y) {
    return $x['a'] == $y['a'] ? $x['b'] <=> $y['b'] : $x['a'] <=> $y['a'];
}

I have no idea if this is feasible for your use cases, but it might be better to just guarantee a sort order than provide different test vectors for different PHP versions.

@tsteur commented on September 7th 2015 Owner

That's what I meant with

We'd basically have to rewrite each usort and somehow never return 0. Instead we probably need to compare the index of array entries etc (which can be slow)

We need to add more checks eg other properties and/or array indices. I think there are about 20 uasort, sort to possibly change. We can possibly adjust many of our system tests by updating the DataTable\Sort filter

@tsteur commented on September 9th 2015 Owner
@mattab commented on September 22nd 2015 Owner

Good news!

Piwik 2.15.0-beta9 should support more or less PHP7

Please test the beta and report here any feedback.

@jonnybarnes commented on September 22nd 2015

Can I do a fresh install of v2.15.0-beta9? Is there a link to a zip somewhere?

i.e. I don’t have a running installation of piwik already on my php7 machine. And I couldn’t install v2.14.3 because of an issue with always_populate_raw_post_data.

@RMastop commented on September 22nd 2015 Contributor

Hi @jonnybarnes,

On builds.piwik.org you can find all versions.

@jonnybarnes commented on September 22nd 2015

Excellent, installed 2.15.0-b12, seems to be working.

@ThaDafinser commented on September 23rd 2015 Contributor

I just downloaded the fresh RC3 for windows - VC14 x64 Non Thread Safe (2015-Sep-17 00:25:12)

Testsuite is not running fine completely (i will try to fix some with a PR)

............................................................  840 / 2935 ( 28%)
............................................................  900 / 2935 ( 30%)
............................................................  960 / 2935 ( 32%)
............................................................ 1020 / 2935 ( 34%)
............................................................ 1080 / 2935 ( 36%)
...........................................................F 1140 / 2935 ( 38%)
FFFF..FF.FF................................................. 1200 / 2935 ( 40%)
.............F.....F.F.....F...........F.................... 1260 / 2935 ( 42%)
............................................................ 1320 / 2935 ( 44%)
............................................................ 1380 / 2935 ( 47%)
..F......................................................... 1440 / 2935 ( 49%)
..............E...........E................................. 1500 / 2935 ( 51%)
............................................................ 1560 / 2935 ( 53%)
............................................................ 1620 / 2935 ( 55%)
............................................................ 1680 / 2935 ( 57%)
............................................................ 1740 / 2935 ( 59%)
............................................................ 1800 / 2935 ( 61%)
............................................................ 1860 / 2935 ( 63%)
............................................................ 1920 / 2935 ( 65%)
............................................................ 1980 / 2935 ( 67%)
............................................................ 2040 / 2935 ( 69%)
............................................................ 2100 / 2935 ( 71%)
............................................................ 2160 / 2935 ( 73%)
............................................................ 2220 / 2935 ( 75%)
............................................................ 2280 / 2935 ( 77%)
............................................................ 2340 / 2935 ( 79%)
............................................................ 2400 / 2935 ( 81%)
............................................................ 2460 / 2935 ( 83%)
............................................................ 2520 / 2935 ( 85%)
............................................................ 2580 / 2935 ( 87%)
............................................................ 2640 / 2935 ( 89%)
............................................................ 2700 / 2935 ( 91%)
............................................................ 2760 / 2935 ( 94%)
............................................................ 2820 / 2935 ( 96%)
......E..................................................... 2880 / 2935 ( 98%)
.......................................................

Time: 15.35 seconds, Memory: 66.00Mb

There were 4 errors:

1) Piwik\Tests\Unit\API\ResponseBuilderTest::test_getResponse_shouldHandleResour
ce
TypeError: Argument 1 passed to PHPUnit_Framework_TestCase::onNotSuccessfulTest(
) must be an instance of Exception, instance of Error given, called in C:\Data\w
ap\htdocs\GitHub\piwik\vendor\phpunit\phpunit\src\Framework\TestCase.php on line
 851

2) Piwik\Plugins\API\tests\Unit\OriginalRendererTest::test_renderResource_should
ReturnTheSameValue
TypeError: Argument 1 passed to PHPUnit_Framework_TestCase::onNotSuccessfulTest(
) must be an instance of Exception, instance of Error given, called in C:\Data\w
ap\htdocs\GitHub\piwik\vendor\phpunit\phpunit\src\Framework\TestCase.php on line
 851

3) Piwik\Plugins\API\tests\Unit\PhpRendererTest::test_renderResource_shouldRetur
nTheSameValue
TypeError: Argument 1 passed to PHPUnit_Framework_TestCase::onNotSuccessfulTest(
) must be an instance of Exception, instance of Error given, called in C:\Data\w
ap\htdocs\GitHub\piwik\vendor\phpunit\phpunit\src\Framework\TestCase.php on line
 851

4) Piwik\Plugins\UserCountry\tests\Unit\UserCountryTest::testGeoIpUpdaterRedunda
ntChecks
rename(C:\Data\wap\htdocs\GitHub\piwik/tests/lib/geoip-files/GeoIPISP.dat,C:\Dat
a\wap\htdocs\GitHub\piwik/tests/lib/geoip-files/GeoIPISP.dat.broken): Der Prozes
s kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet
 wird. (code: 32)

C:\Data\wap\htdocs\GitHub\piwik\plugins\UserCountry\GeoIPAutoUpdater.php:564
C:\Data\wap\htdocs\GitHub\piwik\plugins\UserCountry\tests\Unit\UserCountryTest.p
hp:181
C:\Data\wap\htdocs\GitHub\piwik\plugins\UserCountry\tests\Unit\UserCountryTest.p
hp:92

--

There were 15 failures:

1) Piwik\Tests\Unit\UrlHelperTest::testExtractSearchEngineInformationFromUrl wit
h data set <a href='/5'>#5</a> ('http://www.baidu.com/s?ie=gb2...E&ct=0', 'Baidu', 'þ®║Úù┤ ÕÑ¢123
 | µø┤ÕñÜ>>')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'name' => 'Baidu'
-    'keywords' => 'þ®║Úù┤ ÕÑ¢123 | µø┤ÕñÜ>>'
+    'keywords' => '┐§╝õ ║Ò123 | ©³ÂÓ>>'
 )

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\UrlHelperTest.php:175

2) Piwik\Tests\Unit\UrlHelperTest::testExtractSearchEngineInformationFromUrl wit
h data set <a href='/6'>#6</a> ('http://www.baidu.com/s?kw=&sc...%BF%B4', 'Baidu', 'þû»þïéÞ»┤Þï▒Þ
»¡ Õ£¿þ║┐Þºéþ£ï')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'name' => 'Baidu'
-    'keywords' => 'þû»þïéÞ»┤Þï▒Þ»¡ Õ£¿þ║┐Þºéþ£ï'
+    'keywords' => 'ÙÁ¾ó ▀╣¹┐'
 )

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\UrlHelperTest.php:175

3) Piwik\Tests\Unit\UrlHelperTest::testExtractSearchEngineInformationFromUrl wit
h data set <a href='/7'>#7</a> ('http://www.baidu.com/s?wd=%C1...%D4%D8', 'Baidu', 'µÁüÞíîþ¥ÄÞ»¡õ
©ïÞ¢¢')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'name' => 'Baidu'
-    'keywords' => 'µÁüÞíîþ¥ÄÞ»¡õ©ïÞ¢¢'
+    'keywords' => '߸­­ÒÓ¾´´Ô¶°'
 )

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\UrlHelperTest.php:175

4) Piwik\Tests\Unit\UrlHelperTest::testExtractSearchEngineInformationFromUrl wit
h data set <a href='/8'>#8</a> ('http://www.sogou.com/web?quer...191315', 'Sogou', 'õ╝üõ©ÜµÄ¿Õ╣┐'
)
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'name' => 'Sogou'
-    'keywords' => 'õ╝üõ©ÜµÄ¿Õ╣┐'
+    'keywords' => 'õ╝üõ©Üµ×¿Õ╣┐'
 )

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\UrlHelperTest.php:175

5) Piwik\Tests\Unit\UrlHelperTest::testExtractSearchEngineInformationFromUrl wit
h data set <a href='/9'>#9</a> ('http://www.baidu.com/s?ch=14&...dio=on', 'Baidu', 'õ║îÕ║ªÕ«½Úóêþ
│£þâéÞ⢵▓╗ÕÑ¢ÕÉù?')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'name' => 'Baidu'
-    'keywords' => 'õ║îÕ║ªÕ«½Úóêþ│£þâéÞ⢵▓╗ÕÑ¢ÕÉù?'
+    'keywords' => 'õ║£Õ║ªÕ«½Úóêþ│£þâéÞ⢵▓╗ÕÑ¢ÕÉù?'
 )

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\UrlHelperTest.php:175

6) Piwik\Tests\Unit\UrlHelperTest::testExtractSearchEngineInformationFromUrl wit
h data set <a href='/12'>#12</a> ('http://www.yandex.com/yandsea...%D0%B0', 'Yandex', 'Ðçð░ÐüÐéð¥Ð
éð░ ÐÇð░Ðüð┐ð░ð┤ð░...ð║ð╗ð░')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'name' => 'Yandex'
-    'keywords' => 'Ðçð░ÐüÐéð¥Ðéð░ ÐÇð░Ðüð┐ð░ð┤ð░ ÐüÐéðÁð║ð╗ð░'
+    'keywords' => '±ç­░±ü±é­¥±é­░ ±Ç­░±ü­┐­░­┤­░ ±ü±é­Á­║­╗­░'
 )

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\UrlHelperTest.php:175

7) Piwik\Tests\Unit\UrlHelperTest::testExtractSearchEngineInformationFromUrl wit
h data set <a href='/13'>#13</a> ('http://www.yandex.ru/yandsear...%D0%B2', 'Yandex', 'Ðüð┐ð¥ÐÇÐéð
Àð┤ÐÇð░ð▓')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'name' => 'Yandex'
-    'keywords' => 'Ðüð┐ð¥ÐÇÐéðÀð┤ÐÇð░ð▓'
+    'keywords' => '±ü­┐­¥±Ç±é­À­┤±Ç­░­▓'
 )

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\UrlHelperTest.php:175

8) Piwik\Tests\Unit\UrlHelperTest::testExtractSearchEngineInformationFromUrl wit
h data set <a href='/15'>#15</a> ('http://go.mail.ru/search?rch=...%D1%8B', 'Mailru', 'ð│ð╗Ðâð▒ð¥ð
║ð©ðÁ ð╝ð©ð╝ð©ÐçðÁ...ð©ð¢Ðï')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'name' => 'Mailru'
-    'keywords' => 'ð│ð╗Ðâð▒ð¥ð║ð©ðÁ ð╝ð©ð╝ð©ÐçðÁÐüð║ð©ðÁ ð╝ð¥ÐÇÐëð©ð¢Ðï'
+    'keywords' => '­│­╗±â­▒­¥­║­©­Á ­╝­©­╝­©±ç­Á±ü­║­©­Á ­╝­¥±Ç±ë­©­¢±ï'
 )

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\UrlHelperTest.php:175

9) Piwik\Tests\Unit\UrlHelperTest::testExtractSearchEngineInformationFromUrl wit
h data set <a href='/16'>#16</a> ('http://go.mail.ru/search?q=%F...%F8%E8', 'Mailru', 'Ðàð©ð╝Ðüð¥Ð
üÐéð░ð▓ ÐÇð░ÐüÐéð¥...ð┐Ðêð©')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'name' => 'Mailru'
-    'keywords' => 'Ðàð©ð╝Ðüð¥ÐüÐéð░ð▓ ÐÇð░ÐüÐéð¥ÐÇð¥ð┐Ðêð©'
+    'keywords' => '§Þý±¯±‗ÓÔ ­Ó±‗¯­¯´°Þ'
 )

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\UrlHelperTest.php:175

10) Piwik\Tests\Unit\UrlHelperTest::testExtractSearchEngineInformationFromUrl wi
th data set <a href='/79'>#79</a> ('http://image.search.yahoo.co....%BD%8F', 'Yahoo! Japan Images'
, '´¢ö´¢Å ´¢ê´¢à´¢ü´¢Æ´¢ö ´¢î´¢Å´¢ç´¢Å')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'name' => 'Yahoo! Japan Images'
-    'keywords' => '´¢ö´¢Å ´¢ê´¢à´¢ü´¢Æ´¢ö ´¢î´¢Å´¢ç´¢Å'
+    'keywords' => '´¢ö´¢Å ´¢ê´¢à´¢ü´¢Æ´¢ö ´¢£´¢Å´¢ç´¢Å'
 )

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\UrlHelperTest.php:175

11) Piwik\Tests\Unit\UrlHelperTest::testExtractSearchEngineInformationFromUrl wi
th data set <a href='/85'>#85</a> ('http://www.claro-search.com/?...P_clro', 'Claro Search', 'logi
ciels pour ├®crire en jap...ows xp')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'name' => 'Claro Search'
-    'keywords' => 'logiciels pour ├®crire en japonais avec windows xp'
+    'keywords' => 'logiciels pour Ò®crire en japonais avec windows xp'
 )

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\UrlHelperTest.php:175

12) Piwik\Tests\Unit\UrlHelperTest::testExtractSearchEngineInformationFromUrl wi
th data set <a href='/87'>#87</a> ('http://image.search.smt.docom...PT=000', 'Google', 'ÒüÁÒüƒÒéèÒ
ü»ÒâùÒâ¬Òé¡ÒâÑÒéómaxheart')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'name' => 'Google'
-    'keywords' => 'ÒüÁÒüƒÒéèÒü»ÒâùÒâ¬Òé¡ÒâÑÒéómaxheart'
+    'keywords' => 'ÒüÁÒü ÒéÜÒü»ÒâùÒâ¬Òé¡ÒâÑÒéómaxheart'
 )

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\UrlHelperTest.php:175

13) Piwik\Tests\Unit\UrlHelperTest::testExtractSearchEngineInformationFromUrl wi
th data set <a href='/93'>#93</a> ('http://en.toppreise.ch/index....Res=OK', 'Toppreise.ch', 'w├╝r
zpränftß')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'name' => 'Toppreise.ch'
-    'keywords' => 'würzpränftß'
+    'keywords' => 'wÒ╝rzprÒñnftÒ '
 )

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\UrlHelperTest.php:175

14) Piwik\Tests\Unit\UrlHelperTest::testExtractSearchEngineInformationFromUrl wi
th data set <a href='/105'>#105</a> ('http://www.sputnik.ru/search?...%D0%BE', 'Sputnik', 'ð╝ð©ð║ÐÇ
ð¥')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'name' => 'Sputnik'
-    'keywords' => 'ð╝ð©ð║ÐÇð¥'
+    'keywords' => '­╝­©­║±Ç­¥'
 )

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\UrlHelperTest.php:175

15) Piwik\Plugins\API\test\Unit\CsvRendererTest::test_renderScalar_shouldConvert
ToUnicodeByDefault
Failed asserting that 'value
1' starts with " ■".

C:\Data\wap\htdocs\GitHub\piwik\plugins\API\tests\Unit\CsvRendererTest.php:73

FAILURES!
Tests: 2935, Assertions: 5859, Errors: 4, Failures: 15.

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit>^T
@tsteur commented on September 23rd 2015 Owner

PHP 7 compatibility is not fully done yet and needs quite a bit of more work and testing. In addition we're depend on one or two dependencies that are not PHP 7 compatible yet. I made the changes that were needed to make Piwik usable with PHP 7 and so that tests run (not succeed but at least they run now). Unit and integration tests succeeded on travis we might have to test it with Windows as well.

@ThaDafinser commented on September 23rd 2015 Contributor

@tsteur i just checked it.

The errors should be gone/"fixed" with a PhpUnit upgrade (Error/Throwable upgrade) https://github.com/sebastianbergmann/phpunit/commit/f3e26355d0485238e4c3af50fbf63ecd76d23b23

The 15 failures are all the same...i check if i have a wrong setting maybe

@tsteur commented on September 23rd 2015 Owner

Actually, I had a problem there too. I did use that latest PHPUnit version but in the vendor directory it had still the old code of that change for some reason and I think I did change it manually to test it locally and I was definitely using the latest PHPUnit version from vendor... it was very weird :) Anyway, composer install should give you the latest PHPUnit version

@tsteur commented on November 4th 2015 Owner

FYI: PHP7 will be released in a week. It might be worth checking Piwik again with latest RC and fixing remaining issues + probably release a 2.15.1

@mattab commented on November 8th 2015 Owner

Maybe we wait a couple more weeks that more users are on PHP7, and we can test again to run our tests as well as test manually on php7 (it would be nice to double check that Marketplace + auto upgrade work well on php7).

@mattab commented on November 8th 2015 Owner

If you use Piwik on PHP7 we'd love a comment from you on how it is going (whether it works well for you or if you have any issue)

@ThaDafinser commented on November 9th 2015 Contributor

Include PHP7 in travis builds?

@tsteur commented on November 9th 2015 Owner

We can't do that yet, it requires a lot of work for us as PHP7 changed methods like usort and all our System and UI tests return different results now. We need to change all sorting methods to somehow return the same result across PHP versions. We could run the Unit and Integration tests on PHP7 though

@ThaDafinser commented on November 10th 2015 Contributor

@tseur what was changed in usort ? I have not found something in the migration guide http://php.net/manual/en/migration70.changed-functions.php

@tsteur commented on November 10th 2015 Owner

It is not in the migration guide because they do not consider it as a "change": https://bugs.php.net/bug.php?id=69158

@centminmod commented on December 3rd 2015

what about proxy hide script support for php 7 http://piwik.org/faq/how-to/#faq_132 ?

@tsteur commented on December 3rd 2015 Owner

Have you tried to use it with PHP7? Are you getting an error?

@Firesphere commented on December 25th 2015

Seems to be working for me on 2.16 beta 1, no issues discovered yet.

@manper555 commented on December 29th 2015

Hi, I just upgraded my sites to PHP 7.0.1 stable but Piwik 2.5.0 has become unavailable. It runs well and reach the main screen but seems not detect any sites previously declared - not show the site's list. Fortunately my hosting plan allows me to change to any older PHP version from 4.0 to 7.0.1 and I've detected that Piwik runs well for me until PHP 5.6 but not for PHP 7.0.1

Also in Config panel show me a message similar to "Note: You can't modify config in this section because you don't own any web site that could be managed by an anonymous user"

If you need more info about it, please ask me for it.

Do you know if I could do anything to fix it or I should wait for a new Piwik release?

@hpvd commented on January 2nd 2016

@manper555: Piwik 2.5.0 is pretty old (2014-08-15) see https://piwik.org/changelog/
maybe you should try updating to 2.15 or latest beta of 2.16

@hpvd commented on January 2nd 2016

Since PHP 7 is still maturing, before closing this ticket, testing of piwik should be done with latest available version PHP 7 (this time 7.0.1)
see http://www.php.net/ChangeLog-7.php

@manper555 commented on January 2nd 2016

@hpvd: Thank you. I was confident in Piwik's updates seeker that is telling me that I'm in the latest version, but it seems doesn't work properly. I'll upgrade to the 2.15 today.

Best regards.

@hpvd commented on January 2nd 2016

@manper555: update checker should be working fine in later versions. In settings you can choose update tree: final or beta

@hpvd commented on February 3rd 2016

just a question:

is there any news on this?
Will 2.16 LTS officially support php 7.0 usage?

If so, it would be great

btw: Are there already any benchmarks done?

@braekling commented on April 9th 2016

FYI: I switched my personal blog to PHP 7 to test WP-Piwik. Piwik as well as WP-Piwik are working as expected. :smile:

@mattab commented on April 11th 2016 Owner

Thanks @braekling for the feedback!

@hpvd yes, LTS officially supports PHP7. We will later enable our tests for PHP7 to be more confident of our ongoing support: https://github.com/piwik/piwik/pull/9858

@hpvd commented on April 11th 2016

@braekling and @mattab
Many thanks for this information!

@johnnymast commented on April 24th 2016

I had an issue with usort and PHP7+ and HHVM this is how i solved it.

https://github.com/johnnymast/Sandbox/blob/master/src/Traits/ArrayFilter.php#L15

Altho there is a litle bug i notice but you will be able to understand :octocat:

@tsteur commented on April 25th 2016 Owner

Thanks for sharing @johnnymast 👍

@mattab commented on July 14th 2016 Owner

Hi @ThaDafinser maybe you are still interested to help us get the build green on PHP7? If so, we'd love to hear from you and work on this together sometime :+1:

@mattab commented on July 14th 2016 Owner

Here are the commands I used to upgrade to PHP7 on Ubuntu on Apache 2.4:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0 php7.0-mysql  libapache2-mod-php7.0 php7.0-mysql php7.0-curl  php7.0-gd php7.0-json  php7.0-mbstring
sudo /etc/init.d/apache2 restart
sudo a2enmod php7.0
sudo a2dismod php5
sudo /etc/init.d/apache2 restart
@mattab commented on July 14th 2016 Owner

Hello everyone,

It seems that Piwik 2.16.1 is already compatible with PHP7, and Piwik 2.16.2 will fix a few remaining issues. Therefore, we consider Piwik to be PHP7 compatible, and will support all Piwik users who are on PHP7.

The remaining still opened PHP7 issues are:

  • piwik/component-decompress#4 Issues with tar
  • add automated tests CI build for PHP7 eg. #8648 #9858

Also, https://demo.piwik.org now runs on PHP 7.*

This Issue was closed on July 14th 2016
Powered by GitHub Issue Mirror