I just had a rather idiot error in CakePHP: I have a page with an ajax loaded area. In the webpage the session variables were not recognized but in the ajax loaded area they were (no matter how many refreshes of the page).
I did not find the source of the problem, however I have a fix (I don’t know how to reproduce the bug, I just know it happened and so it could happen again). To whoever might need it: If you have the app_controller created, if not, create it yourself, or whatever, make sure you have the following:
1 2 3 4 5 6 7 | <?php class AppController extends Controller { function beforeFilter () { parent::beforeFilter(); if (!isset($_SESSION)) session_start(); //cakephp dumb fix } } |


1 Comment:
Thanks. I’ve been searching for that…