Warning: file_get_contents

Einmal täglich erhalte ich die Meldung (bzw. siehe Anhang):


[b]Warning[/b]: file_get_content(http://api.piwik.ort/1.0/getLat....
Die Wartezeit für die Verbindung ist abgelaufen in [b]/var/www/analytics/core/Http.php[/b] on line [b]395[/b]

Weiss jemand wie weiter?

[quote=upper]
Einmal täglich erhalte ich die Meldung (bzw. siehe Anhang):


[b]Warning[/b]: file_get_content(http://api.piwik.ort/1.0/getLat....
Die Wartezeit für die Verbindung ist abgelaufen in [b]/var/www/analytics/core/Http.php[/b] on line [b]395[/b]

Weiss jemand wie weiter?[/quote]

Fabulous tool.

I encountered the same problem.

What to do?

I found.

On Linux did not resolve the name and I have configured DNS on: nano / run / resolvconf / resolv.conf
nameserver xxx.xxx.xxx.xxx

now everything is ok

Hi
IBI

In my case i disabled the PHP Function file_get_contents. To do so you need root access to the piwik server. I’ve edited the php.ini file and set the following parameters:


allow_url_fopen = Off
allow_url_include = Off

If found this solution while securing the webserver. There is a nice description how to do so on: Linux: 25 PHP Security Best Practices For Sys Admins - nixCraft. Check #7 for the above described Problem.
Where you can find the php.ini file depends on your operating system.

Be aware that you would not be able to do the 1-Click-Update! Cause we disable the Request for the newest Version of Piwik.

Hi,

I got the same error. I think that I will disable the file_get_content PHP function, but could you please explain me what is that function?
What are the implications of removing it?

Thanks a lot!

As explaind above. For Piwik it means that the automatic Update will not check every time if there is a newer version of Piwik.


This function is the preferred way to read the contents of a file into a string. Because it will use memory mapping techniques, if this is supported by the server, to enhance performance.

Thank!