php-windows Digest 10 Jan 2004 14:01:25 -0000 Issue 2076
Topics (messages 22540 through 22544):
Re: Session Variables Problem (Missing)
22540 by: Brad Lawryk
22542 by: hubo
22543 by: Jennifer S.
22544 by: John Ellingsworth
Re: php.ini & smtp (php 4.3.4)
22541 by: DvDmanDT
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Thanks Hubo,
Where would I nsert that coding? The coding should be fine though as the
page works flawlessly on a Linux Server?
Brad
"Hubo" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> To be sure that there is no coding error, just try this simple code:
> '============ Begin ==============
> <?
> session_start();
> if (isset($_SESSION["test"])){
> echo $_SESSION["test"];
> }
> else {
> echo "new session";
> $_SESSION["test"]="session variable saved";
> }
> ?>
> '============== End ==============
> I have got no problem about the session variables on my W2K system with
both
> IIS and Apache installed.
>
> By the way, since the php.ini is the same both for IIS and Apache, both
> servers share the same session (and the session variables).
>
> "Brad Lawryk" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> news:[EMAIL PROTECTED]
> > I am new to PHP moving over from ASP and one of things I relied on
heavily
> > was session variables. It seems that everytime a new page is opened it
> > starts a new session.
> >
> > I have set up a simple test site you can see whats happening - easier
than
> > to explain.
> >
> > http://www.cflsquad.com/index.php
> >
> > Use
> > Username: testuser
> > Password: testpassword
> >
> > the next page after log in should read "You are logged in as: testuser".
> > What tells me is that the session variable is resetting to a new on each
> > page is that the 'testuder' text doesn't show becuase the session var is
> > being read. These exact same pages work fine oon a Linux server so I
know
> > its a Windows Server issue. The odd thing is that the session ID is
passed
> > and saved but the session variable that is created on log in is not
> passed.
> > Again, it woks just fine on a Linux server - just not Windows.
> >
> > I have changed the path in the php.ini file as many have suggested fixes
> the
> > problem but it hasn't made a difference for me.
> >
> > Thanks
> >
> > --
> > Brad Lawryk
> > Williams Lake TimberWolves
> > www.wltimberwolves.com
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
--- End Message ---
--- Begin Message ---
The code shown below is a complete php script for you. Save these lines into
a file, for example, 1.php, and try to visit it from a browser.
"Brad Lawryk" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Thanks Hubo,
>
> Where would I nsert that coding? The coding should be fine though as the
> page works flawlessly on a Linux Server?
>
> Brad
>
>
> "Hubo" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > To be sure that there is no coding error, just try this simple code:
> > '============ Begin ==============
> > <?
> > session_start();
> > if (isset($_SESSION["test"])){
> > echo $_SESSION["test"];
> > }
> > else {
> > echo "new session";
> > $_SESSION["test"]="session variable saved";
> > }
> > ?>
> > '============== End ==============
> > I have got no problem about the session variables on my W2K system with
> both
> > IIS and Apache installed.
> >
> > By the way, since the php.ini is the same both for IIS and Apache, both
> > servers share the same session (and the session variables).
> >
> > "Brad Lawryk" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > news:[EMAIL PROTECTED]
> > > I am new to PHP moving over from ASP and one of things I relied on
> heavily
> > > was session variables. It seems that everytime a new page is opened it
> > > starts a new session.
> > >
> > > I have set up a simple test site you can see whats happening - easier
> than
> > > to explain.
> > >
> > > http://www.cflsquad.com/index.php
> > >
> > > Use
> > > Username: testuser
> > > Password: testpassword
> > >
> > > the next page after log in should read "You are logged in as:
testuser".
> > > What tells me is that the session variable is resetting to a new on
each
> > > page is that the 'testuder' text doesn't show becuase the session var
is
> > > being read. These exact same pages work fine oon a Linux server so I
> know
> > > its a Windows Server issue. The odd thing is that the session ID is
> passed
> > > and saved but the session variable that is created on log in is not
> > passed.
> > > Again, it woks just fine on a Linux server - just not Windows.
> > >
> > > I have changed the path in the php.ini file as many have suggested
fixes
> > the
> > > problem but it hasn't made a difference for me.
> > >
> > > Thanks
> > >
> > > --
> > > Brad Lawryk
> > > Williams Lake TimberWolves
> > > www.wltimberwolves.com
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hi,
Seems to work OK. I consistently got the same session ID
I am in a similar situation, moving all my ASP apps to PHP. I run Apache 2.0 on Win
2000 servers. I have actually traced the sessions in the PHP session data directory
and found things to be working consistently and well.
Are you using IIS or another web server?
Cheers,
Jennifer
Brad Lawryk <[EMAIL PROTECTED]> wrote:
I am new to PHP moving over from ASP and one of things I relied on heavily
was session variables. It seems that everytime a new page is opened it
starts a new session.
I have set up a simple test site you can see whats happening - easier than
to explain.
http://www.cflsquad.com/index.php
Use
Username: testuser
Password: testpassword
the next page after log in should read "You are logged in as: testuser".
What tells me is that the session variable is resetting to a new on each
page is that the 'testuder' text doesn't show becuase the session var is
being read. These exact same pages work fine oon a Linux server so I know
its a Windows Server issue. The odd thing is that the session ID is passed
and saved but the session variable that is created on log in is not passed.
Again, it woks just fine on a Linux server - just not Windows.
I have changed the path in the php.ini file as many have suggested fixes the
problem but it hasn't made a difference for me.
Thanks
--
Brad Lawryk
Williams Lake TimberWolves
www.wltimberwolves.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---------------------------------
Yahoo! Personals
- New people, new possibilities. FREE for a limited time!
--- End Message ---
--- Begin Message ---
I consistently had problems with the Session variable not carrying out
globally.
So I have this rather convoluted example; when I can refine it I can send it
again, but it works fine.
This is on Win2k, Apache 2.0, PHP Version 4.3.1
// name the session
session_name('s');
// check if a session exists
if(!session_id()){
session_start();
}
// register session variables
if (!session_is_registered("sesspatientID")) {
session_register("sesspatientID");
session_register("idAsset");
}
// assign session variables
if (isset($_POST["idAsset"])) {
$idAsset = $_POST["idAsset"];
$_SESSION["idAsset"] = $idAsset;
} elseif (isset($_GET["idAsset"])) {
$idAsset = $_GET["idAsset"];
$_SESSION["idAsset"] = $idAsset;
}
if (isset($_POST["patientID"])) {
$patientID = $_POST["patientID"];
$_SESSION["sesspatientID"] = $patientID;
}
// this is the part I had to add to make it work
if (isset($_SESSION["sesspatientID"])) {
$sesspatientID = $_SESSION["sesspatientID"];
}
if (isset($_SESSION["idAsset"])) {
$idAsset = $_SESSION["idAsset"];
}
Thanks,
John Ellingsworth
http://mail.med.upenn.edu/~jellings/
AIM: vc2000support
-----Original Message-----
From: Jennifer S. [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 10, 2004 5:36 AM
To: Brad Lawryk; [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Session Variables Problem (Missing)
Hi,
Seems to work OK. I consistently got the same session ID
I am in a similar situation, moving all my ASP apps to PHP. I run Apache 2.0
on Win 2000 servers. I have actually traced the sessions in the PHP session
data directory and found things to be working consistently and well.
Are you using IIS or another web server?
Cheers,
Jennifer
Brad Lawryk <[EMAIL PROTECTED]> wrote:
I am new to PHP moving over from ASP and one of things I relied on heavily
was session variables. It seems that everytime a new page is opened it
starts a new session.
I have set up a simple test site you can see whats happening - easier than
to explain.
http://www.cflsquad.com/index.php
Use
Username: testuser
Password: testpassword
the next page after log in should read "You are logged in as: testuser".
What tells me is that the session variable is resetting to a new on each
page is that the 'testuder' text doesn't show becuase the session var is
being read. These exact same pages work fine oon a Linux server so I know
its a Windows Server issue. The odd thing is that the session ID is passed
and saved but the session variable that is created on log in is not passed.
Again, it woks just fine on a Linux server - just not Windows.
I have changed the path in the php.ini file as many have suggested fixes the
problem but it hasn't made a difference for me.
Thanks
--
Brad Lawryk
Williams Lake TimberWolves
www.wltimberwolves.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---------------------------------
Yahoo! Personals
- New people, new possibilities. FREE for a limited time!
--- End Message ---
--- Begin Message ---
You might have more than one php.ini... I got like 5 or so... All for
different installs... For example, C:\php\php.ini is the cgi version's
php.ini, c:\windows\php.ini is the apache dll installation and so on.. Which
one of them to change depends on if I want to modify the cgi version's
settings or the sapi version...
--
// DvDmanDT
MSN: dvdmandt€hotmail.com
Mail: dvdmandt€telia.com
##########################
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenter&hcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##########################
"Igor Pustylnick" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> restarted 3 times. Nothing changes
>
> "Humberto Silva" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> Restart apache ...
>
> -----Original Message-----
> From: Igor Pustylnick [mailto:[EMAIL PROTECTED]
> Sent: sexta-feira, 9 de Janeiro de 2004 18:36
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] php.ini & smtp (php 4.3.4)
>
>
> I'm trying to change values in php.ini corresponding to SMTP and
> sendmail_to. whatever I change these values to doesn't seen to reflect
> in
> phpinfo() and other programs.
> Is it a bug or I need to look at something else as well? Regards, Igor
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---