Jump to:

4885 Posts in 7139 Topics by 1472 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » 300 Bad Request on large UserForm

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 703 Views
  • quanto
    Avatar
    Community Member
    79 Posts

    300 Bad Request on large UserForm Link to this post

    Hi all,

    I installed the FormBuilder Extension to a website. I'm going to use it for some large forms (a lot of restrictions, a lot of formfields). When i'm trying to update the form and I want to save & publish it, it returns the error message "300 bad gateway".

    In the php.ini i set the post_max_size to 16M instead of 8M, but it didn't solve my problem.

    Anybody a clue?

  • Bambii7
    Avatar
    Community Member
    254 Posts

    Re: 300 Bad Request on large UserForm Link to this post

    Its hard to guess what the issue could be without knowing more details.

    Is it possible to capture the apache error log for more detail? Running the following in a terminal on your server.

    >>tail -f /var/log/apache/error.log

  • quanto
    Avatar
    Community Member
    79 Posts

    Re: 300 Bad Request on large UserForm Link to this post

    Error.log is empty. My Firebug gives the message

    There seems to have been a technical problem. Please click the back button, refresh your browser, and try again.

    wich can be found overhere: (/framework/forms/Form.php)

       public function httpSubmission($request) {
          $vars = $request->requestVars();
          if(isset($funcName)) {
             Form::set_current_action($funcName);
          }
          
          // Populate the form
          $this->loadDataFrom($vars, true);
       
          // Protection against CSRF attacks
          $token = $this->getSecurityToken();
    if(!$token->checkRequest($request)) {
             $this->httpError(400, _t("Form.CSRF_FAILED_MESSAGE",
                $request."There seems to have been a technical problem. Please click the back button,"
                . " refresh your browser, and try again."));
          }
    ....
    }

    But I don't have any idea why it is not getting the token, because it seems to be in the $_POST

  • quanto
    Avatar
    Community Member
    79 Posts

    Re: 300 Bad Request on large UserForm Link to this post

    I solved it by setting the max_input_vars to 2000. For more information check http://anothersysadmin.wordpress.com/2012/02/16/php-5-3-max_input_vars-and-big-forms/ 

    703 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.