Session Variable

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
softsolvers
Forum Commoner
Posts: 75
Joined: Fri Feb 13, 2004 4:26 am
Location: India

Session Variable

Post 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
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post 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
User avatar
softsolvers
Forum Commoner
Posts: 75
Joined: Fri Feb 13, 2004 4:26 am
Location: India

Session Variable

Post 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
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post 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
User avatar
softsolvers
Forum Commoner
Posts: 75
Joined: Fri Feb 13, 2004 4:26 am
Location: India

Post by softsolvers »

Heyy
Poblem has been solved
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post 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
User avatar
dimitris
Forum Contributor
Posts: 110
Joined: Wed Jan 14, 2004 3:47 am
Location: Athens, Greece

Post by dimitris »

softsolvers wrote:Heyy
Poblem has been solved
Could you describe the fix you made?
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

take the help then run

:x
User avatar
softsolvers
Forum Commoner
Posts: 75
Joined: Fri Feb 13, 2004 4:26 am
Location: India

Hello Friends

Post 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
User avatar
dimitris
Forum Contributor
Posts: 110
Joined: Wed Jan 14, 2004 3:47 am
Location: Athens, Greece

Re: Hello Friends

Post 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!
User avatar
dimitris
Forum Contributor
Posts: 110
Joined: Wed Jan 14, 2004 3:47 am
Location: Athens, Greece

Re: Hello Friends

Post by dimitris »

Code: Select all

<?php
// Sessions are cool!
?>
User avatar
softsolvers
Forum Commoner
Posts: 75
Joined: Fri Feb 13, 2004 4:26 am
Location: India

session variable

Post 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
Post Reply