CakePHP shows a blank page

I have a website that is completed and loaded, at first it works fine, but after a while it stops working.

As a result of the termination of work, I mean that any page that I go to simply shows a blank page, an empty source.

In Chrome, however, I get HTTP Error 500 (Internal Server Error)

To fix this, all I have to do is change debug to 2, update and then change it to 0.

I do not know that this can happen, I tried to clear the cache folders.

There have been no log entries in the / app / tmp / logs / error log in recent weeks.

Any ideas would be great. Thanks.

+7
source share
8 answers

In the end, it was an APC cache conflict between multiple Cakes on the same server.

All I had to do was change $prefix in config.php and it worked.

+7
source

Cakephp may also show a blank page if you have some component included in your controller and it contains an error, and if for some reason the debugging is not working (although the debugging level in core.php is 2 or 3) in your component, it just shows a blank page.

+2
source

It happened to me when I determined a constant, did not notice it and defined another with the same name.

 const VISIBLE = 1; const DELETED = 0; const VISIBLE = 1; 

A few years later I will add a comment here:

That would mean a syntax error, make sure u displays them.

+2
source

this post is getting older, but today I upload a new website to the server and get a blank page to share my experience. I do not have access to server logs, so I'm stuck. I was very confused because this server has other sites with cakephp, so I think the problem was mod_rewrite. After several of our tests, the problem was that the php server version was too old to run cake 2.8.3. so I am using an older version of the cake and everything works fine. Hope this helps someone.

+2
source

Perhaps this is due to a space at the end of the file. Please check all files if there is a space after the tag ?? > Redirects it to a blank page or can you delete '? > (closing php tag) to remove this problem.

+1
source

In my case, I had

 public function appError($error) {} 

in AppController , which was supposed to redirect to page 404 , and I commented on the redirect. this led to my having a blank page.

+1
source

I had the same problem: it was not the app / tmp / cache / models folder. After its creation, no more problems arise.

0
source

In my case, the problem was not in the cache. Enabling CakePHP debugging should be helpful. Change the value to

 Configure::write('debug', 0); 

in

 Configure::write('debug', 1); 

in app / cake / core.php to show real errors.

0
source

All Articles