Skip to content

Octane swoole initialization error - Fatal error: Uncaught ReflectionException: Class "config" does not exist in /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php:959 #1045

@IbrahimHastorun

Description

@IbrahimHastorun

Octane Version

2.11

Laravel Version

11.31

PHP Version

8.2

What server type are you using?

Swoole

Server Version

Ubuntu 24.04 (Noble Numbat)

Database Driver & Version

Docker images postgres :15-alpine

Description

I get an error when starting my project even though I haven't changed anything in my project, I turned my project into docker images and ran it but I got an error, I stand up my project with octane swoole, I got the same error in version 2.6, I switched to version 2.11 but I still get the same error, please solve my problem.

Steps To Reproduce

Error: Fatal error: Uncaught ReflectionException: Class "config" does not exist in /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php:959
Stack trace:
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(959): ReflectionClass->__construct('config')
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(832): Illuminate\Container\Container->build('config')
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(763): Illuminate\Container\Container->resolve('config', Array)
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(124): Illuminate\Container\Container->make('config', Array)
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(279): app('config')
#5 /var/www/html/vendor/laravel/octane/src/Swoole/Handlers/OnWorkerStart.php(119): config('octane.swoole.c...', true)
#6 /var/www/html/vendor/laravel/octane/src/Swoole/Handlers/OnWorkerStart.php(33): Laravel\Octane\Swoole\Handlers\OnWorkerStart->shouldClearOpcodeCache()
#7 /var/www/html/vendor/laravel/octane/bin/swoole-server(97): Laravel\Octane\Swoole\Handlers\OnWorkerStart->__invoke(Object(Swoole\Http\Server), 2)
#8 /var/www/html/vendor/laravel/octane/bin/swoole-server(97): {closure}('/var/www/html')
#9 [internal function]: {closure}(Object(Swoole\Http\Server), 2)
#10 /var/www/html/vendor/laravel/octane/bin/swoole-server(172): Swoole\Server->start()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions