?
Solved

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

Posted on 2007-08-03
1
Medium Priority
?
240 Views
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>
<cflock scope="server" type="exclusive" timeout="3">
      <cfset SERVER = #cgi.SERVER_NAME#>
</cflock>
0
Comment
Question by:lhaluska
1 Comment
 
LVL 5

Accepted Solution

by:
administradores earned 2000 total points
ID: 19659349
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.

http://www.adobe.com/devnet/server_archive/articles/cf_locking_best_practices.html

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.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses
Course of the Month15 days, 12 hours left to enroll

850 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