Search code examples
phpmysqlredbean

why R::Store return no thing and crash in redbeanphp?


I am using RedbeanPHP. I have a web host with php v5.4 and I have these lines of code :

 $user = R::findOne("users", "username=:un and password=:pass", array(":un" => $username, ":pass" => $pass));
    if (isset($user)) {            
        setcookie("tempSessionId", $loginId , time()+60 ); 
        $user->loginid = $loginId;  
        $ans = R::store($user); 
        echo $ans; 
    }

but when I execute this code any thing not print on screen. I test my code line by line and found problem is in calling R::store(). it does not return any result. can any one help me?


Solution

  • In my host 'mbstring' Libdrary was disable. this was a very simple problem that create a big crash :'(