Closed krajcikondra closed 1 year ago
Hello,
Can you dump your RoadRunner config file .rr.yaml
, your Symfony Version, RR version and this bundle version please?
Hello,
Can you dump your RoadRunner config file
.rr.yaml
, your Symfony Version, RR version and this bundle version please?
my .rr.yaml
version: "2.7"
server:
command: "php public/index.php"
# If you are not using symfony 5.3+ and the new Runtime component:
# remove the previous `command` line above and uncomment the line below to use the deprecated command.
# command: "php bin/console baldinof:roadrunner:worker"
env:
- APP_RUNTIME: Baldinof\RoadRunnerBundle\Runtime\Runtime
http:
address: 0.0.0.0:8080
middleware: [ "static", "gzip" ]
uploads:
forbid: [ ".php", ".exe", ".bat" ]
static:
dir: "public"
forbid: [ ".php", ".htaccess" ]
logs:
mode: production
channels:
http:
level: debug # Log all http requests, set to info to disable
server:
level: info # Everything written to worker stderr is logged
mode: raw
metrics:
level: error
# Uncomment to use metrics integration
# rpc:
# listen: tcp://127.0.0.1:6001
# Uncomment to use metrics integration
# metrics:
# # prometheus client address (path /metrics added automatically)
# address: "0.0.0.0:9180"
My symfony version is 5.2 baldinof/roadrunner-bundle version: 2.3.2 rr version 2.12.3
It should work, are you able to start the app using symfony serve
or bin/console
?
It should work, are you able to start the app using
symfony serve
orbin/console
?
Yes both variants are working
Ho, I think it's because you are on Symfony 5.2. since the symfony/runtime
component has been released with 5.3 Can you try to update the RR config to use command: "php bin/console baldinof:roadrunner:worker"
?
I update symfony 5.2 to 5.4 but still same issue.
Can be problem with deprecated warnings in console?
Etc.
[2023-06-27T15:21:09.705714+02:00] php.INFO: User Deprecated: Since symfony/security-core 5.4: Not setting the 5th argument of "Symfony\Component\Security\Core\Authorization\AuthorizationChecker::__construct" to "false" is deprecated. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Since symfony/security-core 5.4: Not setting the 5th argument of \"Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationChecker::__construct\" to \"false\" is deprecated. at /var/www/html/vendor/symfony/security-core/Authorization/AuthorizationChecker.php:50)","tracy_filename":"exception--2023-06-27--4a96b85646.html"} []
I forgot to mention I use docker. Can be some problem with docker?
What is the content of public/index.php
? Did you tried to change the command?
I forgot to mention I use docker. Can be some problem with docker?
It should not.
What is the content of
public/index.php
? Did you tried to change the command?
Content of public/index.php
<?php
use App\Kernel;
use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\ErrorHandler\Debug;
use Symfony\Component\HttpFoundation\Request;
require dirname(__DIR__) . '/vendor/autoload.php';
(new Dotenv())->bootEnv(dirname(__DIR__) . '/.env');
if ($_SERVER['APP_DEBUG']) {
umask(0000);
Debug::enable();
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Its original content. I have never changed it.
So you need to change your .rr.yaml file to be like this:
# ...
server:
command: "php bin/console baldinof:roadrunner:worker"
# If you are not using symfony 5.3+ and the new Runtime component:
# remove the previous `command` line above and uncomment the line below to use the deprecated command.
# command: "php public/index.php"
env:
- APP_RUNTIME: Baldinof\RoadRunnerBundle\Runtime\Runtime
# ...
If you want to use command: "php public/index.php"
, you need to upgrade your symfony project to the last flex recipe and have a index.php like this one: https://github.com/symfony/recipes/blob/main/symfony/framework-bundle/5.4/public/index.php
Running composer recipes:update symfony/framework-bundle
should work, here you can find the doc page about recipes update: https://symfony.com/doc/current/setup/upgrade_major.html#3-updating-recipes
Great, Now it works. Thanks you very much :-)
Hello,
I installed roadrunner-bundle to my project, but I am facing to following problem.
When I run
Application failed in followering error:
I have no idea what is wrong. Can somebody help me?