Replies: 2 comments 16 replies
-
|
Update. So this is interesting. If I rename the worker.php script file to index.php and update the worker config in the Caddyfile (see below), everything works. ???Why??? This isn't mentioned in the documentation, which even has worker.php as the name of the script in the examples. |
Beta Was this translation helpful? Give feedback.
-
|
Wait. so the working directory that we typically use in our org is /var/www/html for the root of the application. I've just added a few folders here and there to compartmentalize the worker.php file (which isn't in the root of the application but inside the bin/frankenworker/ So, this won't work? I just want to make the code such that it can run traditionally with php-fpm and with our internal framework (which has a different implementation of the index.php) I just broke my head for hours till I ran into this discussion. So in my case I will need to change the root of the application to /app ? Can't go with /var/www/html? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all. I'm new to FrankenPHP but have my own PHP framework that I'm trying to get working with it. I have it working fine in non-worker mode and I'm finding it a lot faster than FPM or others. So now I'm trying to get it working in worker mode and not having much luck.
So what happens is, my worker script runs, starts up and bootstraps my application correctly and I can debug it up to when it executes
frankenphp_handle_request($handler), but then that's it. None of my actual requests make it to the handler.The confusing part is that everything "appears" to work because requests are being sent to my standard
index.phpentrypoint.If I remove the
root * /from the Caddyfile then nothing works and I get 404s.What am I doing wrong here? I've been through the documentation a bunch of times and come up blank, but obviously I've missed a step. I'm hoping someone can shed some light on the issue for me. Thanks.
Caddy file:
Worker script:
Beta Was this translation helpful? Give feedback.
All reactions