简体   繁体   中英

CakePHP not rendering views for some controllers on live server

I have a problem, that I can't figure out.

I made an app with CakePHP that work's perfectly fine on localhost (via XAMPP), but has strange issue on live server.
There are (obviously) many controllers in my app, and the problem is - some of them are not rendering any view whatsoever! They output neither proper content, nor any error data - simply empty page (no layout either). About half of them is working fine, and the other half - not.

I have no idea what might that be, so that's why I'm here - any ideas?

This may be an old thread, but I'm replying this as a possible answer and solutions for other people who might have the same problem.

  1. What you should do when you have this problem is to check the error log inside /app/tmp/logs . From there you can perhaps see what cause the error.

  2. Make sure your debug is set to 2 for all error reporting to be displayed if any. The debug can be turned on in app/Config/core.php .

  3. From the logs, you might see the error is with the maximum memory reached. For this, you'll need to fix your code and optimize it.

  4. Please check if your URL rewriting mod_rewrite is enabled in your live server. Some server might require you to set it up yourself.

A piece of advice, always check with your error logs, it always show you what the problems are and can help you solving it easier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM