I tried all of the other answers first but none of them seemed to work so I set the pear path statically in the pear config file
C:\xampp\php\pear\Config.php
find this code:
if (!defined('PEAR_INSTALL_DIR') || !PEAR_INSTALL_DIR) {
$PEAR_INSTALL_DIR = PHP_LIBDIR . DIRECTORY_SEPARATOR . 'pear';
}
else {
$PEAR_INSTALL_DIR = PEAR_INSTALL_DIR;
}
and just replace it with this:
$PEAR_INSTALL_DIR = "C:\\xampp\\php\\pear";
I restarted apache and used the command:
pear config-all
make sure the all of the paths no longer start with C:\php\pear