Sessions do not work for me in any browser! IE5.5, N4.7+6.0

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
3dron
Forum Commoner
Posts: 40
Joined: Sat Feb 01, 2003 10:25 pm

Sessions do not work for me in any browser! IE5.5, N4.7+6.0

Post by 3dron »

I've read all the threads on sessions here and I understand EVERYTHING. But even the simplest samples do not work.

I've tried

<?php
session_start();
++$_SESSION['AVAR'];
echo $_SESSION['AVAR'];
?>

And only get the value of 1 over and over.


I've tried
<?php session_start();
echo '<pre>'; print_r($HTTP_SESSION_VARS); echo '</pre>';
$HTTP_SESSION_VARS['test'] = 'value';
?>

and just get and empty array over and over.

It does not work for me. I've tried all my browsers IE 5.5, Netscape 4.7 and 6.0.

HELP, I am literally going nuts.

Ron
User avatar
lazy_yogi
Forum Contributor
Posts: 243
Joined: Fri Jan 24, 2003 3:27 am

Post by lazy_yogi »

Code: Select all

session_start(); 
++$_SESSION&#1111;'AVAR']; 
echo $_SESSION&#1111;'AVAR'];
works for me

Although I did have a problem with it when a server i used had PHP version 4.0.3 installed. Enen $HTTP_SESSION_VARS didn't seem to work for me then

That might be the prob
Use <? phpinfo() ?> to check

Otherwise I'm out of ideas
3dron
Forum Commoner
Posts: 40
Joined: Sat Feb 01, 2003 10:25 pm

Post by 3dron »

phpinfo() reports 4.0.6

Please, any other help?
3dron
Forum Commoner
Posts: 40
Joined: Sat Feb 01, 2003 10:25 pm

Post by 3dron »

wow, I figured it all out! On my host it doesn't work at all, on one of my clients host it all works.

What do I need to tell my host service to do or turn on?

Ron
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You need to tell your host to upgrade their version of PHP if you want it to work using that code.

Mac
Post Reply