Category : redis

I’m looking to use redis sentinel to store laravel sessions. I have set up redis this way: When I use Laravel’s Cache::put and do a dd(Redis::connection(‘cache-connection’)->keys(‘*’)). I do have the new values that I wanted to cache. However when I try to insert a new session value like this: Session::put(‘dddd’, ‘test’); I get nothing new ..

Read more

Laravel 8 has config file configsession.php this file has 2 parameters to store driver’ => env(‘SESSION_DRIVER’, ‘file’), and ‘store’ => env(‘SESSION_STORE’, null) Both can be "apc", "dynamodb", "memcached", "redis" The only difference I see is that ‘driver’ can also be "file", "cookie", "database", "array" Please tell me what is the difference and why do we ..

Read more

Octane Version: 1.0.8 Laravel Version: 8.50.0 PHP Version: 8.0 Server & Version: Swoole 4.6.7 Database Driver & Version: MySQL 8.0.25 Everything works as expected when using Redis for example. cache()->store(‘redis’)->remember("redis_key", now()->addMinutes(), fn() => ‘redis_value’); Cache::remember() method does not store the value when using Laravel Octane Cache. (returns null) cache()->store(‘octane’)->remember("octane_key", now()->addMinutes(), fn() => ‘octane_value’); I did ..

Read more

I have tried "telnet 12.123.123.123 80" and using redis-commander. Everthing works perfectly fine but when run the code, it shows "Unknown response prefix: ‘H’". Here’s my code: $redisResultData = RedisServer::connection(‘td_slave’)->PING(); /config/app.php ‘aliases’ => [ ‘RedisServer’ => IlluminateSupportFacadesRedis::class ] /config/database.php: ‘td_slave’ => [ ‘host’ => ‘12.123.123.123’, ‘password’ => null, ‘port’ => 80, ‘database’ => 0, ], ..

Read more

I’m trying to broadcasting to presence channel. But auth seems to not send a member data. Versions composer.json "laravel/framework": "6.20.22", "laravel/passport": "9.0", "predis/predis": "1.1.7", package.json laravel-echo-server: 1.6.2 "socket.io-client": "2.4.0", "laravel-echo": "1.10.0", Server side .env BROADCAST_DRIVER=redis QUEUE_CONNECTION=sync REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 REDIS_PREFIX= laravel-echo-server.json { "authHost": "http://localhost:8080", "authEndpoint": "/custom/broadcasting/auth", "clients": [], "database": "redis", "databaseConfig": { "redis": {}, "sqlite": ..

Read more

According laravel manual https://laravel.com/docs/8.x/redis for install predis, need run: composer require predis/predis. When that command is running (for laravel 8) – appear next Error: Your requirements could not be resolved to an installable set of packages. Problem 1 – facade/ignition is locked to version 2.4.2 and an update of this package was not requested. – ..

Read more

I am using Google Cloud Storage(GCS) as a Filesystem in my Laravel application. The objects in my GCS bucket are not publicly accessible. Here is my code -: Config -: filesystems.php <?php return [ /* |————————————————————————– | Default Filesystem Disk |————————————————————————– | | Here you may specify the default filesystem disk that should be used ..

Read more

I’m trying to install socket.io, redis with laravel. But my laravel event, not saving data to redis. Here’s my .env BROADCAST_DRIVER=redis QUEUE_DRIVER=redis CACHE_DRIVER=file QUEUE_CONNECTION=redis SESSION_DRIVER=file SESSION_LIFETIME=120 REDIS_HOST=xxx.ondigitalocean.com REDIS_PASSWORD=xxxx REDIS_PORT=25061 REDIS_PREFIX="" REDIS_DB=1 Here’s my event: <?php namespace AppEvents; use IlluminateBroadcastingChannel; use IlluminateQueueSerializesModels; use IlluminateBroadcastingPrivateChannel; use IlluminateBroadcastingPresenceChannel; use IlluminateFoundationEventsDispatchable; use IlluminateBroadcastingInteractsWithSockets; use IlluminateContractsBroadcastingShouldBroadcastNow; class ActionEvent implements ShouldBroadcastNow ..

Read more

My application is returning an error when storing the cache, I saw that it was saving, but it is returning this error. Can anyone say why? Here’s my function and the error: function that returns error: public function getProductsRecommendations($keywords) { $expiration = 10; $keyName = ‘productsRecommended’; return Cache::remember($keyName, $expiration, function ($keywords) { return Product::query()->where(function ($productsAll) ..

Read more

I have redis problem in laravel, I’m using laradock to upload my containers, but I don’t know why it’s not working. When I ran the command redis-server in the terminal inside the bash of redis I saw that I was returning this error: C:UsersdanilOneDrive├ürea de TrabalhoBuilderAllmercaloo-sellerlaradock>docker-compose exec redis bash [email protected]:/data# redis-server 25:C 12 Jun 2021 ..

Read more

I came across a weird thing while using Laravel Echo Server in NuxtJs, Redis, and Laravel 8. Laravel Echo in NuxJs sends a WS message that looks like this: 42["subscribe",{"channel":"container-details-3","auth":{"headers":{"Authorization":"Bearer ****"}}}] I am using API auth like this: Broadcast::routes([‘middleware’ => [‘auth:api’]]); This is failing because the request that comes through to my private channel auth ..

Read more

Access to XMLHttpRequest at ‘http://example.com:7777/socket.io/?EIO=3&transport=polling&t=Ndo7uij’ from origin ‘http://example.com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Hello! I’m working with Laravel 7 (Apache) + NodeJS + Redis + Socket. So, when im starting node server i get this error in the site console. Cors.php <?php return [ /* ..

Read more