Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: alm7100 on April 27, 2008, 10:22:21 AM

Title: How to use $_SESSION in SME 7.3???
Post by: alm7100 on April 27, 2008, 10:22:21 AM
Its seems that my SME 7.3 cant understand the use of session variabel $_SESSION, please tell me what i am doing wrong??

Yours
Allan
Title: Re: How to use $_SESSION in SME 7.3???
Post by: Marco Hess on April 27, 2008, 03:48:07 PM
Its seems that my SME 7.3 cant understand the use of session variabel $_SESSION, please tell me what i am doing wrong??

Yours
Allan

You probably need to elaborate on what you are trying to do before you can expect any sensible answers to your question.

Marco
Title: Re: How to use $_SESSION in SME 7.3???
Post by: alm7100 on April 27, 2008, 04:55:56 PM
Whill try but sorry for my english

I am trying to uses sessions like this

session_start();
$_SESSION['grafdata'] = $ar_data;

and in a other file i am trying to read it this way

$grafdate = $_SESSION['grafdata'];

this dosent work on whit the php that is install on SME but works on my wamp server install on my windows xp computer.
Title: Re: How to use $_SESSION in SME 7.3???
Post by: cactus on April 27, 2008, 05:26:42 PM
Whill try but sorry for my english

I am trying to uses sessions like this

session_start();
$_SESSION['grafdata'] = $ar_data;

and in a other file i am trying to read it this way

$grafdate = $_SESSION['grafdata'];

this dosent work on whit the php that is install on SME but works on my wamp server install on my windows xp computer.
I think this has to do with the register_globals being set to off by default on SME Server, it is a security measure. For more information in register_gloabls: http://www.php.net/register_globals
Title: Re: How to use $_SESSION in SME 7.3???
Post by: Marco Hess on April 27, 2008, 05:31:08 PM
You can quickly check what the PHP environment on SME looks like by
create a file php_info.php in your Primary html directory with:

Code: [Select]
<?php
phpinfo
();
?>


and run that through your browser. Compare that to the results on your wamp and look for the differences.
Title: Re: How to use $_SESSION in SME 7.3???
Post by: byte on April 27, 2008, 05:37:15 PM
Moving this topic to the General Discussion forum, it is more appropriate there. Thanks!
Title: Re: How to use $_SESSION in SME 7.3???
Post by: CharlieBrady on April 28, 2008, 03:47:15 PM
Moving this topic to the General Discussion forum, it is more appropriate there.

I think a PHP programming forum would be more appropriate. This really has very little to do with SME 7.3.