Title: PHP Warning: file_get_contents(https:piwik.js)
Last modified: April 10, 2017

---

# PHP Warning: file_get_contents(https:piwik.js)

 *  Resolved [wpler](https://wordpress.org/support/users/wpler/)
 * (@wpler)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/php-warning-file_get_contentshttpspiwik-js/)
 * 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](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/php-warning-file_get_contentshttpspiwik-js/#post-9017527)
 * 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!
 *  Thread Starter [wpler](https://wordpress.org/support/users/wpler/)
 * (@wpler)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/php-warning-file_get_contentshttpspiwik-js/#post-9017851)
 * 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](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/php-warning-file_get_contentshttpspiwik-js/#post-9022037)
 * Ok, thx for your reply. I’ll have a closer look at this later today.
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/php-warning-file_get_contentshttpspiwik-js/#post-9028636)
 * 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](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](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/php-warning-file_get_contentshttpspiwik-js/#post-9046303)
 * 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.

 * ![](https://ps.w.org/wp-piwik/assets/icon-256x256.png?rev=3529668)
 * [Connect Matomo - Analytics Dashboard for WordPress](https://wordpress.org/plugins/wp-piwik/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-piwik/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-piwik/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-piwik/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-piwik/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-piwik/reviews/)

## Tags

 * [proxy](https://wordpress.org/support/topic-tag/proxy/)

 * 5 replies
 * 2 participants
 * Last reply from: [braekling](https://wordpress.org/support/users/braekling/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/php-warning-file_get_contentshttpspiwik-js/#post-9046303)
 * Status: resolved