BoldGrid / boldgrid-backup

The Total Upkeep plugin.
GNU General Public License v2.0
11 stars 9 forks source link

Errors when setting up or using SFTP Remote storage #593

Closed W3ap0n-X closed 4 months ago

W3ap0n-X commented 4 months ago

Describe the bug Users who previously had SFTP connections setup are encountering errors when attempting to go to the Total Upkeep dashboard (/admin.php?page=boldgrid-backup-dashboard) and other Total Upkeep admin pages, similar errors occur when attempting to setup SFTP.

To Reproduce

  1. Go to Total Upkeep → Settings
  2. Click on Backup Storage
  3. Select 'Configure' or 'Update' next to FTP/SFTP
  4. Enter SFTP Credentials and click save to see critical error

image

Error when setting up SFTP

PHP Fatal error:  Uncaught Error: Class 'phpseclib\Net\SFTP' not found in <root_dir>/wp-content/plugins/boldgrid-backup/admin/remote/class-boldgrid-backup-admin-ftp.php:904
Stack trace:
#0 <root_dir>/wp-content/plugins/boldgrid-backup/admin/remote/class-boldgrid-backup-admin-ftp-page.php(211): Boldgrid_Backup_Admin_Ftp->is_valid_credentials('xx.xx.xx.xx', 'xx', 'xxxxx', xx, 'sftp', 'active')
#1 <root_dir>/wp-content/plugins/boldgrid-backup/admin/remote/class-boldgrid-backup-admin-ftp-page.php(126): Boldgrid_Backup_Admin_Ftp_Page->settings_save()
#2 <root_dir>/wp-includes/class-wp-hook.php(324): Boldgrid_Backup_Admin_Ftp_Page->settings('')
#3 <root_dir>/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#4 <root_dir>/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#5 <root_dir>/wp-content/plugins/boldgrid-backup/admin/remote/class-boldgrid-backup-admin-ftp.php on line 904

Error that occurs when SFTP is already set up

Fatal error: Uncaught Error: Class "phpseclib\Net\SFTP" not found in <root_dir>/wp-content/plugins/boldgrid-backup/admin/remote/class-boldgrid-backup-admin-ftp.php:298
Stack trace:
#0 <root_dir>/wp-content/plugins/boldgrid-backup/admin/remote/class-boldgrid-backup-admin-ftp.php(1141): Boldgrid_Backup_Admin_Ftp->connect()
#1 <root_dir>/wp-content/plugins/boldgrid-backup/admin/remote/class-boldgrid-backup-admin-ftp-hooks.php(216): Boldgrid_Backup_Admin_Ftp->upload('<root_dir>...')
#2 <root_dir>/wp-includes/class-wp-hook.php(324): Boldgrid_Backup_Admin_Ftp_Hooks->upload_post_archiving('/home/alineadmi...')
#3 <root_dir>/wp-includes/plugin.php(205): WP_Hook->apply_filters('<root_dir>...', Array)
#4 <root_dir>/wp-content/plugins/boldgrid-backup/admin/class-boldgrid-backup-admin-jobs.php(314): apply_filters('boldgrid_backup...', '<root_dir>...')
#5 <root_dir>/wp-includes/class-wp-hook.php(324): Boldgrid_Backup_Admin_Jobs->run()
#6 <root_dir>/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#7 <root_dir>/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
#8 <root_dir>/wp-cron.php(191): do_action_ref_array('boldgrid_backup...', Array)
#9 {main}
thrown in <root_dir>/wp-content/plugins/boldgrid-backup/admin/remote/class-boldgrid-backup-admin-ftp.php on line 298