Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Installing SilverStripe /

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

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

300 Bad Request on large UserForm


Go to End


4 Posts   1825 Views

Avatar
quanto

Community Member, 91 Posts

30 May 2013 at 2:36am

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?

Avatar
Bambii7

Community Member, 254 Posts

31 May 2013 at 12:49pm

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

Avatar
quanto

Community Member, 91 Posts

1 June 2013 at 12:34am

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

Avatar
quanto

Community Member, 91 Posts

3 June 2013 at 8:25pm

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/