mruz / base-app

The base application in PhalconPHP
63 stars 19 forks source link

Login #15

Closed luki922 closed 10 years ago

luki922 commented 10 years ago

After few days I again have problem with user login when i want login me php give this error: PHP Fatal error: Cannot use the memory manager when the request is shutting down in Unknown on line 0 In php.ini i have memory_limit = 512M

mruz commented 10 years ago

Could you give me a little more lines of error.log file?

luki922 commented 10 years ago

Only this is in the php_error.log [28-Mar-2014 06:36:24 UTC] PHP Fatal error: Cannot use the memory manager when the request is shutting down in Unknown on line 0 I have this but this error is too old :p [Thu Mar 27 22:15:56 2014] [notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u8 configured -- resuming normal operations I have debian with apache2 :) Info.php for show more options: http://www.laketi.pl/info.php

mruz commented 10 years ago

This error occurs on base-app or PhalconEye? I see you have PhalconEye now.

luki922 commented 10 years ago

sory about that :/ yep now i have phalconeye (i just want to check phalconeye) but this error is in base-app, info.php added :) Now i have only base-app.

In phalconeye this error does't occur :/ This error may be from mariadb 10?

mruz commented 10 years ago

Hmm, the error not talk too much.. :) You could try to generate backtrace.

mruz commented 10 years ago

I think this is Phalcon 1.3.1 issuse: https://github.com/phalcon/cphalcon/issues/2241

luki922 commented 10 years ago

hmm... how to downgrade it? :p Ok i get it :)

mruz commented 10 years ago
git clone http://github.com/phalcon/cphalcon
cd build
git checkout 1.3.0
sudo ./install
luki922 commented 10 years ago

Haha it works! :D thank you very much :D but i have it: [28-Mar-2014 08:34:06 UTC] PHP Notice: Undefined variable: site_desc in /var/www/laketi.pl/app/common/cache/volt/app/backend/views/index.phtml on line 8

mruz commented 10 years ago

I know about this, I will fix it soon.

luki922 commented 10 years ago

Ok thanks :)

mruz commented 10 years ago

You can try 1.3.2 also:

cd cphalcon/ext
git checkout 1.3.2
sudo ./install
braska commented 10 years ago

need serialize before _session->set(...) For example $this->_session->set($this->_config['session_key'], serialize($user)); And need unserialize after _session->get(...) unserialize($this->_session->get($this->_config['session_key']));

al35mm commented 10 years ago

I had the same issue with latest version of Phalcon on WAMP and can confirm that serialize/unserialize fixes this issue or as stated by Phalcon, using array instead of object fixes this too (not tested that).

mruz commented 10 years ago

I'm busy now, I will test it soon. Thanks.

mruz commented 10 years ago

@braska if I will use serialize/unserialize user won't work like model (like now):

$user = Auth::instance()->get_user();
$user->email = 'admin@mruz.pl';
$user->save();

Could you confirm it still not working on latest 1.3.2? If not, I will add serialize() and bool parameter to get user model after unserialize().:

public function get_user($model = false)
{
}
$user = Auth::instance()->get_user(true);
$user->email = 'admin@mruz.pl';
$user->save();

I think it works properly now (in the latest 1.3.2/ext).

mruz commented 10 years ago

It seems that it works