|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I have seen the method to disable session IDs which appear in URLs in various places on the internet.
What I don't see, is what difference it makes. OK, the URL changes - but surely there is a downside somewhere? How are the sessions passed from page to page without the PHPSESSID in the URL? |
|
|||
|
the session id can be passed either in the url or via a cookie. There is no difference between the two methods with regards to the session functionality.
there are other issues to consider, such as session hijacking, which may influence which method you use |
|
||||
|
Don't pass them via the URL.
CXLII. Session Handling Functions Read the part: Sessions and Security. PDF document: Session Fixation Vulnerability in Web-based Applications. session_id Function: session_get_cookie_params Related WPW thread: php sessions for storing data |
|
|||
|
I should have said that the information is not required to be secure.
If I switch the URL Session ID off, then am I correct in saying that the session ID will be passed via cookies, and that the information that the session carries will be kept on the server? Should I be worried about people switching off cookies? An example would be the language that the person was viewing in, or the data being viewed. My concern is that if I don't pass the session in the URL, then if the visitor has cookies off, then the pages presented will be confusing, and may not work. |
|
||||
|
To clarify (assuming PHP):
Note: If you ever need it, you can add the session ID yourself to absolute URL's like this: <?php session_start(); ?> MySite |
|
|||
|
Quote:
But (...there is always a but!<G>) what about Googlebot et al? I would expect (for no reason) that these robots work "with cookies disabled". Which will bring the session IDs back into the URL, and back into the search engine listings. Or am I wrong in my supposition? |
|
||||
|
Your question is deep. I may give you some hints:
P.S. Thank you very much = "Tusen takk" in Norwegian :-) |
|
||||
|
Yes, there are too many configuration variables. The languages are getting better as it matures. C++ started as C with headers.
You get a fairly good overview of the developement cycle of PHP from this PHP Developers Meeting. Note the following:
A PHP 6 overview: By Danne Lundqvist "The register_globals, magic_quotes and safe_mode will finally disappear and hopefully slowly fade away into distant memory. It seems PHP 6 will even refuse to start if these settings are found in php.ini. Dropping support for the long versions of super globals, like HTTP_POST_VARS, is also scheduled. This is long overdue." He is developing a hosted application, a help desk system, in PHP using the Zend framework. |
|
||||
|
The PHP developers are still patching and adding functionality with each release but their hands are tied with "backward compatability". I'm sure there are a lot of features they would like to remove/alter but cannot due to breaking older scripts.
There has not been a huge uptake of php5 in the hosting industry (developers are not using it for commercial applications for this reason alone, hosters arent adopting it as there are few scripts written in it, catch22) and I dont see much of an uptake of 6 either unless it is a new standalone version. I would like to see the developers bite the bullet on v6 and forget backward compatability and implement everything they would like to in 6 and release it as a seperate language. Some hosts have phpv4 and phpv5 installed on their systems and it would be easy to provide a v6 version too. The only thing I would really like added to v6 is variable casting as standard.
__________________
"I have not failed. I have found 10,000 ways that don't work" - Thomas Edison. "The secret to creativity is knowing how to hide your sources" - Albert Einstein. |
|
||||
|
Quote:
That is the good thing about classes. You only update the class API and you do not need to rewrite your older classes. A good OO design make your code more forward compatible. I like this cite from the preface to volume II by Harry Fuecks. "If I had one goal in mind with writing the PHP Anthololgy Object Oriented PHP solutions, it was to demonstrate just how easy it is to create intricate and powerful Web applications with the object oriented approach. In many cases, the more common procedural approach would result in unmanageable and bug-ridden "spaghetti code."" More and more pople understand that. The drinks machine (automaton) that has its inner workings ("API") changed functions just as before. The user does not see the change and he need not worry about it. He hists the same buttons. If the designer wants to add new drinks to the automaton, he extends the API (class inheritance). The user only sees some new buttons (methods.) The inner working of the drinks machine is encapsulated. OOP in a nutshell. Final recommendation: Write / import a session class, and you will not loose your hair so fast. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |