• Resolved Knut

    (@knut2)


    Hello,
    Having installed Matomo plugin on my WP site, here is what I get (debug mode):

    Zend_Db_Adapter_Mysqli_Exception: Access denied for user ”@’10.27.35.13′ (using password: NO) in /customers/0/5/0/atactic.be/httpd.www/matomo/libs/Zend/Db/Adapter/Mysqli.php:371 Stack trace: #0 /customers/0/5/0/atactic.be/httpd.www/matomo/core/Db/Adapter/Mysqli.php(81): Zend_Db_Adapter_Mysqli->_connect() #1 /customers/0/5/0/atactic.be/httpd.www/matomo/libs/Zend/Db/Adapter/Abstract.php(315): Piwik\Db\Adapter\Mysqli->_connect() #2 /customers/0/5/0/atactic.be/httpd.www/matomo/core/Db/Adapter.php(51): Zend_Db_Adapter_Abstract->getConnection() #3 /customers/0/5/0/atactic.be/httpd.www/matomo/core/Db.php(156): Piwik\Db\Adapter::factory(‘WordPress’, Array) #4 /customers/0/5/0/atactic.be/httpd.www/matomo/core/FrontController.php(318): Piwik\Db::createDatabaseObject() #5 /customers/0/5/0/atactic.be/httpd.www/wp-content/plugins/matomo/classes/WpMatomo/Bootstrap.php(78): Piwik\FrontController->init() #6 /customers/0/5/0/atactic.be/httpd.www/wp-content/plugins/matomo/classes/WpMatomo/Bootstrap.php(104): WpMatomo in /customers/0/5/0/atactic.be/httpd.www/matomo/libs/Zend/Db/Adapter/Mysqli.php on line 371

    php: 7.3.14
    WP: 5.3.2
    DB: 10.3.21-MariaDB-1:10.3.21+maria~bionic – mariadb.org binary distribution
    DB user: [email protected]

    So, plugin is not usable…
    Did deacticate/delete/install/activate –> no improvement

    What’s wrong ??

Viewing 13 replies - 1 through 13 (of 13 total)
  • Findus23

    (@findus23)

    Hi,

    This might be the same issue as https://github.com/matomo-org/wp-matomo/issues/78

    Matomo requires the CREATE TEMPORARY TABLES MySQL permission and doesn’t yet have a proper error message when it is missing.

    Thread Starter Knut

    (@knut2)

    Have tried CREATE TEMPORARY TABLE XX –> no error message. It seems that I have the permission to do that

    Plugin Author Thomas

    (@tsteur)

    @knut2

    Thanks for creating the issue!

    Is there any chance you could paste the anonymised system report here or email it to us to wordpress at matomo.org ?

    See
    https://matomo.org/faq/wordpress/i-have-a-problem-how-do-i-troubleshoot-and-enable-wp_debug/

    You will probably need to add this to your wp-config.php:

    define( 'MATOMO_SAFE_MODE', true );

    In order to avoid above error you are currently getting.

    It seems like that Matomo config is maybe not loaded cause it should not use that Zend DB but WordPress DB.

    Do you get this error directly after activating the plugin @knut2 ? Do you know if you see in the WordPress Dashboard the Matomo Analytics menu item?

    Plugin Author Thomas

    (@tsteur)

    @knut2 I’m trying some changes that might help. Just in case you are familiar with FTP or uploading files onto your server you could try and download https://github.com/matomo-org/wp-matomo/archive/updateinstalldb.zip then extract the files, and then upload these files into /customers/0/5/0/atactic.be/httpd.www/wp-content/plugins/matomo/

    Now also seeing this path: /customers/0/5/0/atactic.be/httpd.www/matomo/libs/Zend/Db/Adapter/Mysqli.php in your comment. Is there a chance you already have Matomo On-Premise running on your WordPress server?

    Thread Starter Knut

    (@knut2)

    @tsteur Thanks for your quick reply.
    You’re right, Matomo On-Premise is already running on my WordPress server, but it uses its own database (so I thought there was no links between the plugin and previously installed Matomo. Maybe I was wrong)

    I have no access to https://github.com/matomo-org/wp-matomo/archive/updateinstalldb.zip (it seems that no “archive” folder exists), so I haven’t tried your proposal. Could you send me a new url to download the updateinstalldb.zip file ? Thanks

    Thread Starter Knut

    (@knut2)

    @tsteur I see the Matomo Analytics menu item in the WordPress Dashboard.
    Some (very few) functionalities seems to work (“Get started”, “Access”)

    Plugin Author Thomas

    (@tsteur)

    Thread Starter Knut

    (@knut2)

    @tsteur After having uploaded/unzip, still not working.
    I have sent the system report by email.

    Plugin Author Thomas

    (@tsteur)

    Thanks, I’ll have a look at the system report later and try to reproduce. I’d be curious to see if it works for you if you temporarily disable WP-Piwik/WP-Matomo.

    While Matomo On-Premise has a separate DB, it seems to be loading the files from your Matomo On-Premise installation partially which may be due to WP-Piwik but not sure yet. I’ll try to find out more.

    Thread Starter Knut

    (@knut2)

    @tsteur Having disabled WP-Matomo, seems to be working ! I’m investigating further…

    Plugin Author Thomas

    (@tsteur)

    If I had to guess… from what I can see is that for example WP-Matomo is trying to extend the WordPress ToolBar to show some stats. This can be enabled in WP-Matomo in the “Show Statistics” tab. If then for example also the PHP API is configured, then WP-Matomo would bootstrap your regular Matomo On-Premise installation as part of every request when you are logged in.

    You could likely create a user with a Matomo Super User role for example, and this error might not happen if that user is not allowed to view statistics as configured in WP-Matomo.

    This is just a thought so far. Might be worth giving it a try. Generally, when you have Matomo for WordPress installed there should be no need to also use WP-Matomo.

    It might even help in WP-Matomo in the “Connect to Matomo” tab to select for example “Self hosted HTTP API”. Can you confirm you have PHP configured in “Connect to Matomo: Matomo Mode”?

    Plugin Author Thomas

    (@tsteur)

    @knut2 I was able to reproduce it that way. Installed WP-Matomo, Configured PHP mode, enabled WordPress toolbar. Then WP-Matomo was loading the other Matomo and this causes issues. I have changed our system report to hopefully detect this use case in the future and show a warning right away. Be great if you could double check and confirm this behaviour and ideally mark the support thread as resolved. Hoping this helps.

    Thread Starter Knut

    (@knut2)

    @tsteur I confirm that disabling WP-Matomo solves the problem. On my side, enabling WordPress toolbar statistics does not have any influence.
    So, many thanks for your help.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Critical error (wp-admin/admin.php?page=matomo-reporting&goto=matomo-admin)’ is closed to new replies.