It seems probable that autostart is the culprit. The Session.start in
core.php refers to the Cake Session object, though.
So, to clarify: you have session.auto_start set in php.ini on one
machine but not the other? If you don't have control over the ini file
you can try turning it off in .htaccess:
php_value session.auto_start 0
On Fri, Mar 7, 2008 at 6:53 AM, Novice Programmer
<[EMAIL PROTECTED]> wrote:
> I am using Cake 1.2 beta and session.start is set to true in config/core.php
>
> thanks.
>
>
>
> On Fri, Mar 7, 2008 at 5:04 PM, Novice Programmer <[EMAIL PROTECTED]>
> wrote:
>
> > Hello,
> >
> > It seems like setting the session.auto_start is the culprit one. I tested
> this on local machine and found that is session.auto_start is set to true in
> php.ini then the statement.
> >
> > $this->Session->read('User.info').
> > fails miserably to read the session variable User.info
> >
> > quoting http://in2.php.net/session
> > If you do turn on session.auto_start then you cannot put objects into your
> sessions since the class definition has to be loaded before starting the
> session in order to recreate the objects in your session.
> >
> > does cake store session variables in the form of objects in the _SESSION?
> > I was even wondering that do all of you have session.auto_start set to off
> in your php.ini's. my production server is having it on.
> > Please Help.
> >
> > Thanks.
> >
> >
> > On Fri, Mar 7, 2008 at 5:17 AM, Novice Programmer
> <[EMAIL PROTECTED]> wrote:
> >
> > > yeah i did typo when writing the query.. otherwise it is fine in code...
> My problem is still not solved and before moving to global _SESSION i made
> sure that it failed on my dev server too and it is failing consistently on
> dev server as well.. ;)..
> > >
> > > Thanks.
> > >
> > >
> > >
> > >
> > >
> > > On Fri, Mar 7, 2008 at 4:09 AM, b logica <[EMAIL PROTECTED]> wrote:
> > >
> > > >
> > > > It only fails on the prod server? That suggests it's an issue with
> > > > php.ini maybe. Or some funky domain issue.
> > > >
> > > > I'm sure this isn't it but you have a typo above:
> > > >
> > > > $this->Session-read('User.info').
> > > >
> > > > $this->Session->read('User.info').
> > > >
> > > > My session problem seems to have resolved itself. I have no idea why.
> > > >
> > > > On Thu, Mar 6, 2008 at 6:31 AM, Novice <[EMAIL PROTECTED]>
> wrote:
> > > > >
> > > > > Hello guys,
> > > > >
> > > > > I got a hint to this... The session is there on the second page but
> > > > > its like that the reading of the session variables fails when i try
> to
> > > > > read it using $this->Session-read('User.info').... Any idea on what
> > > > > this might be.. and note that every thing works on my system it
> fials
> > > > > on the production server. Please help.....
> > > > >
> > > > > Thanks.
> > > > >
> > > > > On Mar 3, 10:58 pm, "Novice Programmer" <[EMAIL PROTECTED]>
> > > > > wrote:
> > > > >
> > > > > > Any Help on this one? ME still stuck.. :(
> > > > > >
> > > > > > On Mon, Mar 3, 2008 at 9:50 PM, Novice Programmer
> <[EMAIL PROTECTED]>
> > > > >
> > > > > > wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > > > Here is how i am writing the session variables.
> > > > > >
> > > > > > > if(($user = $this->User->validateLogin($this->data['User'])) ==
> true) {
> > > > > > > $this->Session->write('User', $user);
> > > > > > > $this->Session->setFlash('You\'ve successfully
> logged
> > > > > > > in.');
> > > > > > > $this->redirect('/');
> > > > > > > }
> > > > > >
> > > > > > > The function validateLogin is as(please ignore typos etc.. all
> that is
> > > > > > > working fine):
> > > > > >
> > > > > > > $user = $this->find(array('email_address' =>
> $data['email_address'],
> > > > > > > 'password' => 'password']), array('id',
> 'email_address'));
> > > > > >
> > > > > > > if(empty($user) == false)
> > > > > > > return $user['User'];
> > > > > >
> > > > > > > return false;
> > > > > >
> > > > > > > Here is how I read the session.. in the other controller ..
> > > > > >
> > > > > > > if ($this->Session->check('User')) {
> > > > > > > $this->log('Got the user');
> > > > > > > }
> > > > > > > else {
> > > > > > > $this->log('No Session Yet');
> > > > > > > }
> > > > > >
> > > > > > > Thanks.
> > > > > >
> > > > > > > On Mon, Mar 3, 2008 at 9:43 PM, Novice Programmer <
> > > > >
> > > > > > > [EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > > > Hello,
> > > > > >
> > > > >
> > > > > > > > using activate does not resolve the issue and i dont know that
> why i
> > > > > > > > would need to call activate since activate is a turned on in
> core.php.
> > > > > > > > Any other suggestions?
> > > > > >
> > > > > > > > Thanks.
> > > > > >
> > > > >
> > > > > > > > On Mon, Mar 3, 2008 at 9:43 AM, abiram <[EMAIL PROTECTED]>
> wrote:
> > > > > >
> > > > > > > > > Hai u use session->activate function
> > > > > > > > > also see
> > > > > > > >
> >http://groups.google.co.in/group/cake-php/browse_thread/thread/75946f...
> > > > >
> > > > >
> > > > > >
> > > > > > > > > On Mar 3, 2:58 am, "Novice Programmer"
> <[EMAIL PROTECTED]>
> > > > > > > > > wrote:
> > > > > > > > > > Hello,
> > > > > >
> > > > > > > > > > I am facing session problems on redirection. The function
> > > > > > > > > session->read()
> > > > > > > > > > returns nothing on the session stored before redirection.
> I searched
> > > > > > > > > on the
> > > > > > > > > > google and found some solutions one of them was modifying
> htaccess
> > > > > > > > > which i
> > > > > > > > > > can't do because of shared host. Another was to put
> session id in
> > > > > > > > > url which
> > > > > > > > > > is not secure enough. Was wondering on how other people
> handle this
> > > > > > > > > problem.
> > > > > > > > > > Please help.
> > > > > >
> > > > > > > > > > --
> > > > > > > > > > Thanks & Regards,
> > > > > > > > > > Novice (http://ishuonweb.wordpress.com/).
> > > > > >
> > > > > > > > --
> > > > > > > > Thanks & Regards,
> > > > > > > > Novice (http://ishuonweb.wordpress.com/).
> > > > > >
> > > > > > > --
> > > > > > > Thanks & Regards,
> > > > > > > Novice (http://ishuonweb.wordpress.com/).
> > > > > >
> > > > > > --
> > > > > > Thanks & Regards,
> > > > > > Novice (http://ishuonweb.wordpress.com/).
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > >
> > >
> > >
> > > Thanks & Regards,
> > > Novice (http://ishuonweb.wordpress.com/).
> >
> >
> >
> > --
> > Thanks & Regards,
> > Novice (http://ishuonweb.wordpress.com/).
>
>
>
> --
> Thanks & Regards,
> Novice (http://ishuonweb.wordpress.com/).
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---