Jump to content

[ resolved ] session problem


CorfuVBProgrammer

Recommended Posts

Hello all . . .

I have PHP Session problem in my PC.

My Computer :

Windows XP with SP2
IIS Web Server
PHP 5.2

The Problem :

I have create to web pages :

PAGE1 -> index.php
------------------------------------------------------------------------
<?php
session_register();

$_SESSION['name'] = "Merianos Nikos";
?>
<html>
<head>
<title>
</title>
</head>

<body>
<?php
echo $_SESSION['name'];
?>
<a href="index2.php">Click Me</a>
</body>
</html>
------------------------------------------------------------------------


PAGE2 ->  index2.php
------------------------------------------------------------------------
<?php
session_register();

echo $_SESSION['name'];
?>
<html>
<head>
<title>
</title>
</head>

<body>
</body>
</html>
------------------------------------------------------------------------

When i start the index.php page it work correctly and the result is the following

------------------------------------------------------------------------

Merianos Nikos [url=http://Click Me]Click Me[/url]

------------------------------------------------------------------------

Then if i click on the [url=http://Click Me]Click Me[/url] to go on the index2.php

the result is the following


------------------------------------------------------------------------

PHP Notice: Undefined variable: _SESSION in C:\Inetpub\wwwroot\PHP_TEST\index2.php on line 4

------------------------------------------------------------------------


So what can i do for ? ? ?

I have try many many thinks and still i have the same problem.

Also i have try to use session_start() instead of session_register() and nothing thange . . .

Please i need help . . .

Thanks a lot
Link to comment
https://forums.phpfreaks.com/topic/30616-resolved-session-problem/
Share on other sites

When i using the session_start() i have the following result:


Merianos NikosClick Me PHP Warning: session_start() [function.session-start]: open(C:\DOCUME~1\E456~1\LOCALS~1\Temp\php\upload\sess_vshiukg8ldedh8mcdlk81vanu7, O_RDWR) failed: No such file or directory (2) in C:\Inetpub\wwwroot\PHP_TEST\index.php on line 2 PHP Warning: Unknown: open(C:\DOCUME~1\E456~1\LOCALS~1\Temp\php\upload\sess_vshiukg8ldedh8mcdlk81vanu7, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\DOCUME~1\E456~1\LOCALS~1\Temp\php\upload) in Unknown on line 0

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.