Menu

#2842 (ok 3.2)Request-URI Too Large error from redirect header

Latest_Git
fixed
1
2013-06-11
2009-02-28
No

After running a query using the text area in the SQL tab in database scope, a successful execution is followed by a redirect to db_sql.php.

In my case the executed query was the create statement for a large table, of which the structure was more the 8000 chars.
The whole statement is passed as a GET var to db_sql.php via a Location header.
This results in an error given by Apache (Request-URI Too Large).

After some digging I see no reason why this redirect is necessary in the first place.
As a test case I replaced the call to PMA_sendHeaderLocation in libraries/db_table_exists.lib.php with "include("db_sql.php");"
This gave me the expected result without any error, since the redirection step is skipped.
This however needs further testing before I dare to commit this.

A more general solution would be to extend PMA_sendHeaderLocation() to POST a form instead of sending a header in cases where the url is too long.
I'll also look into this.

This is related to to bugs: #1253125 and #1490556

Discussion

  • Marc Delisle

    Marc Delisle - 2009-02-28

    Herman,
    it seems OK to replace with an include. Please do it in this way:
    include './db_sql.php';

    Also we should get rid of redirection everywhere possible; and we have too many include() and require(), it's easy to get lost following the logic.

     
  • Herman van Rink

    Herman van Rink - 2009-03-03
    • priority: 5 --> 1
    • summary: Request-URI Too Large error from redirect header --> (ok 3.2)Request-URI Too Large error from redirect header
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2009-06-15
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     
MongoDB Logo MongoDB