What should I do if phpcms 500 internal server error occurs? The custom form access in PHPCMS reported a server 500 error
Recent company topics require the use of custom forms, but a server 500 error occurred when accessing and submitting the phpcms custom form plug-in.
After searching on Google for an hour or two and posting on the PHPCMS forum, I still haven't found a solution.
It is better to rely on yourself than to ask for help. The first thing I thought of was whether there was a configuration problem with the IIS7 server, so I tested it on the local Apache server, but found that the problem still existed. I was so miserable that I could only debug step by step in the form module of phpcms. After debugging, I found that the error occurred in showmessage() around line 65 of
phpcms\modules\formguide\index.php. method
So I went to the showmessage() method in phpcms\libs\functions\global.func.php to debug
Then I found that the bug appeared when referencing the template() method, because The template() method is a public method and cannot be changed at will. I returned to line 65 of phpcms\modules\formguide\index.php and commented out the showmessage() method and changed it to
$url=APP_PATH; echo "<script> alert('提交成功!'); </script>"; echo "<meta http-equiv='Refresh' content='0;URL=$url'>"; // showmessage(L('thanks'), APP_PATH);
This is the custom form All functions in can be used normally. If there is a better solution, everyone is welcome to communicate and make progress together.
PHP Chinese website, a large number of free PHPCMS tutorials, welcome to learn online!
The above is the detailed content of What to do if phpcms 500 internal server error occurs. For more information, please follow other related articles on the PHP Chinese website!