[prev in list] [next in list] [prev in thread] [next in thread]
List: php-general
Subject: [PHP] [APACHE-PHP-WIN] : $_SESSION problems
From: "John Mpaliza" <johnet () libero ! it>
Date: 2002-03-31 16:28:16
[Download RAW message or body]
[Attachment #2 (Multipart/Alternative)]
I configured well ( I think) my system (win32-apache 1.3.24-php4.1.2) and
every think is working except session variables. Codes like this don't work:
page1.php
<?php
session_start();
$_SESSION['test']="adding";
header("Location: page2.php?".SID);
exit;
?>
page2.php
<?php
session_start();
print $_SESSION['test'];
?>
Question:
-----------
Why in the 2nd page $_SESSION['test'] is not set and so no available?
N.B: All codes I wrote first for php4.1.0 don't work with the new version of
php........
Please help me....
Thank you.
[Attachment #5 (Text/HTML)]
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><html>
<head>
<meta name="GENERATOR" content="IncrediMail 1.0">
<!--IncrdiXMLRemarkStart>
<IncrdiX-Info>
<X-FID>BA285063-5BCE-11D4-AF8D-0050DAC67E11</X-FID>
<X-FVER>2.0</X-FVER>
<X-FIT>Letter</X-FIT>
<X-FCOL>Elegant Paper</X-FCOL>
<X-FCAT>Stationery</X-FCAT>
<X-FDIS>Rice Fields</X-FDIS>
<X-Extensions>SU1CTDEsNDEsgUmBSTAkkcGNgZmVTY0wNCxNhYUoiU0kOMEoTYGBjYEoJDSZnSyFhUksSU1CTDIsMCwsSU1CTDMsMCws</X-Extensions>
<X-BG>4B54E3D0-AA5A-464B-A859-19D3E0A0AA55</X-BG>
<X-BGT>repeat</X-BGT>
<X-BGC>#dce0e3</X-BGC>
<X-BGPX>0px</X-BGPX>
<X-BGPY>0px</X-BGPY>
<X-ASN>ANIM3D00-NONE-0000-0000-000000000000</X-ASN>
<X-ASNF>0</X-ASNF>
<X-ASH>ANIM3D00-NONE-0000-0000-000000000000</X-ASH>
<X-ASHF>1</X-ASHF>
<X-AN>6486DDE0-3EFD-11D4-BA3D-0050DAC68030</X-AN>
<X-ANF>0</X-ANF>
<X-AP>6486DDE0-3EFD-11D4-BA3D-0050DAC68030</X-AP>
<X-APF>1</X-APF>
<X-AD>C3C52140-4147-11D4-BA3D-0050DAC68030</X-AD>
<X-ADF>0</X-ADF>
<X-AUTO>X-ASN,X-ASH,X-AN,X-AP,X-AD</X-AUTO>
<X-CNT>;</X-CNT>
</IncrdiX-Info>
<IncrdiXMLRemarkEnd-->
</head>
<BODY style="BACKGROUND-POSITION: 0px 0px; FONT-SIZE: 12pt; MARGIN: 0px 10px 10px; \
BACKGROUND-REPEAT: repeat; FONT-FAMILY: Comic Sans MS" text=#000040 bgColor=#dce0e3 \
background=cid:4B54E3D0-AA5A-464B-A859-19D3E0A0AA55 scroll="yes" X-FIT="Letter" \
X-FCAT="Elegant Paper" X-FCOL="Elegant Paper" X-FDIS="Rice Fields" \
X-FID="BA285063-5BCE-11D4-AF8D-0050DAC67E11" X-FVER="2.0" \
X-ASN="ANIM3D00-NONE-0000-0000-000000000000" X-ASNF="0" X-ASH \
="ANIM3D00-NONE-0000-0000-000000000000" X-ASHF ="1" X-AN \
="6486DDE0-3EFD-11D4-BA3D-0050DAC68030" X-ANF="0" \
X-AP="6486DDE0-3EFD-11D4-BA3D-0050DAC68030" X-APF="1" \
X-AD="C3C52140-4147-11D4-BA3D-0050DAC68030" X-ADF="0" SIGCOLOR="0" ORGYPOS="0"><TABLE \
id=INCREDIMAINTABLE cellSpacing=0 cellPadding=2 width="95%" border=0> <TBODY>
<TR>
<TD id=INCREDITEXTREGION style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px; FONT-SIZE: \
10pt; FONT-FAMILY: Comic Sans MS" width="100%">
<DIV> </DIV>
<DIV>I configured well ( I think) my system (win32-apache 1.3.24-php4.1.2)
and every think is working except session variables. Codes like this
don't work:</DIV>
<DIV>page1.php</DIV>
<DIV><?php </DIV>
<DIV> session_start();</DIV>
<DIV> $_SESSION['test']="adding";</DIV>
<DIV> header("Location: page2.php?".SID);</DIV>
<DIV> exit;</DIV>
<DIV>?></DIV>
<DIV> </DIV>
<DIV>page2.php</DIV>
<DIV><?php</DIV>
<DIV> session_start();</DIV>
<DIV> print $_SESSION['test'];</DIV>
<DIV>?></DIV>
<DIV> </DIV>
<DIV>Question: </DIV>
<DIV>-----------</DIV>
<DIV>Why in the 2nd page $_SESSION['test'] is not set and
so no available?</DIV>
<DIV>N.B: All codes I wrote first for php4.1.0 don't work with the
new version of php........</DIV>
<DIV> </DIV>
<DIV>Please help me....</DIV>
<DIV>Thank you. </DIV></TD></TR>
<TR>
<TD id=INCREDIFOOTER width="100%">
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD width="100%"></TD>
<TD id=INCREDISOUND vAlign=bottom align=middle></TD>
<TD id=INCREDIANIM vAlign=bottom \
align=middle></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><SPAN \
id=IncrediStamp><SPAN dir=ltr><FONT face="Arial, Helvetica, sans-serif" \
size=2>_______________________________________________________________________________<BR><FONT \
face="Comic Sans MS" size=2><A
href="http://www.incredimail.com/redir.asp?ad_id=316&lang=16"><IMG alt=""
hspace=0 src="cid:D744192F-B534-4917-8A94-3AB79BCBF818" align=baseline
border=0></A> <I>IncrediMail</I> - <B>il mondo della posta elettronica si
è finalmente evoluto</B> - </FONT><A
href="http://www.incredimail.com/redir.asp?ad_id=316&lang=16"><FONT
face="Times New Roman" size=3><B><U>Clicca
Qui</U></B></FONT></A></SPAN></SPAN></FONT></BODY></html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic