Browse Source

bug fixed

urbanu619 6 months ago
parent
commit
a28ddc4840

+ 3 - 1
web/PhalApi/Common/functions.php

@@ -15,7 +15,9 @@
 		$REDIS_PORT= DI()->config->get('app.REDIS_PORT');
 		$redis = new Redis();
 		$redis -> pconnect($REDIS_HOST,$REDIS_PORT);
-		$redis -> auth($REDIS_AUTH);
+		if (strlen($REDIS_AUTH)>0){
+		    $redis -> auth($REDIS_AUTH);
+        }
 
 		return $redis;
 	}

+ 3 - 3
web/app/admin/controller/LiveingController.php

@@ -443,7 +443,7 @@ class LiveingController extends AdminbaseController {
         $domain = $this->pushDomain;
         $key    = $this->pushKey;
 
-        $txTime = strtoupper( base_convert( strtotime( $time ), 10, 16 ) );
+        $txTime = strtoupper( base_convert( $time, 10, 16 ) );
         //txSecret = MD5( KEY + streamName + txTime )
         $txSecret = md5( $key . $streamName . $txTime );
         return "?" . http_build_query( array(
@@ -454,12 +454,12 @@ class LiveingController extends AdminbaseController {
     }
 
 
-    public function getPullUrl( $appName, $streamName, $time )
+    public function getPullUrl( $appName, $streamName, $time ): array
     {
         $domain = $this->pullDomain;
         $key    = $this->pullKey;
 
-        $txTime = strtoupper( base_convert( strtotime( $time ), 10, 16 ) );
+        $txTime = strtoupper( base_convert( $time , 10, 16 ) );
         //txSecret = MD5( KEY + streamName + txTime )
         $txSecret   = md5( $key . $streamName . $txTime );
         $build_data = [

+ 3 - 1
web/app/redis.php

@@ -17,7 +17,9 @@ function connectionRedis(){
         $REDIS_PORT= config('database.REDIS_PORT');
         $redis = new \Redis();
         $redis -> connect($REDIS_HOST,$REDIS_PORT);
-        $redis -> auth($REDIS_AUTH);
+        if (strlen($REDIS_AUTH)>0){
+            $redis -> auth($REDIS_AUTH);
+        }
 
         $GLOBALS['redisdb']=$redis;        
     }