AgoraIO / Tools

383 stars 828 forks source link

AgoraRTCError CAN_NOT_GET_GATEWAY_SERVER with PHP 8.2 #355

Closed katjai1 closed 1 month ago

katjai1 commented 9 months ago

When we're tried to use DynamicKey/AgoraDynamicKey with PHP 8.2, we started to get such error: AgoraRTCError CAN_NOT_GET_GATEWAY_SERVER: invalid vendor key, can not find appid. This code change inside Util.php fixed an issue:

    public static function packString($str)
    {
        return !empty($str)
            ? self::packUint16(strlen($str)) . $str
            : self::packUint16(0);
    }
sunshinexcode commented 3 months ago

@katjai1 Can you provide a sample that reproduces the aforementioned issue after running? I need more specific information to determine the cause of the problem. Thank you.