The Web solution cannot be found after you cancel debug mode under Linux thinkphp

Source: Internet
Author: User

1, the biggest suspect is the runtime directory insufficient permissions, resulting in the common~runtime.php file can not be generated,

Resolution: 1, the entire runtime directory delete, let the system regenerate;

2, to the runtime and all the following files sufficient permissions 0755.

2, online search as follows:

Troubleshooting thinkphp off debug mode times wrong Problem summary

Submission: Hebedich font: [Increase decrease] Type: Reprint time: 2015-04-22 I want to comment

This article summarizes the individual in the project encountered in the shutdown thinkphp debugging mode encountered several cases of error and the final treatment method, very simple and practical, here to share to everyone, there is a need for small partners to refer to the next.

Case one:

Recently developed a project with thinkphp, the local development test completed upload to the server, the first time to open the normal, and then refresh the page when the "page debugging error, cannot find the page, please retry" error.

I am depressed, obviously local set define (' App_debug ', false) run no problem, how to put on the server on the error?

Baidu,google still did not find the solution, suddenly found that the project App_name/runtime/cache directory and App_name/runtime/logs directory does not have writable permissions, decisive change, F5, ah well, Mom doesn't have to worry about error messages any more!

Case TWO:

Thinkphp a problem similar to the following occurs when the App_debug constant is set to false:

Copy CodeThe code is as follows:
Parse error:syntax error, unexpected t_string in e:\phpnow\htdocs\ojbak\runtime\~app.php on line 1

or directly report "Server error", what should I do?
This has something to do with PHP, to modify the configuration in php.ini.

Copy CodeThe code is as follows:
Short_open_tag = On

Because the build method inside the app.class.php:
When debug mode is turned on, the contents of the relevant file are retrieved and then re-assembled into a file, which is automatically added.
That's the ~app.php file you saw.
However, when you do not turn on debug mode, the relevant files will be loaded every time, this way, your error will be exposed.

Case THREE:

After you set App_debug to False in thinkphp, the data query (select, find, and so on) always displays the first one: But after setting the App_debug to true, it's normal. Why is this? Do you have any solutions?

Normally, App_debug is the debug mode, put to the online environment, as far as possible to set to false:

Find a select query by yourself, and in the case of debug shutdown, debug the SQL generated after the query by writing the file.

The above mentioned is the whole content of this article, I hope you can like.

The Web solution cannot be found after you cancel debug mode under Linux thinkphp

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.