[Xerte] Passing SESSION variable

Paul Swanson Paul.Swanson at harlandfs.com
Thu Dec 17 22:43:13 GMT 2009


Just poked around on my system where I have an old copy of moodle
installed. I'm using Xerte stand-alone, not XOT, and we aren't using
moodle. Anyway, I found a folder off my root named moodledata, and in
there is a folder named sessions where moodle seems to be storing it's
session cookies. Could the problem be that moodle uses its own folder
for sessions, rather than the folder specified in php.ini? 

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Patrick
Lockley
Sent: Thursday, December 17, 2009 2:22 PM
To: Xerte discussion list
Subject: RE: [Xerte] Passing SESSION variable

 

edit.php has a session start line in, believe me, i know, it couldn't
work without one.

 

When i tried to integrate with moodle it worked up until edit, and i
could never get edit to to work.

 

You can try adding session_start(); print_r($_SESSION); at the top of
the code, but when i did that i still got nothing.

 

I don't know enough about moodle, but i assumed when moodle runs
session_start, is passes through some parameters to set itself up, or
the way moodle passes session ids is different to toolkits.

 

I would hunt for a session_start function call in the moodle code.

 

________________________________

From: xerte-bounces at lists.nottingham.ac.uk on behalf of Ken Scott
Sent: Thu 17/12/2009 16:13
To: Xerte discussion list
Subject: RE: [Xerte] Passing SESSION variable

Many thanks Paul - I will try that.

Ken Scott
e-learning advisor
JISC RSC YH
07966 754040

RSCs - Stimulating and Supporting Innovation in Learning

Know someone making an impact on learning through technology?
Nominate a colleague for an Evolution Award!  Deadline: 15 Jan 2010.

Visit www.rsc-yh.ac.uk/evolution for details


________________________________________
From: xerte-bounces at lists.nottingham.ac.uk
[xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Paul Swanson
[Paul.Swanson at harlandfs.com]
Sent: 17 December 2009 15:49
To: Xerte discussion list
Subject: RE: [Xerte] Passing SESSION variable

For any PHP script to have access to session variables, you must first
invoke the session handler. Open the php script in question and look for
session_start(); If it is not there, add it near the top of the script,
before any attempt to read or set session variables. Once you have that,
you can see what session variables are available by using
print_r($_SESSION);

As Dave mentioned, you must accept cookies for session variables to
work.

It sounds like your PHP is set up to not show errors. In those
situations a fatal error will result in a blank page. During
development, it's really nice to know what errors may be happening, so
you may want to override the php.ini settings while you are
troubleshooting. You can do this on a script-by-script basis with the
following:

ini_set('display_errors', 1);
error_reporting(E_ALL);

You will want to comment those lines out once you've got it working.

Hope that helps.

Paul


> -----Original Message-----
> From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-
> bounces at lists.nottingham.ac.uk] On Behalf Of Ken Scott
> Sent: Thursday, December 17, 2009 6:35 AM
> To: Xerte discussion list
> Subject: RE: [Xerte] Passing SESSION variable
>
> Thanks, no difference
>
> Ken Scott
> e-learning advisor
> JISC RSC YH
> 07966 754040
>
> RSCs - Stimulating and Supporting Innovation in Learning
>
> Know someone making an impact on learning through technology?
> Nominate a colleague for an Evolution Award!  Deadline: 15 Jan 2010.
>
> Visit www.rsc-yh.ac.uk/evolution for details
>
>
> ________________________________________
> From: xerte-bounces at lists.nottingham.ac.uk [xerte-
> bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
> [d_b_burnett at hotmail.com]
> Sent: 17 December 2009 14:10
> To: Xerte list
> Subject: RE: [Xerte] Passing SESSION variable
>
> Try  explicitly allowing cookies from the domain you are serving from.
>
> > From: k.scott at leeds.ac.uk
> > To: xerte at lists.nottingham.ac.uk
> > Date: Thu, 17 Dec 2009 14:02:08 +0000
> > Subject: [Xerte] Passing SESSION variable
> >
> > Wonder if anyone can help?
> >
> > I a using the moodle integration patch, and logins in fine. However
> when I try to edit or preview a project I get a blank page. I have
> traced execution and edit.php doesn't seem to have any of the session
> variables available to it - it therefore tries to select from the
table
> with a userid of null.
> >
> > How should the session variables be passed? Not a PHP expert and it
> is not obvious to me!
> >
> > Many thanks
> >
> >
> > Ken Scott
> > e-learning advisor
> > JISC RSC YH
> > 07966 754040

_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20091217/11afe97d/attachment.html


More information about the Xerte mailing list