PHPCMS background Set role permissions, suddenly 500 error occurred, how to solve it?

Source: Internet
Author: User
When setting role permissions in the PHPCMS background, click the default site for a 500 error, such as.
As shown in the normal case. Originally good, do not know how to suddenly not work, please master answer?? What's going on here?


Reply to discussion (solution)

That request has a serious grammatical error, go in and take a look at the breakpoint.

This request is called the same file as the local, if there is a syntax error error, why the local normal, the server is not normal?

Look at the mistake.

Program execution to foreach front without error
foreach ($result as $n = = $t) {
$result [$n] [' cname '] = L ($t [' name '], ' ", $modules);
$result [$n] [' checked '] = ($this->op->is_checked ($t, $_get[' Roleid '), $siteid, $priv _data))? ' Checked ': ';
$result [$n] [' level '] = $this->op->get_level ($t [' id '], $result);
$result [$n] [' parentid_node '] = ($t [' ParentID '])? ' class= ' child-of-node-'. $t [' ParentID ']. ' "': ';
}
A 500 error is reported after the program executes to foreach

That is, foreach has a mistake here, but it's not clear how the Foreach loop is causing the 500 error.

500 is the server refused to respond, the PHP program is generally an error occurred.
You don't give the wrong message, and the fairy can't help you.

If the local is normal, the server is not normal then can only explain that the program does not have a syntax error, but does not mean that there is no logical error
For example, except 0, the variable value is illegal, the field can not find 、。。。。
Also with PHP version, configuration is related

In PHP programs, use Ini_set ("Display_errors", "on"); Error_reporting (E_all); Turn on the error prompt and no error message. At this point the status code becomes 200, but the right side still does not appear to want content. To Phpcms really no words, originally good, and then click on it can not be used, a bit let people feel the mind

If there is a problem with the configuration, PHP version, then why the use of the previous use of no problem, but now inexplicably appeared the problem? Do not understand is the problem of the program, server issues, or permissions issues

Like folder read and Write permissions, path, PHP version, PHP environment settings, Server Software, can cause errors

There is also a low-level error in the Rights Management Section of the PHPCMS with the underlying code.
/modules/admin/classes/role_op.class.php
The last method, traverse inside must be the current button to find the top level, can not find to call the current method again, so the menu a lot, directly die.

  • Related Article

    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.