• Resolved kangjooleng

    (@kangjooleng)


    Below is the error when using Adminer, not your plugin

    Fatal error: Uncaught Error: Call to undefined function Adminer\each() in /home/vol5_6/hstn.me/mseet_40432858/htdocs/adminerSQL.php:28 Stack trace: #0 /home/vol5_6/hstn.me/mseet_40432858/htdocs/adminerSQL.php(204): Adminer\remove_slashes(Array, false) #1 {main} thrown in /home/vol5_6/hstn.me/mseet_40432858/htdocs/adminerSQL.php on line 28

    Plugin will cause critical error in WordPress

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Pexle Chris

    (@pexlechris)

    When do you get the error?

    When you try to access the URL:
    yoursite.com/adminerSQL.php
    ?

    Which adminer version do you use?


    Thread Starter kangjooleng

    (@kangjooleng)

    When do you get the error? –>> yoursite.com/adminerSQL.php

    Which adminer version do you use? –>> 5.4.1

    Plugin Author Pexle Chris

    (@pexlechris)

    Thread Starter kangjooleng

    (@kangjooleng)

    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

    Plugin Author Pexle Chris

    (@pexlechris)

    Which php versions do you use in these websites?

    Thread Starter kangjooleng

    (@kangjooleng)

    8.3

    Plugin Author Pexle Chris

    (@pexlechris)

    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

    Thread Starter kangjooleng

    (@kangjooleng)

    Good!! It’s working with the temporary fix

    Plugin Author Pexle Chris

    (@pexlechris)

    Could you help me a bit more?

    1. Which hosting do you use?
    2. What package? Shared hosting?
    3. If you var_dump in a php file, wherever, the function get_magic_quotes_gpc(), what is this function returns?
    Thread Starter kangjooleng

    (@kangjooleng)

    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)

    Plugin Author Pexle Chris

    (@pexlechris)

    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

    Thread Starter kangjooleng

    (@kangjooleng)

    Why do you need access to php.ini?

    Just to see the settings

    Thread Starter kangjooleng

    (@kangjooleng)

    This is not a good reason to access php.ini. Shared hosting normally has limited access to all these settings.

Viewing 15 replies - 1 through 15 (of 17 total)

You must be logged in to reply to this topic.