Session Variable
Moderator: General Moderators
- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
Session Variable
HEllo friends ,
i am facing a serious problem that our isp is using php version 4.3.2 and we had designed a site at 4.3.4 version,now they had made change in php.ini file at session.save_path=c:\php\sessiondata to .\ so our sessin are stored at the root directory of the application and on the 2 nd page of applicatin we are not able to read that session variable ,i u can then plz. suggest somthing
i am facing a serious problem that our isp is using php version 4.3.2 and we had designed a site at 4.3.4 version,now they had made change in php.ini file at session.save_path=c:\php\sessiondata to .\ so our sessin are stored at the root directory of the application and on the 2 nd page of applicatin we are not able to read that session variable ,i u can then plz. suggest somthing
- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
Session Variable
well this site is running well on the our local n/w but not on the isp.
when in the local host we change the setting of php.ini (session.save_path=c:\php\sessiondata) to (.\) is shows some warning and the session variable does not display on the second page.
i am sending you the just the snapshot of the code,
in the first page
session_start();
$_SESSION['IDtag']=$IDtag;
//where $idtag is a array variable having some value
session variable is being created.
In the second page
session_start();
echo $_SESSION['IDtag'][0];
well i am sending u the just the snapshot of code bcoz actual code is quite big,i am repeating that when session.save_path in php.ini is c:\php\sessiondata this code is running well.but when i change the value from c:\php\sessiondata to .\ (as of isp ),the value does not echo,
Of you can then plz. suggest me that can we change the php.ini setting of isp(what i feel they donot allow this due to security) or where i should store the session variable so that it could be accessed.
Sorry this is quite big message
Looking f/w for a solution
when in the local host we change the setting of php.ini (session.save_path=c:\php\sessiondata) to (.\) is shows some warning and the session variable does not display on the second page.
i am sending you the just the snapshot of the code,
in the first page
session_start();
$_SESSION['IDtag']=$IDtag;
//where $idtag is a array variable having some value
session variable is being created.
In the second page
session_start();
echo $_SESSION['IDtag'][0];
well i am sending u the just the snapshot of code bcoz actual code is quite big,i am repeating that when session.save_path in php.ini is c:\php\sessiondata this code is running well.but when i change the value from c:\php\sessiondata to .\ (as of isp ),the value does not echo,
Of you can then plz. suggest me that can we change the php.ini setting of isp(what i feel they donot allow this due to security) or where i should store the session variable so that it could be accessed.
Sorry this is quite big message
Looking f/w for a solution
try using the session_save_path() PHP function.
Read about it here
http://se.php.net/manual/en/function.se ... e-path.php
Mark
Read about it here
http://se.php.net/manual/en/function.se ... e-path.php
Mark
- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
Hello Friends
Actually problem is not completely solved. actually what we had did just passed the one value through url ,it is working in the 2-3 page but in a big prj like our it is not the proper solution to use this way,so if u can have any solutioin then plz. send it to me
Re: Hello Friends
I use sessions and cookies in my sites and they work fine!softsolvers wrote:Actually problem is not completely solved. actually what we had did just passed the one value through url ,it is working in the 2-3 page but in a big prj like our it is not the proper solution to use this way,so if u can have any solutioin then plz. send it to me
Even $_SESSION should work!
Re: Hello Friends
Code: Select all
<?php
// Sessions are cool!
?>- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
session variable
hello friends
can u show me the snapshot of your code,and the php.ini config of your isp plz. check and tell me that what is the path in their php.ini file, my isp has the path of session.save_path=.\ and by default it is c:\php\sessiondata ,so if you can show me the code i.e. creating the session on one page and echoing that variable in the sesond page,plz check the php.ini and the version you areusing there.
I hope that u will make some efforts to do this ,thanks for your cooperation
can u show me the snapshot of your code,and the php.ini config of your isp plz. check and tell me that what is the path in their php.ini file, my isp has the path of session.save_path=.\ and by default it is c:\php\sessiondata ,so if you can show me the code i.e. creating the session on one page and echoing that variable in the sesond page,plz check the php.ini and the version you areusing there.
I hope that u will make some efforts to do this ,thanks for your cooperation