Today I noticed a "strange" session problem with cforms.
I have a login form which calls my own page and stores an user object based on cforms given data in a session. If user was successfully logged-in this page forwards to another one. Here come the session problem with "incomplete object".
The problem comes from the cform function:
function start_cforms_session() {
@session_cache_limiter('private, must-revalidate');
@session_cache_expire(0);
@session_start();
}
after modifying this function to:
function start_cforms_session() {
require_once $_SERVER['DOCUMENT_ROOT']."/include/classloader.php";
@session_cache_limiter('private, must-revalidate');
@session_cache_expire(0);
@session_start();
}
and classloader.php looks like
function __autoload($className) {
require_once("class.$className.php");
}
now everything works fine again. The question is now, if there is a permenent solution, because I don't like to modify or hack cforms everytime a new update comes out…
Thanks for your help,
and best regards
Lars