When I try to visit my website without specifying a page (example: index.html), ERR_TOO_MANY_REDIRECTS occurs. error pages can be directly accessed but wont be displayed, so its not a 404 error.
ERR_TOO_MANY_REDIRECTS happens when your website is redirecting you too many times (pretty self-explanatory). Since you are visiting your website without specifying a page, I suspect it has something to do with your htaccess rules so I would start looking there for the problem.
8 Likes
To help you out further, can you provide the URL to your site?
5 Likes
heres my htaccess file:
php_value display_errors Off
Header set Strict-Transport-Security “max-age=31536000” env=HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
ErrorDocument 400 https://dupywars.xyz/400.html
ErrorDocument 401 https://dupywars.xyz/401.html
ErrorDocument 403 https://dupywars.xyz/403.html
ErrorDocument 404 https://dupywars.xyz/404.html
ErrorDocument 503 https://dupywars.xyz/503.html
ErrorDocument 500 https://dupywars.xyz/500.html
It’s been a while since I’ve touched rewrite rules in htaccess, so I’m going to refer you to the wonderful documentation here that IF provides:
After you’ve enabled SSL for your website, you’ll probably want to redirect all traffic on your website to the https version of your site. There are multiple ways to do that. Let’s compare some commonly used ways.
Using script configuration
Some scripts (including Wordpress) have a setting which allows you to set your website URL. By changing this URL from http://example.com to https://example.com , the script will probably redirect visitors to the https version of your site. Even if your script…
Specifically, this code snippet:
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:CF-Visitor} !{"scheme":"https"}
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
I’ve noticed some slight differences in the code shown and yours. Therefore, I wonder if there isn’t a subtle mistake that you’ve made somewhere.
Try replacing your rewrite code with this code and see if it changes anything.
7 Likes
My site is running Flarum.
index.php:
<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
$site = require './site.php';
/*
|-------------------------------------------------------------------------------
| Accept incoming HTTP requests
|-------------------------------------------------------------------------------
|
| Every HTTP request pointed to the web server that cannot be served by simply
| responding with one of the files in the "public" directory will be sent to
| this file. Now is the time to boot up Flarum's internal HTTP server, which
| will try its best to interpret the request and return the appropriate
| response, which could be a JSON document (for API responses) or a lot of HTML.
|
*/
$server = new Flarum\Http\Server($site);
$server->listen();
this shouldnt be the cause of the error because other resources are working fine on the website.
Can you tell me the website where the problem is occurring?
I couldn’t reproduce the issue.
When I try to visit your website without specifying any page, a 403 error will occur.
On the other hand, visiting “index.html” or “index.php” will lead me to 404 errors.
None of these errors is directly connected to the ERR_TOO_MANY_REDIRECTS
error code. Please check if you’ve installed Flarum
properly. I really believe that the issue lies on the way the Flarum
has been configured on your behalf.
Usually it is usually caused by misconfigurations in the .htaccess
file. However, the .htaccess
file on your website is just fine. It should supposed to be working right now.
To fix the 403 error, please follow the instructions in this article:
While working on your website, you may be redirected to the InfinityFree 403 error page . This article explains why this can happen, and what you can do to solve it.
The website directory is missing (or is in the wrong location)
Before checking your website, you should double check the directory on your account that your domain name is linked to.
By default, when you create a website with a certain domain name, that domain name will be linked to the folder named htdocs. Any additional domains …
I do not have knowledge about Flarum. You should check the Flarum’s community forum for better response.
8 Likes
Admin
May 29, 2025, 6:08pm
11
I checked your account and I see there are a few things mixed up.
Your forum on https://forum.dupywars.xyz seems to be loading (or at least not returning a 403 error). That’s where the index.php is on.
https://dupywars.xyz is returning a 403 error, and that’s where the .htaccess you shared is from. But in dupywars.xyz/htdocs
, there is no index.php or index.html file.
There is a subdirectory with more files, and accessing those directly will work probably work. But you need a valid index.php or index.html file placed DIRECTLY in the htdocs folder of your website to remove the 403 error on the home page.
7 Likes
It is very strange, the website loaded correctly now but before my last reply it did return ERR_TOO_MANY_REDIRECTS. I applied no change since that.
also another thing is the glob() function banned?
Admin
May 31, 2025, 7:19pm
14
I checked your website and I don’t see any redirect loops.
No, the glob function is not banned. What issue do you experience that makes you suspect that it might be?
5 Likes
I could not install plugins for osticket. their support team said glob() may be disabled or the phar extension is not installed
{“errors”:[{“status”:“500”,“code”:“unknown”,“detail”:"PDOException: SQLSTATE[42000]: Syntax error or access violation: 1104 The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay in…
Admin
June 2, 2025, 7:51pm
17
The glob()
function is not blocked and the phar
extension is enabled too.
However, phar files can be a bit finicky in my experience. I remember looking into some PHAR related issues a few months ago, which I think was also for osTicket. Maybe this is relevant for you too?
We use open_basedir as one of the measures to ensure websites are contained within their directories and prevent other users from being able to access your files.
However, as far as I can tell, this is causing some issues with PHAR files, so it appears that they don’t work with our current setup.
We should investigate this, but you may be able to work around it in the mean time.
Could you perhaps try to extract the .PHAR file on your computer and just put the extracted files in a directory? I…
A little bit of searching tell me that this is known behavior with osTicket (I vaguely remember seeing similar issues before). Basically, osTicket is trying to run some nasty queries that check a large amount of data in the database, and some database servers have limits set that block this. And our database servers have this too.
It’s technically impossible to change this just for you, and we can’t make config changes for everyone just like that. However, someone did propose a little modification to the osTicket code in the official bug report that could help with this:
opened 11:16AM - 01 Dec 14 UTC
closed 08:16PM - 06 Jan 20 UTC
bug
Search
Since a few weeks after our upgrade to 1.9.4, we're getting a DB Error #1104 whe… never we try to search in osTicket (v1.9.4). We only see the problem in searches. Tickets open and close without a problem so far.
The issue is probably related to the number of records, not necessarily the version of OSTicket, which I believe we coincidentally upgraded a few weeks ago.
We're hosted on Hostmonster, a CPanel shared server environment. We have about 3500 tickets in the database.
Apache version 2.2.29
PHP version 5.4.34
MySQL version 5.5.40-36.1-log
Architecture x86_64
Operating system linux
Perl version 5.10.1
Kernel version 3.4.91-20140518.1.ul6.x86_64
Some MySQL forums suggest adding "SET SQL_BIG_SELECTS=1" before the query, and actually doing that results in a successful query if I submit the query through phpMyAdmin. So, that's a positive sign. Output results are further down.
Unfortunately, I don't have access to my.cnf, so I can't make those changes on my server. The hosting provider doesn't allow changes to my.cnf to include changes like "SET SQL_BIG_SELECTS=1" because it's a shared environment.
Here's the error:
[SELECT DISTINCT COALESCE(B1.ticket_id, B2.ticket_id, B3.ticket_id, B4.ticket_id) FROM (
SELECT object_type, object_id, MATCH (search.title, search.content) AGAINST ('jesus' IN BOOLEAN MODE) AS `relevance`
FROM `cmg__search` `search`
WHERE MATCH (search.title, search.content) AGAINST ('jesus' IN BOOLEAN MODE)
) `search` LEFT JOIN (select ticket_id as ticket_id from cmg_ticket
) B1 ON (B1.ticket_id = search.object_id and search.object_type = 'T') LEFT JOIN (select A2.id as thread_id, A1.ticket_id from cmg_ticket A1
join cmg_ticket_thread A2 on (A1.ticket_id = A2.ticket_id)
) B2 ON (B2.thread_id = search.object_id and search.object_type = 'H') LEFT JOIN (select A3.id as user_id, A1.ticket_id from cmg_user A3
join cmg_ticket A1 on (A1.user_id = A3.id)
) B3 ON (B3.user_id = search.object_id and search.object_type = 'U') LEFT JOIN (select A4.id as org_id, A1.ticket_id from cmg_organization A4
join cmg_user A3 on (A3.org_id = A4.id) join cmg_ticket A1 on (A1.user_id = A3.id)
) B4 ON (B4.org_id = search.object_id and search.object_type = 'O') LEFT JOIN cmg_ticket A1 ON (A1.ticket_id = COALESCE(B1.ticket_id, B2.ticket_id, B3.ticket_id, B4.ticket_id)) LEFT JOIN cmg_ticket_status A2 ON (A1.status_id = A2.id) WHERE ((A1.staff_id=5 AND A2.state="open") OR A1.dept_id IN (1,3,5,6,7) OR A1.team_id IN (1) AND A2.state="open")ORDER BY `search`.`relevance` LIMIT 500]
The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay<br />
<br />
---- Backtrace ----<br />
#0 (root)/include/mysqli.php(177): osTicket->logDBError('DB Error #1104', '[SELECT DISTINC...')<br />
#1 (root)/include/class.search.php(418): db_query('SELECT DISTINCT...', Object(Closure))<br />
#2 (root)/include/class.search.php(66): MysqlSearchBackend->find('jesus', Array, 'Ticket', Array)<br />
#3 (root)/include/ajax.tickets.php(239): SearchInterface->find('jesus', Array, 'Ticket')<br />
#4 (root)/include/staff/tickets.inc.php(141): TicketsAjaxAPI::_search(Array)<br />
#5 (root)/scp/tickets.php(492): require_once('/home1/vinesofa...')<br />
#6 {main}
and here's the output from an EXPLAIN EXTENDED
<table id="table_results">
<thead>
<tr>
<th>id</th>
<th>select_type</th>
<th>table</th>
<th>type</th>
<th>possible_keys</th>
<th>key</th>
<th>key_len</th>
<th>ref</th>
<th>rows</th>
<th>filtered</th>
<th>Extra</th>
</tr>
</thead>
<tbody>
<tr>
<td align="right">1</td>
<td>PRIMARY</td>
<td><derived2></td>
<td>ALL</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td align="right">26</td>
<td align="right">100.00</td>
<td>Using temporary; Using filesort</td>
</tr>
<tr>
<td align="right">1</td>
<td>PRIMARY</td>
<td><derived3></td>
<td>ALL</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td align="right">2936</td>
<td align="right">100.00</td>
<td></td>
</tr>
<tr>
<td align="right">1</td>
<td>PRIMARY</td>
<td><derived4></td>
<td>ALL</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td align="right">14355</td>
<td align="right">100.00</td>
<td></td>
</tr>
<tr>
<td align="right">1</td>
<td>PRIMARY</td>
<td><derived5></td>
<td>ALL</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td align="right">2936</td>
<td align="right">100.00</td>
<td></td>
</tr>
<tr>
<td align="right">1</td>
<td>PRIMARY</td>
<td><derived6></td>
<td>ALL</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td align="right">57</td>
<td align="right">100.00</td>
<td></td>
</tr>
<tr>
<td align="right">1</td>
<td>PRIMARY</td>
<td>A1</td>
<td>eq_ref</td>
<td>PRIMARY,dept_id,staff_id,team_id</td>
<td>PRIMARY</td>
<td>4</td>
<td>func</td>
<td align="right">1</td>
<td align="right">100.00</td>
<td>Using where; Distinct</td>
</tr>
<tr>
<td align="right">1</td>
<td>PRIMARY</td>
<td>A2</td>
<td>eq_ref</td>
<td>PRIMARY</td>
<td>PRIMARY</td>
<td>4</td>
<td>vinesofa_ost1.A1.status_id</td>
<td align="right">1</td>
<td align="right">100.00</td>
<td>Using where; Distinct</td>
</tr>
<tr>
<td align="right">6</td>
<td>DERIVED</td>
<td>A4</td>
<td>index</td>
<td>PRIMARY</td>
<td>PRIMARY</td>
<td>4</td>
<td>_NULL_</td>
<td align="right">2</td>
<td align="right">100.00</td>
<td>Using index</td>
</tr>
<tr>
<td align="right">6</td>
<td>DERIVED</td>
<td>A3</td>
<td>ref</td>
<td>PRIMARY,org_id,id,id_2</td>
<td>org_id</td>
<td>4</td>
<td>vinesofa_ost1.A4.id</td>
<td align="right">70</td>
<td align="right">100.00</td>
<td></td>
</tr>
<tr>
<td align="right">6</td>
<td>DERIVED</td>
<td>A1</td>
<td>ref</td>
<td>user_id</td>
<td>user_id</td>
<td>4</td>
<td>vinesofa_ost1.A3.id</td>
<td align="right">16</td>
<td align="right">100.00</td>
<td></td>
</tr>
<tr>
<td align="right">5</td>
<td>DERIVED</td>
<td>A1</td>
<td>ALL</td>
<td>user_id</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td>_NULL_</td>
<td align="right">2936</td>
<td align="right">100.00</td>
<td></td>
</tr>
<tr>
<td align="right">5</td>
<td>DERIVED</td>
<td>A3</td>
<td>eq_ref</td>
<td>PRIMARY,id,id_2</td>
<td>PRIMARY</td>
<td>4</td>
<td>vinesofa_ost1.A1.user_id</td>
<td align="right">1</td>
<td align="right">100.00</td>
<td>Using index</td>
</tr>
<tr>
<td align="right">4</td>
<td>DERIVED</td>
<td>A1</td>
<td>index</td>
<td>PRIMARY</td>
<td>PRIMARY</td>
<td>4</td>
<td>_NULL_</td>
<td align="right">2936</td>
<td align="right">100.00</td>
<td>Using index</td>
</tr>
<tr>
<td align="right">4</td>
<td>DERIVED</td>
<td>A2</td>
<td>ref</td>
<td>ticket_id</td>
<td>ticket_id</td>
<td>4</td>
<td>vinesofa_ost1.A1.ticket_id</td>
<td align="right">5</td>
<td align="right">100.00</td>
<td></td>
</tr>
<tr>
<td align="right">3</td>
<td>DERIVED</td>
<td>cmg_ticket</td>
<td>index</td>
<td>_NULL_</td>
<td>PRIMARY</td>
<td>4</td>
<td>_NULL_</td>
<td align="right">2936</td>
<td align="right">100.00</td>
<td>Using index</td>
</tr>
<tr>
<td align="right">2</td>
<td>DERIVED</td>
<td>search</td>
<td>fulltext</td>
<td>search</td>
<td>search</td>
<td>0</td>
<td></td>
<td align="right">1</td>
<td align="right">100.00</td>
<td>Using where</td>
</tr>
</tbody>
</table>
I don't really know what to do with that information, but it was suggested that I (or someone) could troubleshoot with it.
Is there any kind of workaround for this? has anyone else seen this problem?
I'd be happy to edit the SQL query if I knew where it was. But I do not have that level of familiarity with OSTicket
Thank you in advance for your help.
If I run the query manually in phpMyAdmin with the prefix "SET SQL_BIG_SELECTS=1;", here are the results:
<table id="table_results">
<thead>
<tr>
<th>COALESCE(B1.ticket_id, B2.ticket_id, B3.ticket_id, B4.ticket_id)</th>
</tr>
</thead>
<tbody>
<tr>
<td align="right">2269</td>
</tr>
<tr>
<td align="right">1098</td>
</tr>
<tr>
<td align="right">2927</td>
</tr>
<tr>
<td align="right">1735</td>
</tr>
<tr>
<td align="right">1035</td>
</tr>
<tr>
<td align="right">2668</td>
</tr>
<tr>
<td align="right">1345</td>
</tr>
<tr>
<td align="right">2158</td>
</tr>
<tr>
<td align="right">1094</td>
</tr>
<tr>
<td align="right">2845</td>
</tr>
<tr>
<td align="right">1734</td>
</tr>
<tr>
<td align="right">1470</td>
</tr>
<tr>
<td align="right">2628</td>
</tr>
<tr>
<td align="right">1344</td>
</tr>
<tr>
<td align="right">3347</td>
</tr>
<tr>
<td align="right">2083</td>
</tr>
<tr>
<td align="right">1046</td>
</tr>
<tr>
<td align="right">2843</td>
</tr>
<tr>
<td align="right">1718</td>
</tr>
<tr>
<td align="right">1769</td>
</tr>
<tr>
<td align="right">2427</td>
</tr>
<tr>
<td align="right">1317</td>
</tr>
<tr>
<td align="right">3343</td>
</tr>
<tr>
<td align="right">1971</td>
</tr>
<tr>
<td align="right">1045</td>
</tr>
<tr>
<td align="right">2802</td>
</tr>
<tr>
<td align="right">1713</td>
</tr>
<tr>
<td align="right">3414</td>
</tr>
<tr>
<td align="right">2411</td>
</tr>
<tr>
<td align="right">1316</td>
</tr>
<tr>
<td align="right">3342</td>
</tr>
<tr>
<td align="right">1955</td>
</tr>
<tr>
<td align="right">1031</td>
</tr>
<tr>
<td align="right">2787</td>
</tr>
<tr>
<td align="right">1712</td>
</tr>
<tr>
<td align="right">3448</td>
</tr>
<tr>
<td align="right">2415</td>
</tr>
<tr>
<td align="right">1255</td>
</tr>
<tr>
<td align="right">3273</td>
</tr>
<tr>
<td align="right">1935</td>
</tr>
<tr>
<td align="right">1024</td>
</tr>
<tr>
<td align="right">2709</td>
</tr>
<tr>
<td align="right">1705</td>
</tr>
<tr>
<td align="right">3493</td>
</tr>
<tr>
<td align="right">2414</td>
</tr>
<tr>
<td align="right">1254</td>
</tr>
<tr>
<td align="right">3244</td>
</tr>
<tr>
<td align="right">1914</td>
</tr>
<tr>
<td align="right">1022</td>
</tr>
<tr>
<td align="right">2706</td>
</tr>
<tr>
<td align="right">1608</td>
</tr>
<tr>
<td align="right">3558</td>
</tr>
<tr>
<td align="right">2255</td>
</tr>
<tr>
<td align="right">1207</td>
</tr>
<tr>
<td align="right">3073</td>
</tr>
<tr>
<td align="right">1913</td>
</tr>
<tr>
<td align="right">931</td>
</tr>
<tr>
<td align="right">2700</td>
</tr>
<tr>
<td align="right">1536</td>
</tr>
<tr>
<td align="right">3413</td>
</tr>
<tr>
<td align="right">2386</td>
</tr>
<tr>
<td align="right">1149</td>
</tr>
<tr>
<td align="right">3072</td>
</tr>
<tr>
<td align="right">1904</td>
</tr>
<tr>
<td align="right">912</td>
</tr>
<tr>
<td align="right">2699</td>
</tr>
<tr>
<td align="right">1510</td>
</tr>
<tr>
<td align="right">2283</td>
</tr>
<tr>
<td align="right">1110</td>
</tr>
<tr>
<td align="right">2889</td>
</tr>
<tr>
<td align="right">1737</td>
</tr>
<tr>
<td align="right">979</td>
</tr>
<tr>
<td align="right">2679</td>
</tr>
<tr>
<td align="right">1506</td>
</tr>
<tr>
<td align="right">2296</td>
</tr>
<tr>
<td align="right">1099</td>
</tr>
<tr>
<td align="right">2991</td>
</tr>
<tr>
<td align="right">1736</td>
</tr>
<tr>
<td align="right">1021</td>
</tr>
<tr>
<td align="right">2669</td>
</tr>
<tr>
<td align="right">1469</td>
</tr>
</tbody>
</table>
That said, supposedly this issue was fixed in newer osTicket versions. So if you’re not running the latest version of osTicket, you may want to update first before doing more tinkering.
4 Likes
system
Closed
June 9, 2025, 7:51pm
18
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.