473,388 Members | 1,426 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Problem with session SID

This constant doesn't work for me...

<?php echo strip_tags(SID); ?> does nothing, and yes I did start session....

manual says that session id should be passed throug url as
session_name=session_id but how can I found out session's name???
Jul 17 '05 #1
4 3706
Goran Ljubej wrote:
manual says that session id should be passed throug url as
session_name=session_id but how can I found out session's name???


http://www.php.net/session_name
JW

Jul 17 '05 #2
> <?php echo strip_tags(SID); ?> does nothing, and yes I did start
session....
manual says that session id should be passed throug url as
session_name=session_id but how can I found out session's name???


SID is the string you need to add when the session id is not passed via a
cookie.
As you do not need to add anything to the url when cookies are enable, SID
is then empty.
Anyway, I don't see why you need to strip_tags(SID) : it doesn't have any
tag.
I would understand a urlencode(SID) a little better, eventhough I think it
is not necessary.

If you need the session name or the session id :
session_name()
session_id()

Jul 17 '05 #3
BLob wrote:
<?php echo strip_tags(SID); ?> does nothing, and yes I did start


session....
manual says that session id should be passed throug url as
session_name=session_id but how can I found out session's name???

SID is the string you need to add when the session id is not passed via a
cookie.
As you do not need to add anything to the url when cookies are enable, SID
is then empty.
Anyway, I don't see why you need to strip_tags(SID) : it doesn't have any
tag.
I would understand a urlencode(SID) a little better, eventhough I think it
is not necessary.

If you need the session name or the session id :
session_name()
session_id()

thanks for your explanation... so basicaly... mine SID was empty because
i had cookies enables?
in manual says strip_tags(SID) for some security reasons... which are
those i don't know... thanks bro
Jul 17 '05 #4
> in manual says strip_tags(SID) for some security reasons... which are
those i don't know... thanks bro


From the manual : "The strip_tags() is used when printing the SID in order
to prevent XSS related attacks." But I don't understand the kind of attack
they are talking about...
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: | last post by:
I have a problem with session in my version of PHP I use WinXP (FAT32), Apache, latest PHP. In Linux, Apache, latest PHP instead it works fine! So, my program is: ----------------In Windows...
13
by: Mimi | last post by:
Hello, I am having trouble using the session vars in PHP 4.3.9 OS: Win XP Prof Web Server IIS (is local and there are no links to other servers from the web pages I work on) Browser: IE 6.0 ...
9
by: Bartosz Wegrzyn | last post by:
I need help with sessions. I createt set of web site for nav with authorization. first I go into main.php which looks like this: <?php //common functions include_once '../login/common.php';...
3
by: Gary | last post by:
I am having a strange problem that I cannot solve. I have an asp page that I use for a user to login and gain access to other pages. When the user logs in I set a couple of session variables like...
8
by: Ashish | last post by:
Incase the problem got bogged down reposting... Hi Gregory, I think I didnt make myself much clear. The problem is: 1. I have one ASP.NET application (no classic asp) and it has a main page...
1
by: Andrew | last post by:
Hey all, Working on revamping our Intranet here and making use of the LDPA, Active Directory, Directory Services, etc. that .Net provides. I am still fairly new on this subject, so the problem...
1
by: Johan Nedin | last post by:
Hello! I have a problem with SQLSession state on my ASP.NET pages. SQLSession state behaves very different from InProcess session state, which I think is very bad. I can understand some of...
0
by: Alexander Widera | last post by:
hello all, i have a problem ... like I already discussed in the thread "session empty" I have the following problem: I created a completely new web... i added 2 files: sessiontest1.aspx:
2
by: Tom | last post by:
I hope someone can help me figure out what's going on here. I've re-read the section on sessions at php.net and Googled this high and low but I haven't found anything that quite explains my...
0
by: fiefie.niles | last post by:
I am having problem with thread. I have a Session class with public string variable (called Message) that I set from my Main program. In the session class it checks for the value of Message while...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.