WordPress Toolkit fails to uninstall plugin when proc_open, proc_close are disabled in PHP config

Dhrupodi

Active Member
Sep 8, 2019
41
8
8
root
cPanel Access Level
Root Administrator
It looks like WordPress Toolkit has several severe bugs.

You can't install WordPress on PHP 8.x with mail disabled via disabled_functions in PHP.

It also can't uninstall WordPress plugins when you have proc_open disabled via disabled_functions in PHP.

While uninstalling a plugin:

Code:
WordPress plugins were removed with errors:
Installation "My Blog": Error: Cannot do 'launch': The PHP functions `proc_open()` and/or `proc_close()` are disabled. Please check your PHP ini directive `disable_functions` or suhosin settings.
While installing WordPress:

Code:
WordPress was installed with errors:
Fatal error: Uncaught Error: Call to undefined function PHPMailer\PHPMailer\mail() in /home/examplecpuser/de0602.example.com/wp-includes/PHPMailer/PHPMailer.php:874

Stack trace:

#0 /home/examplecpuser/de0602.example.com/wp-includes/PHPMailer/PHPMailer.php(1902): PHPMailer\PHPMailer\PHPMailer->mailPassthru()

#1 /home/examplecpuser/de0602.example.com/wp-includes/PHPMailer/PHPMailer.php(1642): PHPMailer\PHPMailer\PHPMailer->mailSend()

#2 /home/examplecpuser/de0602.example.com/wp-includes/PHPMailer/PHPMailer.php(1473): PHPMailer\PHPMailer\PHPMailer->postSend()

#3 /home/examplecpuser/de0602.example.com/wp-includes/pluggable.php(542): PHPMailer\PHPMailer\PHPMailer->send()

#4 /home/examplecpuser/de0602.example.com/wp-admin/includes/upgrade.php(619): wp_mail()

#5 /home/examplecpuser/de0602.example.com/wp-admin/includes/upgrade.php(117): wp_new_blog_notification()

#6 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/core-command/src/Core_Command.php(618): wp_install()

#7 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/core-command/src/Core_Command.php(401): Core_Command->do_install()

#8 [internal function]: Core_Command->install()

#9 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func()

#10 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}()

#11 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(491): call_user_func()

#12 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(399): WP_CLI\Dispatcher\Subcommand->invoke()

#13 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(422): WP_CLI\Runner->run_command()

#14 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1214): WP_CLI\Runner->run_command_and_exit()

#15 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()

#16 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/bootstrap.php(77): WP_CLI\Bootstrap\LaunchRunner->process()

#17 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()

#18 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/boot-fs.php(17): require_once('/usr/local/cpan...')

#19 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/wpt-wp-cli.php(31): require_once('/usr/local/cpan...')

#20 Command line code(1): require('/usr/local/cpan...')

#21 {main}

  thrown in /home/examplecpuser/de0602.example.com/wp-includes/PHPMailer/PHPMailer.php on line 874
Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.
 
Last edited:

Dhrupodi

Active Member
Sep 8, 2019
41
8
8
root
cPanel Access Level
Root Administrator
Thank you for the link. I found it before opening this thread.

It doesn't help. Asking users to switch to PHP 7.4 to install WordPress, is not a workaround at all. Even after if you switch to PHP 7.4, WP toolkit fails to uninstall plugin when you have proc_open or proc_close in disabled_functions:

Code:
Error: Cannot do 'launch': The PHP functions `proc_open()` and/or `proc_close()` are disabled. Please check your PHP ini directive `disable_functions` or suhosin settings.
WP Toolkit seems to be having this issue since April 2019. It is frustrating seeing this issue hasn't been fixed yet.

This issue is described in the following article. Can you let me know if it helps?
 

Dhrupodi

Active Member
Sep 8, 2019
41
8
8
root
cPanel Access Level
Root Administrator
@cPRex , I was hoping if you have any update regarding the mail() issue. WordPress Toolkit still cannot install WordPress on PHP 8.x when mail() is disabled via disabled_function.

It is certainly doable as third party WP installers install WordPress without any issue. But due to this issue, WP Toolkit has become a common source of misunderstanding, and in some cases, cancellation from users.
 
  • Like
Reactions: RevivalTech

Dhrupodi

Active Member
Sep 8, 2019
41
8
8
root
cPanel Access Level
Root Administrator
@cPRex , thank you for the update.

It is good to know that a case number was assigned. Would it be possible to share the case number, or would it be possible to guess when it might be complete?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,235
2,422
363
cPanel Access Level
Root Administrator
I mean, I can share the case number, but I'm not sure it's going to be of much help: EXTWPTOOLK-8757

If you've seen my other posts, I never provide ETAs of any type. It just sets up expectations that may never be met, so I don't have any type of guess as to when this will be resolved.
 
  • Like
Reactions: Dhrupodi