Phpcms development problems and Solutions

Problem: the foreground user cannot register or log in, and the backstage member management function also fails.
Customer demand: the database is only for internal use of the school and not open to the outside world. Therefore, it is necessary to set permissions so that users can browse and use the database after logging in. Users can add the database uniformly in the background.
Solution: first solve the background can not add operation user problem, and then solve the foreground can not login problem. Find the corresponding controller method, the template output via var_dump(), and pinpoint which function and which line failed. The front page reviews the elements, looking at network and console.
Error: Missing the \phpsso_server module file and the \ PHPCMS \templates\default\content\message.html file in the root directory.
Error reason analysis: the controller to add membership and login registration will refer to the function in PHPSSO to make judgment, because the file was deleted, so the missing method led to error judgment, and the operation failed.
from my copy the file on the server came in and found still fails, and in my project running on the server, there are doubts still lack of a file or the server configuration problem, the last row of fault detection is phpsso there are database configuration, as well as the domain name configuration, problem solving after the change.
at this time there was a problem again, log in at the front desk, it found that there will be a 500 error, then there is no any other error message, at this point the server error log (\ HwsApacheMaster \ Apache \ logs \ the error log) found errors for * * “Premature end of script headers (script head early end)” * *, received at this time a bit, so online on baidu, found that writing is a bit complicated to see different, said the reasons are not enough file permissions, CGI permissions: I searched how to configure and start CGI. I first changed the configuration on my server according to the operation (that is, changed the PHP configuration) and found that it still works normally, indicating that it is not a CGI problem. File permissions also changed to find or report error.
here is a little collapsed and no more errors, didn’t also found online to effective solutions.
later still use old way: by var_dump () and die, fault line by line. \ PHPCMS \libs\functions\global.func. PHP \ PHPCMS \libs\functions\global.func. PHP \ PHPCMS \libs\functions\global.func
function showMessage (MSG,url_forward = ‘goback’, ms=1250,dialog = ‘ ‘, $returnJS = ‘) {
(defined(‘ IN_ADMIN ‘)) {
i>de (admin::admin_tpl(‘ showMessage ‘, ‘admin’));
} else {
clude (template(‘ content ‘, ‘message’));
}
exit;
>
>
>
>
>
>
>
>
>
>
>
> 2. When there is no obvious error, the most important thing to solve the problem is patience, calm down analysis will always solve. The solution is simple, use var_dump and die background output, foreground view, line by line positioning;
3. The first step can solve most problems independently, and the second step can improve the time efficiency of solving problems.
Note: the
add background user controller:/PHPCMS/modules/member/templates/member_add TPL. PHP
analysis of related documents: /phpcms/languages/zh-cn/member.lang.php
/phpcms/modules/member/member.php
/phpcms/modules/member/classes/client.class.php
/phpcms/phpcms_server/phpcms/modules/phpsso/index.php
/phpcms/templates/default/member/mini.html
/phpcms/modules/member/index.php


Read More: