Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#1574 closed New feature (fixed)

PiwikTracker: curl support

Reported by: jr-ewing Owned by:
Priority: normal Milestone: Piwik 0.9.9 - Stable release
Component: Core Keywords: tracker api
Cc: Sensitive: no

Description

PiwikTracker not working on many shared hosting server, because external file_get_contents($url) not working with allow_url_fopen = false.

-> Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /xxxx/.xxxx/xxxx/index.php on line xx

Bugfix:
Now using Curl

Line 292....

		if(function_exists('curl_open')) {
			$ch = curl_init();
			curl_setopt($ch, CURLOPT_URL, $url);
			curl_setopt($ch, CURLOPT_TIMEOUT, 8);
			curl_setopt($ch, CURLOPT_HEADER, 0);
			$response = curl_exec ($ch);
		} else {
			$response = file_get_contents($url, 0, $ctx);
		}	

Attachments (2)

PiwikTracker.patch (677 bytes) - added by jr-ewing 4 years ago.
PiwikTracker.2.patch (677 bytes) - added by jr-ewing 4 years ago.

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by jr-ewing

Changed 4 years ago by jr-ewing

comment:1 Changed 4 years ago by vipsoft (robocoder)

  • Priority changed from critical to normal
  • Summary changed from PiwikTracker not working correct to PiwikTracker: curl support

comment:2 Changed 4 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

(In [2910]) fixes #1574

Note: See TracTickets for help on using tickets.