Support » Plugin: WP-Matomo (WP-Piwik) » PHP Warning: file_get_contents(https:piwik.js)

  • Resolved wpler

    (@wpler)


    I would using WP Piwik with Proxy script with installed current piwik version on the same server, but i got warnings on the server logs:

    ` FastCGI sent in stderr: “PHP message: PHP Warning: file_get_contents(https:piwik.js): failed to open stream: No such file or directory in

    I have see into the directory/proxy/config.php wich will include into proxy/piwik.php that $settings->getGlobalOption(‘proxy_url’) will used, but where this is set into the Options?
    Whats going wrong here?

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

    (@braekling)

    Please switch to HTTP mode, set your Piwik URL, save settings and switch back to PHP mode. The Piwik URL has to be set so WP-Piwik can create the proxy URL.

    I’m wondering… this should also be stated in the option’s description. Obviously, this somehow got lost. With the next update, I’ll add the description again. Sorry!

    Hi,

    i have do it exactly you have described, but nothing changed. Into the error.log are the same Warning:

    2017/04/11 10:18:14 [error] 21142#21142: *91900656 FastCGI sent in stderr: “PHP message: PHP Warning: file_get_contents(https:piwik.js): failed to open stream: No such file or directory in …

    For Info:
    I have installed Piwik on a subdomain with https on this server and would use on the other https virtual hosts on this server with proxy.

    Plugin Author braekling

    (@braekling)

    Ok, thx for your reply. I’ll have a closer look at this later today.

    Plugin Author braekling

    (@braekling)

    Can you please open…

    path-to-wp-piwik/classes/WP_Piwik/TrackingCode.php

    Cut line 51-53…

    if (preg_match ( '/var u="([^"]*)";/', $code, $hits )) {
    	$fetchedProxyUrl = $hits [1];
    } else $fetchedProxyUrl = '';

    … and paste them before line 37 …

    if (preg_match ( '/var u="([^"]*)";/', $code, $hits )) {
        $fetchedProxyUrl = $hits [1];
    } else $fetchedProxyUrl = '';
    if ($settings->getGlobalOption ( 'track_mode' ) == 'js')

    See https://github.com/braekling/WP-Piwik/commit/c7299b26d80927c26f19e3d28307c3ac6241e26c

    If this will solve the issue, the fix will be part of the next release.

    Plugin Author braekling

    (@braekling)

    After several testing I’m quite sure the 1.0.15 release solves the issue. If not, please tell me!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Warning: file_get_contents(https:piwik.js)’ is closed to new replies.