• Resolved mr.moe

    (@mrmoe)


    Hi there,

    i’m trying to install a new blog on my server.

    But the Plugin refuses to connect.

    WP-Piwik 0.10.0.6
    Mode: http
    
    Test 1/3: global.getPiwikVersion<br />
    <b>Warning</b>:  Missing argument 2 for WP_Piwik\Request::register(), called in /www/htdocs/.../wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Settings.php on line 600 and defined in <b>/www/htdocs/.../wp-content/plugins/wp-piwik/classes/WP_Piwik/Request.php</b> on line <b>15</b><br />
    
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/www/htdocs/.../wp-content/plugins/wp-piwik/classes/WP_Piwik/Request.php</b> on line <b>62</b><br />
    <br />
    <b>Warning</b>:  array_unshift() expects parameter 1 to be array, null given in <b>/www/htdocs/.../wp-content/plugins/wp-piwik/classes/WP_Piwik/Request/Rest.php</b> on line <b>48</b><br />
    <br />
    <b>Warning</b>:  array_unshift() expects parameter 1 to be array, null given in <b>/www/htdocs/.../wp-content/plugins/wp-piwik/classes/WP_Piwik/Request/Rest.php</b> on line <b>49</b><br />
    bool(false)
    
    Test 2/3: SitesManager.getSitesWithAtLeastViewAccess<br />
    <b>Warning</b>:  Missing argument 2 for WP_Piwik\Request::register(), called in /www/htdocs/.../wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Settings.php on line 605 and defined in <b>/www/htdocs/.../wp-content/plugins/wp-piwik/classes/WP_Piwik/Request.php</b> on line <b>15</b><br />
    
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/www/htdocs/.../wp-content/plugins/wp-piwik/classes/WP_Piwik/Request.php</b> on line <b>62</b><br />
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/www/htdocs/.../wp-content/plugins/wp-piwik/classes/WP_Piwik/Request.php</b> on line <b>62</b><br />
    <br />
    <b>Warning</b>:  array_unshift() expects parameter 1 to be array, null given in <b>/www/htdocs/.../wp-content/plugins/wp-piwik/classes/WP_Piwik/Request/Rest.php</b> on line <b>48</b><br />
    <br />
    <b>Warning</b>:  array_unshift() expects parameter 1 to be array, null given in <b>/www/htdocs/.../wp-content/plugins/wp-piwik/classes/WP_Piwik/Request/Rest.php</b> on line <b>49</b><br />
    bool(false)
    
    Test 3/3: SitesManager.getSitesIdFromSiteUrl
    
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/www/htdocs/.../wp-content/plugins/wp-piwik/classes/WP_Piwik/Request.php</b> on line <b>62</b><br />
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/www/htdocs/.../wp-content/plugins/wp-piwik/classes/WP_Piwik/Request.php</b> on line <b>62</b><br />
    <br />
    <b>Warning</b>:  array_unshift() expects parameter 1 to be array, null given in <b>/www/htdocs/.../wp-content/plugins/wp-piwik/classes/WP_Piwik/Request/Rest.php</b> on line <b>48</b><br />
    <br />
    <b>Warning</b>:  array_unshift() expects parameter 1 to be array, null given in <b>/www/htdocs/.../wp-content/plugins/wp-piwik/classes/WP_Piwik/Request/Rest.php</b> on line <b>49</b><br />
    bool(false)

    The piwik server as well as the wp-piwik plugin is used on several other wordpress blogs. Everything is up to date and the settings seem to be the same.

    Could you help?

    Thanks in andvance
    moe

    https://wordpress.org/plugins/wp-piwik/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author braekling

    (@braekling)

    Can you please enable logging and post the results here?

    1. Open wp-piwik/config.php and change
      define ( 'WP_PIWIK_ACTIVATE_LOGGER', 0 );
      to
      define ( 'WP_PIWIK_ACTIVATE_LOGGER', 2 );
    2. Make sure the folder wp-piwik/logs is writable.
    3. Run the test script again.
    4. Copy and paste the contents from the log file store in wp-piwik/logs here. Important: Please remove your auth token if it’s shown there!
    5. Deactivate the logging again (define ( 'WP_PIWIK_ACTIVATE_LOGGER', 0 );).

    Thank you!

    Thread Starter mr.moe

    (@mrmoe)

    Hi,

    I updated to the most recent version but the result is the same.
    I replaced the hostnames with …

    [ 0.000 sec] Logging started -------------------------------
    [ 0.001 sec] Store default settings
    [ 0.001 sec] Load settings
    [ 0.005 sec] No settings changed yet
    [ 0.149 sec] Perform request: global.getPiwikVersion
    [ 0.201 sec] Result string:
    [ 0.201 sec] Perform request: method=SitesManager.getSitesWithAtLeastViewAccess
    [ 0.248 sec] Result string:
    [ 0.249 sec] Perform request: method=SitesManager.getSitesIdFromSiteUrl&url=http://test....com
    [ 0.299 sec] Result string:
    [ 0.300 sec] Perform request: global.getPiwikVersion
    [ 0.346 sec] Result string:
    [ 0.348 sec] Perform request: method=SitesManager.getSitesIdFromSiteUrl&url=http://test....com
    [ 0.394 sec] Result string:
    [ 0.394 sec] Tried to identify current site, result: b:0;
    [ 0.395 sec] Perform request: global.getPiwikVersion
    [ 0.442 sec] Result string:
    [ 0.442 sec] Get Piwik ID: WordPress site http://test....com = Piwik ID
    [ 0.443 sec] Perform request: method=SitesManager.getSitesWithAtLeastViewAccess
    [ 0.489 sec] Result string:
    [ 2.182 sec] Logging finished ------------------------------
    
    WP-Piwik 0.10.0.7
    Mode: http
    
    Test 1/3: global.getPiwikVersion
    
    bool(false)
    
    array(2) {
      [0]=>
      bool(false)
      [1]=>
      string(152) "https://www.....de/piwik/?module=API&method=API.getBulkRequest&format=php&urls[0]=method%3DAPI.getPiwikVersion%26idSite%3D&token_auth=..."
    }
    
    Test 2/3: SitesManager.getSitesWithAtLeastViewAccess
    
    bool(false)
    
    array(2) {
      [0]=>
      bool(false)
      [1]=>
      string(224) "https://www.....de/piwik/?module=API&method=API.getBulkRequest&format=php&urls[0]=method%3DAPI.getPiwikVersion%26idSite%3D&urls[1]=method%3DSitesManager.getSitesWithAtLeastViewAccess%26idSite%3D&token_auth=..."
    }
    
    Test 3/3: SitesManager.getSitesIdFromSiteUrl
    
    bool(false)
    
    array(2) {
      [0]=>
      bool(false)
      [1]=>
      string(330) "https://www.....de/piwik/?module=API&method=API.getBulkRequest&format=php&urls[0]=method%3DAPI.getPiwikVersion%26idSite%3D&urls[1]=method%3DSitesManager.getSitesWithAtLeastViewAccess%26idSite%3D&urls[2]=method%3DSitesManager.getSitesIdFromSiteUrl%26idSite%3D%26url%3Dhttp%3A%2F%2Ftest.....com&token_auth=..."
    }

    Thanks for your help!
    moe

    Plugin Author braekling

    (@braekling)

    Ok, some thoughts:

    – Is your SSL certificate valid and not self-signed? Otherwise try the “Disable SSL peer verification” setting (see expert settings).

    – Is the new blog running on the same server than the previous blogs which work with WP-Piwik? If not: Maybe this server uses some restrictions like mod_secure?

    Thread Starter mr.moe

    (@mrmoe)

    It’s a startssl issuer certificate which works in all browsers and on nearly any server. Never the less I tried it with SSL peer verification disabled with the same outcome.

    In this case the blog is running on a different server than my other blogs as well as piwik. But I didn’t find any mod_secure on the current server.

    Plugin Author braekling

    (@braekling)

    Yes, a startssl certificate should work – I’m also using one of their certs.

    • So your other blogs are working with WP-Piwik and Piwik… and only this one (on another server) does refuse the connection?
    • Do your other blogs run on the same server than Piwik?
    • Do you have access to the new blog server’s log files? Maybe they can give a hint. (Run the WP-Piwk test script and check your warning or error log afterwards.)
    Thread Starter mr.moe

    (@mrmoe)

    All correct but I don’t have access to the error_logs and redirecting them with htaccess doesn’t seem to work.

    Plugin Author braekling

    (@braekling)

    Can you contact your hoster?

    WP-Piwik is not able to establish a http connection to your Piwik server. Outgoing http calls seem to be blocked some way. There can be many reasons. If mod_secure is not enabled in your Apache configuration, maybe the firewall is configured to block outgoing calls on port 80 and/or 443?

    Thread Starter mr.moe

    (@mrmoe)

    I’ll try to contact my hoster

    Great thanks for your nice tool and your help!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WP-Piwik 0.10.0.6 could not connect to server’ is closed to new replies.