Skip to content

Problems Enabling Redis in FreeScout – Sessions & Queue Not Working #4650

@voipexpert

Description

@voipexpert

Hi everyone,

I’m trying to enable Redis for caching, sessions, and queues in FreeScout, but I’m facing issues.

My Setup:

  • FreeScout Version: 1.8.173
  • PHP Version: 8.2
  • Web Server: Nginx
  • Database: MySQL
  • Redis Version: 7.0.15
  • Redis PHP Extension: Installed php8.2-redis

What I Did:

  1. Updated .env file:
    CACHE_DRIVER=redis  
    SESSION_DRIVER=redis  
    QUEUE_CONNECTION=redis  
    
    REDIS_CLIENT=phpredis  
    REDIS_HOST=127.0.0.1  
    REDIS_PASSWORD=null  
    REDIS_PORT=6379  
    SESSION_LIFETIME=120  
    
  2. Cleared cache and restarted services:
    sudo -u www-data php artisan cache:clear  
    sudo -u www-data php artisan config:clear  
    sudo -u www-data php artisan queue:restart  
    sudo systemctl restart php8.2-fpm  
    sudo systemctl restart nginx  
    sudo systemctl restart redis  
    
  3. Checked Redis connection:
    redis-cli ping  
    
    • Returns PONG

Problems I'm Facing:

  1. Session errors (CacheBasedSessionHandler.php)

    • 500 error in logs:
      Illuminate\Session\CacheBasedSessionHandler::open() must return bool, string returned
      
    • Tried modifying CacheBasedSessionHandler.php but no luck.
  2. Queue worker fails to start

    • Running sudo -u www-data php artisan queue:work gives errors related to transactions or Redis connection.
  3. Predis not working

    • Error:
      Class 'Predis\Client' not found
      
    • Switched to phpredis, but still facing session errors.

What I Tried:

  • Ensured php8.2-redis is installed.
  • Switched from Predis to phpredis.
  • Verified Redis is responding (redis-cli ping).
  • Cleared cache and restarted all services.

Help Needed:

  1. How to fix Redis session errors in FreeScout?
  2. How to properly configure CacheBasedSessionHandler.php?
  3. How to get queue workers running with Redis?

Any help would be appreciated. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions