RE: [PHP-WIN] Session not working
| From: | Sudeep Sarath | Date: | Fri, 27 Feb 2004 09:17:24 +0000 |
| Subject: | RE: [PHP-WIN] Session not working | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-23002@lists.php.net to get a copy of this message | ||
Hello Yi Socheat,
I tried what you have suggested but to no avail. It work's fine on an actual online php
supporting webserver. i Checked. The problem i think is with the installation of php and Apache on
local system. What to do....
....SuDeEp....
Yi Socheat <y.socheat@of.forum.org.kh> wrote:
The problem is you can not assign value from session variable to the normal
variable
Example:
$x=$_SESSION['test'] ;
echo $x;
It will not assign to value to $x,but if you want to see the value in the
session variable
You have to use like this
Echo $_SESSION['test'];
=========================================
Mr. Yi Socheat
Webmaster
Community Information Web Portal Team
Open Forum of Cambodia
House 245, Street 51
P.O.Box 177
Phnom Penh, Cambodia
Tel : +855-23-360402
Fax : +855-23-360345
Mobile: +855-12-697621
Email : y.socheat@forum.org.kh
Web : www.cambodiacic.org, www.forum.org.kh
Please note that the above message may contain confidential information.
1. It is only intended for the person to whom this mail is addressed
in the To: and CC: options.
2. This mail including attachment may not be redistributed/edited for
business profit or any purpose without the permission from the owner.
Whoever is not listed as a recipient must not view this message, or delete
it from storage.
The sender does not accept any liability of errors or omissions in the
context of this message due to Internet transmission.
Your understanding is appreciated.
-----Original Message-----
From: Sudeep Sarath [mailto:sudeepfiles@yahoo.co.in]
Sent: Friday, February 27, 2004 12:08 AM
To: php-windows@lists.php.net
Subject: RE: [PHP-WIN] Session not working
Hello Yi Socheat,
I think i am right in variable declaration. On both the pages i used
$_SESSION['value'] instead of $_session["value"]. Still it gives the blank
page..
.......SuDeEp......
Yi Socheat wrote:
You write the wrong name because PHP function name or variable is case
sensitive You sould write _SESSION['sessionName'] , you try to change in
your code please it will be fine...
-----Original Message-----
From: Sudeep Sarath [mailto:sudeepfiles@yahoo.co.in]
Sent: Thursday, February 26, 2004 11:40 PM
To: php-windows@lists.php.net
Subject: [PHP-WIN] Session not working
Hello everyone,
I recently installed Apache 1.3.9 server and php 4.3.4(from win32 zip
package) on my system with Windows98SE as o/s. I configured the httpd.conf
and php.ini as per the instructions on the install.txt file of php. First i
got an error with regard to the path of session.save_path. I changed /tmp to
c:/program files/Apache group/Apache/tmp and the error was gone and it
worked perfectly. But when i use a script like this:-
test1.php
session_start();
$_session["value"]="Good Morning";
header('location: http://localhost/test2.php'); ?>
test2.php
session_start();
$check=$_session["value"];
echo $check;
?>
Insted of getting "Good Morning" displayed on the test2.php page, i get a
blank page.
But i see that a file is being created with a lengthy name in the
session.save_path directory with 0 byte size.
I must also add here that session_register is working fine. But what is
happening with $_session when i use header-location- i don't know. Please
anyone help. I am trying to fix this for the last 5 days. I am also getting
a warning from the apache console window that "warn[2] No such file or
directory exists, exec() may not be safe. apache on win32 is
running.......". But apache is working fine in http://localhost.
......SuDeEp......
Yahoo! India Insurance Special: Be informed on the best policies, services,
tools and more.
Yahoo! India Insurance Special: Be informed on the best policies, services,
tools and more.
Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more.