Session can't start

Hi all, I have developed a website on xamp ( windows) and works perfectly, but on my server VPS (Centos 5.6) with php 5.4.26 do not work. The session can't start. This is var_dump($session).

LOCAL:

object(Phalcon\Session\Adapter\Files)#97 (3) { ["uniqueId":protected]=> NULL ["started":protected]=> bool(true) ["_options":protected]=> NULL }

VPS SERVER:

object(Phalcon\Session\Adapter\Files)#11 (3) { ["uniqueId":protected]=> NULL ["started":protected]=> bool(false) ["_options":protected]=> NULL }

On this server I have many other applications developed in Symfony2, codeigniter, and sessions works perfectly.

Any idea? I've recompiled Phalcon 2 times and still not working.

Phalcon has an inconvenient habit of hiding any errors/warnings/notices it encounters. There's a chance one of those is being generated when Phalcon tries to start the session. The most common problem is that output has already been sent to the browser before session_start() is called internally.

You can either reconfigure PHP to log all errors to a file, then check that file, or you can call exit() before the view gets displayed. Either way, you should see the error being generated.



2.5k
edited May '14

I've solved the problem, basically had an "output" before making the sessionstart (), but Phalcon does not show the classic error (sessionstart() Cannot send session cache limiter headers alredy sent).

Thank you #quasipickle for giving me an idea with your comment.