An often asked (PHP) question in the CakePHP IRC channel is how to fix the problem which causes the following warning:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at
/home/dho/projects/test/trunk/app/controllers/users_controller.php:7) in /home/dho/projects/cake_1.2.x.x/cake/libs/session.php
on line 131

It is a bit nasty. The warning points us to line 7 (the last line). Hm, but line 7 looks correct, doesn’t it?

<?php
    class UsersController extends AppController {
        var $uses = null;

        function edit() {}
    }
?> 

Well, if you mark line 7 with your mouse, you see that there is a space after the “>” character. And this space is the cause of the warning. If you remove the space, the warning disappears.