Opened 5 years ago

Closed 4 years ago

#991 closed Bug (fixed)

Setting up Piwik manually or headless install not supported

Reported by: vipsoft Owned by:
Priority: normal Milestone: Piwik 0.5.5
Component: Core Keywords:
Cc: Sensitive: no

Description (last modified by vipsoft)

We provide config/config.ini.sample.php, which implies that a user could copy and configure this manually as config.ini.php.

  • if the db user doesn't exist, Piwik reports:
    SQLSTATE[28000] [1045] Access denied for user "%s"
    

(followed by a backtrace)

  • if db user exists but not the database, Piwik reports:
    SQLSTATE[42000] [1049] Unknown database "%s"
    

(followed by a backtrace)

  • if db user and database exist, but not the tables, Piwik reports:
    Critical Error during the update process:
    
    Database piwik is empty. You must edit or remove your Piwik configuration file.
    
  • if user bypasses the Installation, things like the anonymous user and default site are not created

Proposal:

  • for database user that doesn't exist, provide help
  • for missing database or tables, prompt to remove the config file and redirect to installer, using the settings to pre-fill the forms; (we don't want to remove the config file without user confirmation, in case Piwik simply lost its connection to the MySQL server)

Change History (10)

comment:1 Changed 5 years ago by vipsoft (robocoder)

  • Summary changed from Setting up Piwik manually to Setting up Piwik manually or headless install not supported

comment:2 Changed 5 years ago by vipsoft (robocoder)

  • Description modified (diff)

comment:3 Changed 5 years ago by matt (mattab)

sounds good - also, a simple solution could be to explain in a comment in config.sample that this is not meant to be copied, users should go through the installation process first etc.

comment:4 Changed 5 years ago by vipsoft (robocoder)

  • Type changed from New feature to Bug

comment:5 Changed 4 years ago by matt (mattab)

I vote for a comment in config.sample.ini to explain that this is not meant to be copied with a link to the installation guide (piwik.org/docs/installation/)

comment:6 Changed 4 years ago by vipsoft (robocoder)

In [1569], refs #991 - add comment to config.ini.sample.php to not copy this file

comment:7 Changed 4 years ago by kaystrobach

Have a look into the repository of EXT:piwikintegration for TYPO3.

Manual: http://forge.typo3.org/wiki/extension-piwikintegration/Manual_for_20

SVN: http://forge.typo3.org/repositories/show/extension-piwikintegration

Here is the direct link to the helper class with the function makePiwikConfigured:

http://forge.typo3.org/repositories/entry/extension-piwikintegration/trunk/class.tx_piwikintegration_helper.php#L133

This class is used to fetch, extract and install piwik fully automated. It supports updating existing databases. It's forced to use a hardcoded prefix, to make it compatible with TYPO3.

The tracking code is developed in a standalone extension:

http://forge.typo3.org/projects/show/extension-piwik

Best regards Kay

comment:8 Changed 4 years ago by vipsoft (robocoder)

  • Milestone changed from 1 - Piwik 0.5 to 1 - Piwik 0.5.1

comment:9 Changed 4 years ago by vipsoft (robocoder)

I've added a reference to comment:7 to #161.

comment:10 Changed 4 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

(In [1742]) fixes #991 - redirect to Installation 'welcome' (displaying alternate text & error message) if database connection fails

Note: See TracTickets for help on using tickets.