CakePHP showing blank page

14,255

Solution 1

In the end it was APC cache conflicts between multiple Cakes on the same server.

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

Solution 2

this post is getting old, but today I upload a new website to a server and get the blank page so I share my experience. I have no access to server logs so I was stuck. I was very confused because that server has running another sites with cakephp so I think the problem was mod_rewrite. After several ours of testing the problem was that the server's php version was too old to run cake 2.8.3. so I use an older version of cake and everything works fine. Hope this help someone.

Solution 3

Cakephp can show also blank page, if you have some component included in your controller and it contains error, and if for some reason debug does not work(though debug level in core.php is 2 or 3 ) in your component , it just shows blank page.

Solution 4

Happened to me when I had a constant defined, did not notice this and defined another one with the same name.

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

A few years later I will add a comment here:

This would mean there was a syntax error, make sure u display these.

Solution 5

It might be due to white space in end of file Please check your all files if white space is there after ‘?>’ tag it redirects it to blank page or you can remove ‘?>’(closing php tag) to remove this problem.

Share:
14,255
472084
Author by

472084

Updated on August 07, 2022

Comments

  • 472084
    472084 over 1 year

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

    By stops working I mean whatever page I go to just shows a blank page, empty source.

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

    To fix this all I need to do is change debug to 2, refresh and then change it back to 0.

    I do not know what triggers this to happen, I have tried clearing the cache folders.

    There are no log entries in /app/tmp/logs/error from the last week.

    Any ideas would be great. Thanks.