This page is a collection of questions / solutions for PHP7 implementation
The code to check the PHP version should be changed so that version 7.0 is accepted.
function CheckPHPVersion($aMinVersion) { list($majorC, $minorC, $editC) = preg_split('/[\/.-]/', PHP_VERSION); list($majorR, $minorR, $editR) = preg_split('/[\/.-]/', $aMinVersion); if ($majorC > $majorR) return true; // this line added for PHP7 if ($majorC != $majorR) return false; if ($majorC < $majorR) return false; // same major - check minor if ($minorC > $minorR) return true; if ($minorC < $minorR) return false; // and same minor if ($editC >= $editR) return true; return true; }
As debug options are set to high when testing the template, switch them off for the graphs at
include '../wsLoadSettings.php'; // NEXT line added for PHP7 ini_set('display_errors', NULL); error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
Setting the debug options on will reveal other deprecated messages. They are not real errors, only messages that in the future these "old ways of doing things" need to be redone the modern way. But for now the graphs are correctly drawn.
In one case the ereg_replace function is used. It should be replaced with a str_replace
$line = ereg_replace("<br>", "", fgets($socketConnection, 4096)); //One of these gets left in there somehow
to
$line = str_replace("<br>", "", fgets($socketConnection, 4096)); //One of these gets left in there somehow