• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Sharing session variables with PHP

New Here ,
Dec 08, 2008 Dec 08, 2008

Copy link to clipboard

Copied

Is there a way to share sessions between ColdFusion and PHP? I'm looking for a way to use CF and PHP together on the same project. I've seen a way to run PHP within a CF page by using <cf_php> <?php tags but I'm looking for a way to run PHP natively in a .php file and still be able to access/modify CF session variables.
TOPICS
Advanced techniques

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 08, 2008 Dec 08, 2008

Copy link to clipboard

Copied

LATEST
opensource_ wrote:
> Is there a way to share sessions between ColdFusion and PHP? I looking for a
> way to use CF and PHP together on the same project? I've seen a way to run PHP
> within a CF page by using <cf_php> <?php tags but I'm looking for a way to run
> PHP natively in .php file and still be able to access/modify CF session
> variables.
>

The ColdFusion application server does not interfere with PHP's
application server memory and vice a versa. So no they do not share
sessions.

That being said, there are relatively simple methods to pass session
data back and forth. Web services or plain http request [<cfhttp...>
and|or the PHP equivalent] would be the first things that occur to my mind.

You'll have to take into count that while the PHP portion of the
application is running the ColdFusion session timeout is ticking down as
well as the reverse. If this is a concern, some type of 'heart-beat'
logic would need to be used to call code that keeps to corresponding
session in the other application server alive.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation