Starsze wersje tego systemu CMS nie wspierają PHP 5.6 a dokładniej dla wykluczonych funkcji związanych regex i obsługą mysql:
1 |
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /public_html/manager/includes/protect.inc.php on line 34 Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /public_html/manager/includes/extenders/dbapi.mysql.class.inc.php on line 89 Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /public_html/manager/includes/extenders/dbapi.mysql.class.inc.php on line 89 |
na szczęście można jeszcze przywrócić ten CMS do życia po paru modyfikacjach kodu.
W pliku:
1 |
index.php |
usuń wpis:
1 |
error_reporting(E_ALL & ~E_NOTICE); |
W pliku:
1 |
manager/index.php |
usuń wpis:
1 |
error_reporting(E_ALL & ~E_NOTICE); |
W pliku:
1 |
manager/includes/config.inc.php |
Usuń wpis:
1 |
error_reporting(E_ALL & ~E_NOTICE); |
1 |
W pliku: |
1 |
manager/includes/document.parser.class.inc.php |
Znajdź funkcję:
1 |
executeParser() |
I zamień kod:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
//error_reporting(0); if (version_compare(phpversion(), "5.0.0", ">=")) set_error_handler(array ( & $this, "phpError" ), E_ALL); else set_error_handler(array ( & $this, "phpError" )); $this->db->connect(); // get the settings if (empty ($this->config)) { $this->getSettings(); } |
Na:
1 2 3 4 5 6 7 8 9 10 11 12 |
//error_reporting(0); set_error_handler(array ( & $this, "phpError" ), E_ALL); $this->db->connect(); // get the settings if (empty ($this->config)) { $this->getSettings(); } |
W tym samym pliku zamień kod:
1 2 3 4 5 6 7 8 9 10 11 12 |
function phpError($nr, $text, $file, $line) { if (error_reporting() == 0 || $nr == 0 || ($nr == 8 && $this->stopOnNotice == false)) { return true; } if (is_readable($file)) { $source= file($file); $source= htmlspecialchars($source[$line -1]); } else { $source= ""; } //Error $nr in $file at $line: <div><code>$source</code></div> $this->messageQuit("PHP Parse Error", '', true, $nr, $file, $source, $text, $line); } |
na:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
function phpError($nr, $text, $file, $line) { if (error_reporting() == 0 || $nr == 0) { return true; } if($this->stopOnNotice == false) { switch($nr) { case E_NOTICE: if($this->error_reporting <= 2) return true; break; case E_STRICT: case E_DEPRECATED: if($this->error_reporting <= 1) return true; break; default: if($this->error_reporting === 0) return true; } } if (is_readable($file)) { $source= file($file); $source= htmlspecialchars($source[$line -1]); } else { $source= ""; } //Error $nr in $file at $line: <div><code>$source</code></div> $this->messageQuit("PHP Parse Error", '', true, $nr, $file, $source, $text, $line); } |
W pliku:
1 |
manager/media/browser/mcpuk/connectors/php/connector.php |
usuń kod:
1 |
error_reporting(E_ALL); |
W pliku:
1 |
manager/includes/protect.inc.php |
Na początku dodaj kod:
1 |
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); |
Dodatkowo jeśli posiadasz dodatkowe moduły usuń z nich wystąpienie:
1 |
error_reporting(E_ALL ^ E_NOTICE); |
MOże sie ono znaleźć w plikach:
1 2 |
assets/modules/easynewsletter/backend.php assets/modules/easynewsletter/core.php |