• Resolved lupker

    (@lupker)


    Hi! I love the duplicator plugin, but I have problems working with it on my new PHP 8 server. Everything works fine using PHP 7.3, making a new package gives me a critical error:

    Uncaught Error: Call to undefined function shell_exec() in …/wp-content/plugins/duplicator/classes/utilities/class.u.php:428

    My admin tells me shell_exec() is not used at all on my server (also in PHP 7.3, which does work fine with Duplicator) and he does not understand why it’s being used because of security risks.

    Any clue???

    Thanks,
    Mark

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hey @lupker,

    Since your host doesn’t support that PHP method then you will need to switch the database build mode to PHP. Goto Settings > Packages Tab > SQL Mode > PHP Code. That should allow you to get around the error.

    As far as a security risk it’s only a security risk if the hosting provider doesn’t know how to properly secure it. Dozens of major hosts have it enabled and know how to properly implement security around it. It’s a very common method used by many developers and it’s the only way a user can access mysqldump from the plugin.

    Hope this helps~

    Thread Starter lupker

    (@lupker)

    Thanks for your reply! I am unable to see the config settings for packages because it results in a critical failure as well… Going back to php 7.3 and it works just fine. Also in this version the shell_exec is disabled. Is it possible to enable mysql mode somewhere else?

    Thanks for your help!

    Hey @lupker,

    Ok thanks for the update, we’ll have to see if we can reproduce the issue. If we can we’ll try and add a fix, so that you can at least navigate to the settings page.

    Update:
    After doing some testing the plugin should work fine if shell_exec is disabled. I’m not sure why you would see issues in your UI. If you would like to submit a support ticket we can have a closer look at your setup.

    As far as using mysqldump mode the only way to use that with PHP is through shell_exec. You might mention to your host that hundreds of other hosts support it…

    Thanks~

    Thread Starter lupker

    (@lupker)

    Hi, I went back to PHP 7.3 and turned on the MySQL mode to PHP. Then went back to PHP8, the config setting is still unreachable, but I am one step further in the process of making a new package into the setup. Now I get the error after when I press next.

    I am also using UpDraft Plus Backups, which seems to work fine on my server…

    Thanks,
    Gr,
    Mark

    Hey @lupker

    If you would like to submit a support ticket for this issue we can have a closer look at your setup. Please provide a link to this forum thread when submitting the ticket.

    Cheers~

    Thread Starter lupker

    (@lupker)

    Ok, thanks. I made a ticket.

    Gr,
    Mark

    This issue will be resolved in 1.4.2

    Thanks~

    Thread Starter lupker

    (@lupker)

    Hi! I found the same issue in the installer.php, you might check this one as well:

    [PHP ERR][FATAL] MSG:Uncaught Error: Call to undefined function shell_exec() in /var/www/vhosts/xxx/installer.php:1230
    Stack trace:
    #0 /var/www/vhosts/xxx/installer.php(1244): DUPX_Bootstrap->hasShellExec()
    #1 /var/www/vhosts/xxx/installer.php(123): DUPX_Bootstrap->getUnzipFilePath()
    #2 /var/www/vhosts/xxx/installer.php(1662): DUPX_Bootstrap->__construct()
    #3 {main}
      thrown [CODE:1|FILE:/var/www/vhosts/xxx/installer.php|LINE:1230]

    Gr,
    Mark

    Hey @lupker,

    Thanks for the feedback, this is now fixed and will be in 1.4.2 as well. If you would like a copy of the most recent version, just shoot us a request through the Snapcreek help ticket system.

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘PHP8 errors?’ is closed to new replies.