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 7779671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:41:54+00:00 2026-06-01T18:41:54+00:00

I included the ‘Session’ Component and the helper in my AppController.php Now, if I

  • 0

I included the ‘Session’ Component and the helper in my AppController.php
Now, if I use $this->Session->write('App.testString', 'test); the Session is not created, or at least I don’t receive the string when I do echo $this->Session->read('App.testString');.

Do I have to change any settings for Sessions to work?


Inside a controller function I can write and read a session, but if I want to read the session inside a different function (of the same controller) I don’t get a value back.

  • 1 1 Answer
  • 0 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-06-01T18:41:55+00:00Added an answer on June 1, 2026 at 6:41 pm

    I found the solution: By default CakePHP uses the folder which is set in php.ini. This folder couldn’t be accessed in my hosting-environment (and I was not allowed to change the php.ini).

    In this situation, you have to change in the core.php where session files are stored. This is what I had before:

    Configure::write('Session', array(
        'defaults' => 'php'
    ));
    

    I changed it to this one:

    Configure::write('Session', array(
        'defaults' => 'cake'
    ));
    

    This way, cake uses his own tmp-folder to store the session files. Also make sure that the tmp folder and his subfolders are writeable.

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

Sidebar

Related Questions

My included file (include.php) is this: <?php $myarray=(a,b,c); shuffle($myarray); ?> My main php file
What library should be included to use TransparentBlt? This is VC98 (Visual Studio 6)
I included the code for making the URLs work with and without .php .
Background: Included so people don't ask Why on earth I am doing this! I
I included ActionBarSherlock as a library. Added this in manifest.xml: <application android:icon=@drawable/ic_launcher android:label=@string/app_name android:theme=@style/Theme.Sherlock>
Old title: Included PHP doesn't work with JQuery and IE in a function as
I included some adsense code in my google chrome extension popup file. Unfortunately this
I've included all jars the application requires, I'm trying to use Jetty Embedded I
I included all php files of a directory , and it worked just fine
I included mootools le this <script language=javascript src='<%# ResolveClientUrl(~/Scripts/mootools-core-1.3.1-full-compat.js)%>' type=text/javascript/> It compiles but when

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.