0
votes

I'm deploying a CakePhp project that works fine in localhost but at production i have white screen when i call any index action of any controller. Debug level is 3, no cake php error log, no httpd error log, no php error log.nothing to debug with logs.

Permissions are ok, cache folders are empty, mod_rewrite ok , white spaces deleted at the end of files...

I can call a login action but the login fails. i was debugging with print_r and echo, then i discovered that CakePhp could not initialize the session, the session_id is aways null. the method setFlash is not working. Also there is no flash messages of login fails.

Please Help Me.

3
White screen of death! I spent 2 days on it and i cant find a solution... - Eduardo B.M.
can u update your status of session after trying stackoverflow.com/questions/15257265/… ? - Kishor Kundan
Is the tmp directory writable? - noslone
session is not working with those instructions.... - Eduardo B.M.
tmp is writable... and there are files cached there - Eduardo B.M.

3 Answers

3
votes

I've had the same problem with my application.

Check this:

1.) Inside your controllers, check is there anything before your <?php tags (BOM). I was always checking with vim.

2.) Check if your tmp folder is writable. (chmod -R 777 app/tmp)

3.) Check if theres an updated version of PHP installed on your server.

Maybe you should check 2.) first.

1
votes

I solved the problem! It was a file encoding problem! In my localhost project UTF-8 works fine (Windows 7 with Wamp) but at linux CentOS server the UTF-8 does not work, i had to save all files as "ANSI as UTF-8" (without BOM).

0
votes

Have you tried using a different method to store sessions?

Cake by default uses fileEngine, but if permissions are screwed up or there's error writing to files, you can store sessions via mySQL.

I think there is a field to set sessions to MEMORY or DATABASE, instead of FileEngine.