| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Soon to be RICHdoggie! Join Date: Jan 2005 Location: UK
Posts: 2,408
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | do I always have to do session_start()??? Do I always have to do session_start, even on pages I don't want to use any session variables? Will it still remember all the variables? Thanks Tom |
| |
| | THREAD STARTER #5 (permalink) |
| Soon to be RICHdoggie! Join Date: Jan 2005 Location: UK
Posts: 2,408
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | thanks a lot - am just about to launch into a whole user script for 6yd.net. Am making a few different things for it that will run off a user database. My goodness it looks complicated though! well... wish me luck - may be back for more help later! |
| |
| | #6 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,069
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | it really depends on wether the user is using cookies or not. I beleive if the user has cookies turned off (and as such the url is appended with the session variable) then there will be no way for the server to know which session it is and will start a new 1. |
| |
| | THREAD STARTER #7 (permalink) | ||||
| Soon to be RICHdoggie! Join Date: Jan 2005 Location: UK
Posts: 2,408
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
????: NamePros.com http://www.namepros.com/programming/203279-do-i-always-have-do-session_start.html script.php?name=filth@...??? | ||||
| |
| | #10 (permalink) | ||||
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,069
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Code: page_name.php?sid=82cf054ebb3f3a88d9e4a4c4668cd9f7 ????: NamePros.com http://www.namepros.com/showthread.php?t=203279 All of this of course really depends on the server configuration. | ||||
| |
| | #12 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,069
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | yes there is always a sid (session ID) otherwise the server would have no way of recognising which session the person is using. The url is ussually only appended IF the user has cookies disabled but this behaviour can be changed in the php.ini file (or using ini_set() |
| |
| | #14 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,069
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | i take it you mean changing the behaviour of the sessions. Yes 1 possible reason is if you do not want to issue cookies. Again if the user has cookies disabled and your server doesnt have session.use_trans_sid enabled the user will not be able to traverse your site properly if it relies on sessions. |
| |
| | THREAD STARTER #15 (permalink) |
| Soon to be RICHdoggie! Join Date: Jan 2005 Location: UK
Posts: 2,408
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | how would I get round that? I am hosted with an external hosting company... do you think that use_trans_sid would be enabled? Is there any reason that they would turn it off? Thanks Tom |
| |
| | #16 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,069
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | easiest way to find out is to create a phpinfo page:- PHP Code: |
| |