When do you get the error?
When you try to access the URL:
yoursite.com/adminerSQL.php
?
Which adminer version do you use?
When do you get the error? –>> yoursite.com/adminerSQL.php
Which adminer version do you use? –>> 5.4.1
Same error on another domain
Fatal error: Uncaught Error: Call to undefined function Adminer\each() in /home/vol1_1/freeweb.pk/webpk_28212603/trendtradeschools.pp.ua/htdocs/adminer53.php:28 Stack trace: #0 /home/vol1_1/freeweb.pk/webpk_28212603/trendtradeschools.pp.ua/htdocs/adminer53.php(197): Adminer\remove_slashes(Array, false) #1 {main} thrown in /home/vol1_1/freeweb.pk/webpk_28212603/trendtradeschools.pp.ua/htdocs/adminer53.php on line 28
Which php versions do you use in these websites?
This cannot happen in a regular php server because each is removed in php 8.0 and then.
But also get_magic_quotes_gpc() has been removed.
In Adminer code there is the below function:
function remove_slashes( array $eh, $cd=false){
if( function_exists("get_magic_quotes_gpc")&&get_magic_quotes_gpc()){
while( list($y,$X)=each($eh) ){
foreach($X as $Ce=>$W){
unset($eh[$y][$Ce]);
if(is_array($W)){
$eh[$y][stripslashes($Ce)]=$W;$eh[]=&$eh[$y][stripslashes($Ce)];
}else
$eh[$y][stripslashes($Ce)]=($cd?$W:stripslashes($W));
}
}
}
}
It seams that in your php server get_magic_quotes_gpc() exists and returns true!!!
I have open a ticket here: https://github.com/vrana/adminer/issues/1218
TIP: If you want to fix temporalily you can delete the function’s contents:
function remove_slashes( array $eh, $cd=false){}
Have in mind that this is not an issue of my plugin, but an issue of the default Adminer and your php server configuration! I am jsut trying to help you
Good!! It’s working with the temporary fix
Could you help me a bit more?
- Which hosting do you use?
- What package? Shared hosting?
- If you var_dump in a php file, wherever, the function
get_magic_quotes_gpc(), what is this function returns?
Which hosting do you use? –>> infinityfree.com
What package? Shared hosting? –>> WordPress (free package), shared hosting
If you var_dump in a php file, wherever, the function get_magic_quotes_gpc(), what is this function returns? –>> bool(true)
Hello @kangjooleng
the update to version 4.3.0 fixes your problem.
Thank you for your help
Free shared hosting
I don’t have access to php.ini
Why do you need access to php.ini?
This is not a good reason to access php.ini. Shared hosting normally has limited access to all these settings.