Thats another option, and by doing that you don't have to touch the
core code, I will take a look at it before upgrading to 1.3.5...


On 24 oct, 14:23, odd <fihr87364hjkfhdjf6374hfz7z3h7...@trash-
mail.com> wrote:
> dtemes schrieb:
>
> > I tryed with a custom save handler, but then i moved to database
> > driver sessions, so finally I decided to touch the cake core code
> >  and set session.cookie_secure to 0, I am not really fond of this kind
> > of solutions and would prefer a way to set it up from a config file
> > without having to change the framework code.
>
> Not sure what you mean, when using a custom save handler you can
> simply copy the core code in there, and add the "ini_set" call that
> sets "cookie_secure" to 0. So when using database sessions copy the
> code in database switch case (cake_session.php, line 503)
>
> ///////////////////////////////////////////////////////
> if (empty($_SESSION)) {
>         if (Configure::read('Session.model') === null) {
>                 trigger_error(__("You must set the all 
> Configure::write('Session.*')
> in core.php to use database storage"), E_USER_WARNING);
>                 $this->_stop();
>         }
>         if ($iniSet) {
>                 ini_set('session.use_trans_sid', 0);
>                 ini_set('url_rewriter.tags', '');
>                 ini_set('session.save_handler', 'user');
>                 ini_set('session.serialize_handler', 'php');
>                 ini_set('session.use_cookies', 1);
>                 ini_set('session.name', Configure::read('Session.cookie'));
>                 ini_set('session.cookie_lifetime', $this->cookieLifeTime);
>                 ini_set('session.cookie_path', $this->path);
>                 ini_set('session.auto_start', 0);
>         }}
>
> session_set_save_handler(
>         array('CakeSession','__open'),
>         array('CakeSession', '__close'),
>         array('CakeSession', '__read'),
>         array('CakeSession', '__write'),
>         array('CakeSession', '__destroy'),
>         array('CakeSession', '__gc')
> );
>
> ini_set('session.cookie_secure', 0);
> ///////////////////////////////////////////////////////
>
> Regards

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to