Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 720981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:49:14+00:00 2026-05-14T05:49:14+00:00

I have problem with session in cakephp.I have one file chat.php that is in

  • 0

I have problem with session in cakephp.I have one file chat.php that is in webroot folder but when I run that file with ajax I could not find session which is created from chat.ctp file.
so anyone has idea how to get session in third party file in cakePHP.

can I write session any .ctp file ?

Thanks.please help me.

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T05:49:14+00:00Added an answer on May 14, 2026 at 5:49 am

    I’m assuming you’re using the Session component to write the session variable and then trying to read it from a regular ‘ol php file outside of cake’s scope using the $_SESSION variable.

    As you have figure out, this is not guaranteed to work properly. The best way to handle this would be to integrate your chat.php file into cake, using a controller, action and view.

    If this for some strange reason isn’t possible, you would need to import all the files responsible for setting up cake and instantiate the session component and use that to read from your session. I’d strongly recommend going with way #1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem PHP session in different folder. I have problem with PHP session. There are
I have problem with cakephp's Session->write method. If I set a value like $_SESSION['..']
wonder if someone could help me with a little problem. I have session values
One of the things I like with cakePhp, is that we can easily have
A have a problem with PHP application, that I'm working on. Main page which
i have a strange problem, when i use setcookie in PHP with session, while
I'm using MAMP, but I have a problem with session. My code works perfectly
I have following problem: when my session expires and user clicks on Ajax.Actionlink, Logon
i have a problem with session in my webapplication (asp.net mvc rc2). the application
I have a bizarre problem. I use a lot of session variables so I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.