Hei
I tilfelle du jobber med PHP-løsninger – basert pÃ¥ DATAGRID, vet du sikkert at DATAGRID 8.2.7 fungerer utmerket under PHP7.4.
Snart blir «nødvendig»/obligatorisk overgang til siste supporterte PHP8.0, og da oppstÃ¥r der problemer med alle PHP-systemer er som baserer seg datagrid 8.2.7. I verste fall mÃ¥ man kjøpe ny DATAGRID-versjon og kode systremene pÃ¥ nytt for Ã¥ fÃ¥ de til Ã¥ fungere?
I tilfelle du har utviklet PHP-systemer som baserer deg på datagrid, har du kanskje kunnskap/erfaring med hvordan dette kan og/eller må løses.
Jeg har forklart problemet på engelsk, men du må gjerne svare på norsk:
Â
I try to explain what is causing trouble in my systems using DATAGRID(version 8.2.7) after I have to change from PHP7.4 to PHP8.0
The following needed code (line 64) in my DATAGRID (version 8.2.7):
## ***set needed options and create a new class instance
$debug_mode = false; /* display SQL statements while processing */
$messaging = false; /* display system messages on a screen */
$unique_prefix = ‘abc_’; /* prevent overlays – must be started with a letter */
$dgrid = new DataGrid($debug_mode, $messaging, $unique_prefix);
gives the following error message after having changed from PHP7.4 to PHP8.0 :
Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /customers/9/b/8/tromsoo.com/httpd.www/baattur/datagrid/datagrid.class.php:426 Stack trace: #0 /customers/9/b/8/tromsoo.com/httpd.www/baattur/innhold_ADMIN.php(64): DataGrid->__construct(false, false, ‘abc_’) #1 {main} thrown in /customers/9/b/8/tromsoo.com/httpd.www/baattur/datagrid/datagrid.class.php on line 426
The line 426 in datagrid.class.php (still DATAGRID version 8.2.7) looks like this:
// [#0042] clean slashes from the input if there was page reloading —-
if(get_magic_quotes_gpc()){
if(!function_exists(‘stripslashes_gpc’)){
function stripslashes_gpc(&$value){ $value = stripslashes($value); }
}
if(isset($_GET) && is_array($_GET)) array_walk_recursive($_GET, ‘stripslashes_gpc’);
if(isset($_POST) && is_array($_POST)) array_walk_recursive($_POST, ‘stripslashes_gpc’);
if(isset($_COOKIE) && is_array($_COOKIE)) array_walk_recursive($_COOKIE, ‘stripslashes_gpc’);
if(isset($_REQUEST) && is_array($_REQUEST)) array_walk_recursive($_REQUEST, ‘stripslashes_gpc’);
Â
Question to experts:
Can this be solved in DATAGRID 8.2.7 by changig something?