4 Replies - 2557 Views - Last Post: 23 June 2010 - 06:33 AM Rate Topic: -----

#1 avinashraju007   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 23-June 10

session starting in coldfusion 5

Posted 23 June 2010 - 06:05 AM

how do i start a session in cold fusion 5?
Is This A Good Question/Topic? 0
  • +

Replies To: session starting in coldfusion 5

#2 xheartonfire43x   User is offline

  • D.I.C Regular

Reputation: 46
  • View blog
  • Posts: 454
  • Joined: 22-December 08

Re: session starting in coldfusion 5

Posted 23 June 2010 - 06:09 AM

You visit the application...

Why are you trying to write an application for ColdFusion 5 when ColdFusion 9 just released? Don't get me wrong I still host some legacy code on a ColdFusion 5 server in my office, but I refuse to build onto any applications running 5. If someone wants something built they need to pay an upgrade fee to move up to a new server, although most clients were given complimentary upgrades.
Was This Post Helpful? 0
  • +
  • -

#3 Craig328   User is offline

  • I make this look good
  • member icon

Reputation: 2042
  • View blog
  • Posts: 3,644
  • Joined: 13-January 08

Re: session starting in coldfusion 5

Posted 23 June 2010 - 06:18 AM

You don't actually start a session. A session begins when two circumstances come together:

  • You have sessionmanagement="yes" in your Application.cfm file
  • A user accesses your site

You'll also want to have a sessiontimeout value in your Application.cfm file that is greater than 0 ms.

The session will begin for the user when they visit your site. From Adobe's docs for their MX product (oldest one I could find):

Quote

A session refers to all the connections that a single client might make to a server in the course of viewing any pages associated with a given application. Sessions are specific to both the individual user and the application. As a result, every user of an application has a separate session and has access to a separate set of session variables.

This logical view of a session begins with the first connection to an application by a client and ends after that client's last connection. However, because of the stateless nature of the web, it is not always possible to define a precise point at which a session ends. A session should end when the user finishes using an application. In most cases, however, a web application has no way of knowing if a user has finished or is just lingering over a page.

Therefore, sessions always terminate after a time-out period of inactivity. If the user does not access a page of the application within this time-out period, ColdFusion interprets this as the end of the session and clears any variables associated with that session.


CF5 is kind of old (like really old) and versions since then use Application.cfc instead of .cfm to manage CF sessions. CF5 is still capable tech but it is dated.

Good luck!

This post has been edited by Craig328: 23 June 2010 - 06:27 AM

Was This Post Helpful? 0
  • +
  • -

#4 avinashraju007   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 23-June 10

Re: session starting in coldfusion 5

Posted 23 June 2010 - 06:24 AM

Thanks Craig328,
I know that cold fusion 5 too outdated compared to the newer ones. But I'm building this for a company which is still using Cold Fusion 5.
Was This Post Helpful? 0
  • +
  • -

#5 Craig328   User is offline

  • I make this look good
  • member icon

Reputation: 2042
  • View blog
  • Posts: 3,644
  • Joined: 13-January 08

Re: session starting in coldfusion 5

Posted 23 June 2010 - 06:33 AM

A company still using CF5? Wow. When you say "still using" do you mean they have other apps that they run on CF5? If so, you might want to mention that newer versions of the language are much faster, more secure, a lot more flexible and come with a ton more features than CF5 ever dreamed of having.

If it's a cost issue, there is OpenBD, Railo Open Source and a few other products that cost zero to buy. I'm currently working with OpenBD on a personal project and it's pretty damn slick.

Just a suggestion but they'll get a lot better performance out of an updated CF engine and with the newer features of an upgrade may discover there's some functionality that could serve their business needs.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1