Would this expression ever evaluate true?
if (strtoupper($USPS_Parameters["CarrierCode"]) == "PARCEL" && strtoupper($USPS_Parameters["CarrierCode"]) == "ALL")
Machine code can never be set to TRUE or FALSE because the carriercode can never be both.
That's the problem with the usps shipping. Changed ti to || and everything works fine.