Discuze playback Prompt "Sorry, your request was not routed correctly or the form validation string did not match, unable to submit"

Source: Internet
Author: User

I don't know where I see the article, but it's practical:

Background: Discuze simply record a registration script, no error in the log, in the report prompted "Sorry, your request is incorrect or the form validation string does not match, unable to submit" ", the following methods can be resolved

In general, "Sorry, your request is incorrect or the form validation string does not match," the problem is that it occurs when the form is submitted.

Because discuz in the submission of the form will be checked, Submitcheck () function, this function will first verify the form of Formhash, if the formhash problem, then will appear "Sorry, your request is not routed correctly or the form validation string does not match, cannot commit" This problem.

Submitcheck () This function is placed in the source\class\helper\helper_form.php.

Workaround:

The first method:

Please check if your local time is the same as the time of the server. If inconsistent, synchronize the time to update the cache. ---this to be set down

The second method:

Please check the form you submitted, whether there is <input type= "hidden" name= "Formhash" value= "{$formhash}", if not please add it manually. (This usually happens on IE6 and other browsers are normal.) )

The third method:

Open "source\class\helper\helper_form.php" and then Change "$_get[' formhash '" = = Formhash () "to" $_g[' formhash '] = = Formhash () ".

Fourth Method

In the submitted action controller, remove the Submitcheck () validation. (This approach requires familiarity with the core of Discuz.) For example, when registering, you need to find the On_register () method in the Register_ctl class in the "source\class\class_member.php" file, in the IF (! Submitcheck (' Regsubmit ', 0, $seccodecheck, $secqaacheck)) {}, you can change Submitcheck () to If (Isset ($_post)) {}. Although unsafe, But it's also a workaround. ---that's the way to solve my problem.

The Fifth method:

Reload Disucz ...----that's the root of the rule.

May be in the use of the fourth method, the replay has prompted other errors, such as "user name less than three digits" "password inconsistent" and other strange problems, simply a reload, as long as the deletion, var/www/html files, re-copy the upload file, quickly solve my problem ... Finally, there's no such thing as an inexplicable problem.

Discuze playback Prompt "Sorry, your request was not routed correctly or the form validation string did not match, unable to submit"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.