You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im trying to see if its possible to get Xenforo working with FrankenPHP.
This is my Caddyfile
{
{$CADDY_GLOBAL_OPTIONS}
frankenphp {
worker ./worker.php
}
order mercure after encode
order vulcain after reverse_proxy
order php_server before file_server
order php before file_server
}
forum.mydomain.net {
# Set the root to the /xenforo directory
root * /app
# Enable compression encoders
encode zstd br gzip
# Include additional server directives (if any)
{$CADDY_SERVER_EXTRA_DIRECTIVES}
php_server {
index index.php
}
# Additional configurations for Xenforo can be placed here
tls {
dns cloudflare {env.CF_API_TOKEN}
}
}
This is my worker.php that I have tried to make to work well with Xenforo
<?php// /app/worker.php// Prevent worker script termination when a client connection is interrupted
ignore_user_abort(true);
// Boot Xenforo// Adjust the path to reflect the location of Xenforo's initialization filerequire __DIR__ . '/src/XF.php';
// Start the application
\XF::start();
// Handler outside the loop for better performance (doing less work)$handler = staticfunction () {
// Called when a request is received$app = \XF::setupApp('XF\Pub\App');
// Process the request and return the response$response = $app->run();
$response->send();
};
// Handle requests with a limit on the number of requests or other termination conditions
for ($nbRequests = 0, $running = true; isset($_SERVER['MAX_REQUESTS']) && ($nbRequests < (int)$_SERVER['MAX_REQUESTS']) && $running; ++$nbRequests) {
$running = \frankenphp_handle_request($handler);
// Do something after sending the HTTP response$app->terminate();
// Call the garbage collector
gc_collect_cycles();
}
// Cleanup (if applicable)
\XF::shutdown();
However when I do docker compose up you can see from the logs what it spams in my console.
I gather its an issue to do with the worker.php but I have no clue where to start to figure out what the issue may be?
What happened?
Hey All!
Im trying to see if its possible to get Xenforo working with FrankenPHP.
This is my Caddyfile
This is my worker.php that I have tried to make to work well with Xenforo
However when I do
docker compose up
you can see from the logs what it spams in my console.I gather its an issue to do with the worker.php but I have no clue where to start to figure out what the issue may be?
Any guidance would be greatly appreciated! :)
docker-composer.yml if its of any use
Build Type
Docker (Debian Bookworm)
Worker Mode
Yes
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
Relevant log output
The text was updated successfully, but these errors were encountered: