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
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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.