Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database update fails on the console #10849

Closed
tuxmaster opened this issue Nov 10, 2016 · 3 comments
Closed

Database update fails on the console #10849

tuxmaster opened this issue Nov 10, 2016 · 3 comments
Assignees
Labels
answered For when a question was asked and we referred to forum or answered it.
Milestone

Comments

@tuxmaster
Copy link

An update from 2.16.5 to 2.17.0 fails with:

scl enable php70 "php /var/www/piwik/console core:update"

*** Update ***

Database Upgrade Required

Your Piwik database is out-of-date, and must be upgraded before you can continue.

Piwik database will be upgraded from version 2.16.5 to the new version 2.17.0.

*** Note: There are no SQL queries to execute. ***

A database upgrade is required. Execute update? (y/N) y

Starting the database upgrade process now. This may take a while, so please be patient.

*** Update ***

Database Upgrade Required

Your Piwik database is out-of-date, and must be upgraded before you can continue.

Piwik database will be upgraded from version 2.16.5 to the new version 2.17.0.

The database upgrade process may take a while, so please be patient.

Piwik has been successfully updated!

Uncaught exception: Call to undefined function Piwik\posix_getgrgid()
in /var/www/piwik/core/Filechecks.php line 313
#0 /var/www/piwik/plugins/CoreUpdater/Commands/Update.php(367): Piwik\Filechecks::getOwnerOfPiwikFiles()
#1 /var/www/piwik/plugins/CoreUpdater/Commands/Update.php(73): Piwik\Plugins\CoreUpdater\Commands\Update->writeAlertMessageWhenCommandExecutedWithUnexpectedUser(Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/piwik/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Piwik\Plugins\CoreUpdater\Commands\Update->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/piwik/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/piwik/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Piwik\Plugins\CoreUpdater\Commands\Update), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 [internal function]: Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/piwik/core/Console.php(79): call_user_func(Array, Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/piwik/core/Access.php(469): Piwik\Console->Piwik{closure}()
#8 /var/www/piwik/core/Console.php(80): Piwik\Access::doAsSuperUser(Object(Closure))
#9 /var/www/piwik/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Piwik\Console->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/piwik/console(27): Symfony\Component\Console\Application->run()
#11 {main}

OS: CentOS7
PHP:
scl enable php70 "php -v"
PHP 7.0.13 (cli) (built: Nov 8 2016 21:25:55) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.13, Copyright (c) 1999-2016, by Zend Technologies

@tuxmaster
Copy link
Author

scl enable php70 "php /var/www/piwik/console diagnostics:run --all"
PHP version >= 5.3.3: OK 7.0.13
PDO extension: OK
PDO\MYSQL extension: OK
MYSQLI extension: OK
Other required extensions:
- OK zlib
- OK SPL
- OK iconv
- OK json
- OK mbstring
- OK Reflection
Required functions:
- OK debug_backtrace
- OK create_function
- OK eval
- OK gzcompress
- OK gzuncompress
- OK pack
Required PHP configuration (php.ini): OK session.auto_start=0
Directories with write access:
- OK /var/www/piwik/tmp
- OK /var/www/piwik/tmp/assets
- OK /var/www/piwik/tmp/cache
- OK /var/www/piwik/tmp/climulti
- OK /var/www/piwik/tmp/latest
- OK /var/www/piwik/tmp/logs
- OK /var/www/piwik/tmp/sessions
- OK /var/www/piwik/tmp/tcpdf
- OK /var/www/piwik/tmp/templates_c
File integrity: OK
Tracker status: OK
Memory limit: OK 128M
Time zone: OK
Open URL: OK curl
PageSpeed disabled: OK
GD > 2.x + Freetype (graphics): OK
Other extensions:
- OK json
- OK libxml
- OK dom
- OK SimpleXML
Other functions:
- OK shell_exec
- OK set_time_limit
- OK mail
- OK parse_ini_file
- OK glob
- OK gzopen
Filesystem: OK
Archive Cron: OK Managing processes via CLI: Ok
Database abilities: OK LOAD DATA INFILE
Geolocation: OK
Update over HTTPS: OK
Writable JavaScript Tracker ("/piwik.js"): OK

@tuxmaster
Copy link
Author

The problem was:
That the console diagnostics function don't check for the posix extension of php 7

@tsteur
Copy link
Member

tsteur commented Nov 10, 2016

Thanks for creating the issue 👍 We have fixed it recently in #10817 and will be fixed with 2.17.1

@tsteur tsteur closed this as completed Nov 10, 2016
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Nov 10, 2016
@tsteur tsteur added this to the 2.17.1 milestone Nov 10, 2016
@tsteur tsteur self-assigned this Nov 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants