#1  
Old 5th May 2006, 09:00
the_idol the_idol is offline
Junior Member
 
Join Date: Mar 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Php Sessions?

I can't seem to make sessions work.
Perfect Centos 4.3 86_x64 install
ispconfig install no problems



I am using this simple script
Code:
<?php
session_start( );
?>
<html>
<head>
<title>test session </title>
</head>
<body>
<?php
print "Session number: ";
print $PHPSESSID;
?>
<br />
<?php
session_register("username");
$username = "admin";
print "Your name is: ";
print $username;
?>
</body>
</html>
Site config:

Shell
Cgi Scripts
Php Scripts
SSI
FTP
MYSQL
SSL


The script is in web/foo/script.php

Any Help would be great

The Idol
Reply With Quote
Sponsored Links
  #2  
Old 5th May 2006, 11:24
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Quote:
Originally Posted by the_idol
I can't seem to make sessions work.
What makes you think this? Any errors?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 5th May 2006, 16:17
the_idol the_idol is offline
Junior Member
 
Join Date: Mar 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Results below, forgot to post


Session number:
Your name is: admin


The Idol
Reply With Quote
  #4  
Old 5th May 2006, 17:18
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,501 Times in 4,330 Posts
Default

Please try to replace:

print $PHPSESSID;

with:

print session_id();
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 5th May 2006, 20:43
the_idol the_idol is offline
Junior Member
 
Join Date: Mar 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Welcome to session number: 448a813333b4d2326ff4361d25b71110
Your name is: admin


That worked ??

Why is that


The Idol
Reply With Quote
  #6  
Old 6th May 2006, 00:27
the_idol the_idol is offline
Junior Member
 
Join Date: Mar 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Found out why, Register Globals is off


Thanks,,
The Idol
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"unknown filter" growing apache log. wwparrish Installation/Configuration 6 1st September 2006 18:40
Questions in regards to ISP-Server Setup - Ubuntu 5.10 "Breezy Badger" rbrantley HOWTO-Related Questions 16 10th April 2006 18:26
Downgrade php5 to php4.4.2 llizards Installation/Configuration 4 13th March 2006 23:58
all my site go to /var/www/ Absolusteph Installation/Configuration 14 11th March 2006 21:27
Can not access website after uploading brianetilley Installation/Configuration 21 11th January 2006 19:43


All times are GMT +2. The time now is 02:28.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.