I have this error Message with Centos 5.9, PHP 5.4 and an older PHP program extension (typo3 CMS).
PHP Fatal error: Call-time pass-by-reference has been removed in class.tx_spscoutnetcalendar_pi1.php on line 279
This is analog the php code function:
// ********* Start XML code *********
// get XML data from an URL and return it
function fetchCalendarData($xmlUrl,$timeout) {
$xmlSource="";
$url = parse_url($xmlUrl);
$fp = fsockopen($url['host'], "80", &$errno, &$errstr, $timeout);
if ($fp) {
fputs($fp, "GET ".$url['path']."?".$url['query']." HTTP/1.1\r\nHost: " . $url['host'] . "\r\n\r\n");
while(!feof($fp))
$xmlSource .= fgets($fp, 128);
}
// strip HTTP header
if ($pos = strpos($xmlSource,"<?xml")) { // this has to be the first line
$xmlSource = substr($xmlSource, $pos);
} else {
$xmlSource="";
}
// I have no idea why, but at the end of the fetched data a '0' breaks the XML syntax and provides an
// error message in the parser. So I just cut the last 5 characters of the fetched data
$xmlSource = substr($xmlSource,0,strlen($xmlSource)-5);
return $xmlSource;
}
And specific this line 279
$fp = fsockopen($url['host'], "80", &$errno, &$errstr, $timeout);
Any help here please, i'm not a php expert.