Page 1 of 1

Session Variable

Posted: Fri Feb 13, 2004 4:26 am
by softsolvers
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

Posted: Fri Feb 13, 2004 5:28 am
by JayBird
ut shoudn't matter what the session.save_path is set to, i should still work.

Can you show us the code for the 2 pages in question.

Mark

Session Variable

Posted: Fri Feb 13, 2004 6:01 am
by softsolvers
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

Posted: Fri Feb 13, 2004 6:13 am
by JayBird
try using the session_save_path() PHP function.

Read about it here

http://se.php.net/manual/en/function.se ... e-path.php

Mark

Posted: Fri Feb 13, 2004 6:48 am
by softsolvers
Heyy
Poblem has been solved

Posted: Fri Feb 13, 2004 6:57 am
by JayBird
solved by my suggestion or another method?

Always good to post the final solutions for others that may have the same problem in guture.

mark

Posted: Fri Feb 13, 2004 9:15 am
by dimitris
softsolvers wrote:Heyy
Poblem has been solved
Could you describe the fix you made?

Posted: Fri Feb 13, 2004 9:23 am
by malcolmboston
take the help then run

:x

Hello Friends

Posted: Sun Feb 15, 2004 11:26 pm
by softsolvers
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

Posted: Mon Feb 16, 2004 4:23 pm
by dimitris
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
I use sessions and cookies in my sites and they work fine!
Even $_SESSION should work!

Re: Hello Friends

Posted: Mon Feb 16, 2004 5:01 pm
by dimitris

Code: Select all

<?php
// Sessions are cool!
?>

session variable

Posted: Mon Feb 16, 2004 10:24 pm
by softsolvers
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