Request exceeded the limit of 10 internal redirects

Good afternoon,

I’m migrating a Slim website and I’m having trouble. There’s a problem with Apache. The local version of the website is working.

Here is the Apache log of the site:

[Tue Jul 16 12:27:28.306707 2024] [fcgid:info] [pid 3523161:tid 140581598164096] mod_fcgid: Process manager 3523161 started
[Tue Jul 16 12:27:28.308500 2024] [mpm_event:notice] [pid 3523159:tid 140581598164096] AH00489: Apache/2.4.59 (Unix) mod_fcgid/2.3.9 configured -- resuming normal operations
[Tue Jul 16 12:27:28.308564 2024] [mpm_event:info] [pid 3523159:tid 140581598164096] AH00490: Server built: Jun  4 2024 16:17:18
[Tue Jul 16 12:27:28.308571 2024] [core:notice] [pid 3523159:tid 140581598164096] AH00094: Command line: '/usr/alwaysdata/apache/2.4.59/bin/apache -f /home/live-studi-sql/admin/config/apache/apache.conf -D FOREGROUND'
[Tue Jul 16 12:27:28.537440 2024] [core:error] [pid 3523162:tid 140581581555456] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Tue Jul 16 12:27:28.663975 2024] [core:error] [pid 3523162:tid 140581564770048] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://live-studi-sql.alwaysdata.net/index.php
[Tue Jul 16 12:37:06.760809 2024] [core:error] [pid 3523162:tid 140581547984640] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Tue Jul 16 12:38:49.636713 2024] [core:error] [pid 3523162:tid 140581057591040] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Tue Jul 16 12:38:50.410860 2024] [core:error] [pid 3523162:tid 140581040805632] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Tue Jul 16 12:38:51.107725 2024] [core:error] [pid 3523162:tid 140581024020224] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Tue Jul 16 12:39:00.184606 2024] [core:error] [pid 3523162:tid 140581007234816] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Tue Jul 16 13:09:21.031762 2024] [mpm_event:notice] [pid 3523159:tid 140581598164096] AH00491: caught SIGTERM, shutting down
[Tue Jul 16 13:09:21.043150 2024] [fcgid:info] [pid 3523161:tid 140581598164096] mod_fcgid: Process manager 3523161 stopped

I follow tis page for my local version:
https://www.slimframework.com/docs/v4/start/web-servers.html

Here are the .htaccess files i use for the website

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

and

RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]

I migrated another website with the same .htaccess successfully.

Thank you for your help.

You can try to remove all routes execpt the home route to see if the behavior is the same.

Hello odan,

The error is the same:

my route.php:

?php

use App\Controllers\ControlleurFormulaire;

use Slim\App;
use Slim\Views\PhpRenderer; 
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use App\Controllers\ControlleurCommentaires; // Add this line to import the missing class

//pages Web - icônes de menu
$renderer = new PhpRenderer(__DIR__ . "/../src/Views");

$app->get('/accueil', function (Request $request, Response $response, $args) use ($renderer) {
    return $renderer->render($response, 'accueil.php'); 
 });

the apache log:

[Tue Jul 16 12:27:28.308500 2024] [mpm_event:notice] [pid 3523159:tid 140581598164096] AH00489: Apache/2.4.59 (Unix) mod_fcgid/2.3.9 configured -- resuming normal operations
[Tue Jul 16 12:27:28.308564 2024] [mpm_event:info] [pid 3523159:tid 140581598164096] AH00490: Server built: Jun  4 2024 16:17:18
[Tue Jul 16 12:27:28.308571 2024] [core:notice] [pid 3523159:tid 140581598164096] AH00094: Command line: '/usr/alwaysdata/apache/2.4.59/bin/apache -f /home/live-studi-sql/admin/config/apache/apache.conf -D FOREGROUND'
[Tue Jul 16 12:27:28.537440 2024] [core:error] [pid 3523162:tid 140581581555456] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Tue Jul 16 12:27:28.663975 2024] [core:error] [pid 3523162:tid 140581564770048] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://live-studi-sql.alwaysdata.net/index.php
[Tue Jul 16 12:37:06.760809 2024] [core:error] [pid 3523162:tid 140581547984640] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Tue Jul 16 12:38:49.636713 2024] [core:error] [pid 3523162:tid 140581057591040] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Tue Jul 16 12:38:50.410860 2024] [core:error] [pid 3523162:tid 140581040805632] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Tue Jul 16 12:38:51.107725 2024] [core:error] [pid 3523162:tid 140581024020224] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Tue Jul 16 12:39:00.184606 2024] [core:error] [pid 3523162:tid 140581007234816] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Tue Jul 16 13:09:21.031762 2024] [mpm_event:notice] [pid 3523159:tid 140581598164096] AH00491: caught SIGTERM, shutting down
[Tue Jul 16 13:09:21.043150 2024] [fcgid:info] [pid 3523161:tid 140581598164096] mod_fcgid: Process manager 3523161 stopped
AH00112: Warning: DocumentRoot [/home/live-studi-sql/www/] does not exist
[Tue Jul 16 16:30:30.183190 2024] [fcgid:info] [pid 4078040:tid 140145530279040] mod_fcgid: Process manager 4078040 started
[Tue Jul 16 16:30:30.185243 2024] [mpm_event:notice] [pid 4078038:tid 140145530279040] AH00489: Apache/2.4.59 (Unix) mod_fcgid/2.3.9 configured -- resuming normal operations
[Tue Jul 16 16:30:30.185308 2024] [mpm_event:info] [pid 4078038:tid 140145530279040] AH00490: Server built: Jun  4 2024 16:17:18
[Tue Jul 16 16:30:30.185316 2024] [core:notice] [pid 4078038:tid 140145530279040] AH00094: Command line: '/usr/alwaysdata/apache/2.4.59/bin/apache -f /home/live-studi-sql/admin/config/apache/apache.conf -D FOREGROUND'
[Tue Jul 16 16:30:30.410950 2024] [core:error] [pid 4078041:tid 140145513670400] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Tue Jul 16 16:30:30.549186 2024] [core:error] [pid 4078041:tid 140145496884992] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://live-studi-sql.alwaysdata.net/accueil
[Tue Jul 16 16:33:18.643006 2024] [core:error] [pid 4078041:tid 140145480099584] [client 90.27.205.205:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

the processus log:

[16/Jul/2024:12:27:28 +0200] [upstream] Upstream started PID: 3523159
[16/Jul/2024:12:27:28 +0200] [upstream] [3523159] STDERR: AH00112: Warning: DocumentRoot [/home/live-studi-sql/www/] does not exist
[16/Jul/2024:13:09:21 +0200] [upstream] [3523159] SIGTERM sent to upstream
[16/Jul/2024:13:09:21 +0200] [upstream] [3523159] Upstream stopped (reason: idle)
[16/Jul/2024:16:30:30 +0200] [upstream] Upstream starting: /usr/alwaysdata/apache/2.4.59/bin/apache -f /home/live-studi-sql/admin/config/apache/apache.conf -D FOREGROUND (env: {'HOME': '/home/live-studi-sql', 'LANG': 'en_US.UTF-8', 'LC_ALL': 'en_US.UTF-8', 'PATH': '/home/live-studi-sql/.local/bin:/home/live-studi-sql/.local/share/gem/ruby/3.1.0/bin:/home/live-studi-sql/.gem/ruby/3.1.0/bin:/home/live-studi-sql/.composer/vendor/bin:/home/live-studi-sql/.npm-packages/bin:/usr/local/bin:/usr/bin:/bin', 'TMPDIR': '/home/live-studi-sql/admin/tmp', 'APACHE_ROOT': '/usr/alwaysdata/apache/2.4.59'}, cwd: /home/live-studi-sql/)
[16/Jul/2024:16:30:30 +0200] [upstream] Upstream started PID: 4078038
[16/Jul/2024:16:30:30 +0200] [upstream] [4078038] STDERR: AH00112: Warning: DocumentRoot [/home/live-studi-sql/www/] does not exist

the requêtes http:

live-studi-sql.alwaysdata.net 90.27.205.205 - - [16/Jul/2024:12:27:28 +0200] "GET /favicon.ico HTTP/1.1" 500 531 "http://live-studi-sql.alwaysdata.net/index.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0"
live-studi-sql.alwaysdata.net 90.27.205.205 - - [16/Jul/2024:12:37:06 +0200] "GET /index.php HTTP/1.1" 500 531 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0"
live-studi-sql.alwaysdata.net 90.27.205.205 - - [16/Jul/2024:12:38:49 +0200] "GET /index.php HTTP/1.1" 500 531 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0"
live-studi-sql.alwaysdata.net 90.27.205.205 - - [16/Jul/2024:12:38:50 +0200] "GET /index.php HTTP/1.1" 500 531 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0"
live-studi-sql.alwaysdata.net 90.27.205.205 - - [16/Jul/2024:12:38:51 +0200] "GET /index.php HTTP/1.1" 500 531 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0"
live-studi-sql.alwaysdata.net 90.27.205.205 - - [16/Jul/2024:12:39:00 +0200] "GET /accueil HTTP/1.1" 500 531 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0"
live-studi-sql.alwaysdata.net 90.27.205.205 - - [16/Jul/2024:16:30:30 +0200] "GET /accueil HTTP/1.1" 500 531 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0"
live-studi-sql.alwaysdata.net 90.27.205.205 - - [16/Jul/2024:16:30:30 +0200] "GET /favicon.ico HTTP/1.1" 500 531 "http://live-studi-sql.alwaysdata.net/accueil" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0"
live-studi-sql.alwaysdata.net 90.27.205.205 - - [16/Jul/2024:16:33:18 +0200] "GET / HTTP/1.1" 500 531 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0"

There is a warning that the DocumentRoot does not exist. Try to check that.

AH00112: Warning: DocumentRoot [/home/live-studi-sql/www/] does not exist

I use FileZilla to transfer my files. I have a problem with the transfer (71 failed transfers)

content deleted

here is my composer.json:

{
    "autoload": {
        "psr-4": {
          "App\\": "src/"
        }
      },
        "require": {
        "slim/slim": "^4.13",
        "nyholm/psr7": "^1.8",
        "nyholm/psr7-server": "^1.1",
        "php-di/php-di": "^7.0",
        "php-di/invoker": "^2.0",
      "vlucas/phpdotenv": "^5.6",
      "monolog/monolog": "^3.5",
      "slim/php-view": "^3.2"
    }     
}

You should not post sensitive data here. Check your server permissions etc.

What are the sensitive data?

For example the username and password of your server.

Youps! I didn’t read enough of what I posted. Thanks. I
will change the password

Two problems:

Thanks Odan.

Have a good day.