maxhugen
Posts: 272
|
| Posted: 05/04/2008, 10:53 PM |
|
I've set a session variable via my index page, which has the Login form:
function Login_Button_DoLogin_OnClick(& $sender) {
....
//Custom Code @95-2A29BDB7
//Save the user's first name to the Session
if ($Login_Button_DoLogin_OnClick == true) {
$db = new clsDBEIP_MySQL();
CCSetSession("Session_FName", CCDLookUp("FName","Person","PersonID=".$db->ToSQL(CCGetUserID(),ccsInteger), $db) );
$db->close();
}
//End Custom Code
....
}
This works AOK on my workstation, but fails when I upload the pages to the Internet.
Any ideas please?
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
Benjamin Krajmalnik
|
| Posted: 05/07/2008, 2:08 PM |
|
Check the server.
Make sure the sessions extension is loaded.
Also, if using the file system for the sessions files, make sure it is not
full.
|
|
|
 |
maxhugen
Posts: 272
|
| Posted: 05/07/2008, 5:24 PM |
|
Hi Benjamin
The sessions extension is loaded - checked the Internet server using phpinfo(). The default CCS session variables are being saved after Login (UserID, Username, GroupID).
So the question remains: why can't I set a 'custom' Session variable on the Internet server, whereas I can do that OK at localhost (my pc)?
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
wkempees
Posts: 1679
|
| Posted: 05/08/2008, 4:01 AM |
|
Could it be possible that your session mechanism is working fine, but your code fails?
Just do :
CCSetSession("Session_Fname", "MaxHugen"");
echo CCGetSession("Session_Fname");
to see if that works.
If it does, your CCDLookup() is possibly returning no value, setting a blank Sessionvar, thereby destroying it.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
maxhugen
Posts: 272
|
| Posted: 05/08/2008, 3:51 PM |
|
Hi Walter.
For some reason the echo wouldn't show. I've had this problem before, don't understand why.
But at your suggestion, I re-examined the Lookup, and suddenly realised there was a case-sensitivity problem: I had used table "Person", but it should have been "person". Hence, it worked on my Windows based pc, but failed in the Linux internet server.
Thanks again.
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
wkempees
Posts: 1679
|
| Posted: 05/08/2008, 5:50 PM |
|
at least I was right!
Goodnight.
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
|