Coldfusion to Php code that Ensures the integrity of shared data?

Posted on 2007-08-03
Last Modified: 2008-02-01
I am translating a coldfusion page that has "CFLOCK" in it and don't know how to translate it, how would I do this?
<cflock scope="session" type="exclusive" timeout="3">
      <cfparam name="session.sut" default="Unlisted NONE AP">
<cflock scope="server" type="exclusive" timeout="3">
      <cfset SERVER = #cgi.SERVER_NAME#>
Question by:lhaluska
    1 Comment
    LVL 5

    Accepted Solution

    This is to lock the session.sut and the servername to prevent errors in shared memory but you are not working with shared memory if you don't use "Shared Memory Functions", if you want to understnd the use of cflock take a read on the next link.

    Don't translate the code, understand the purpose of the CF code and rebuild it in php using it's simplicity, for example storing session in db not in shared memory as CF does so you don't have to lock the session.

    Hope this clarify something.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Part of the Global Positioning System A geocode ( is the major subset of a GPS coordinate (, the other parts being the altitude and t…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    6 Experts available now in Live!

    Get 1:1 Help Now