Now that I think about it, it's a little harder.

Firstly, if you're storing your sessions via CAKE or DATABASE methods
you're on your own.

If you're storing your sessions via PHP method then just check /config/
core.php and check what the session key is being sent to the client
as, usually it's CAKEPHP or something.

Next you will probably need to do something like:

/* this code should be run in a PHP file that's not tied to a cake app
*/

  $CAKE_SESSION_COOKIE = 'CAKEPHP';

  ini_set('session.use_trans_sid', 0);
  ini_set('session.name', $CAKE_SESSION_COOKIE);
  ini_set('session.cookie_path', _SAME_PATH_AS_RETURNED_IN_CAKE_FROM_
$this->path);

You'll need to find out where cake is storing it, so do a quick
debug($this->path) and insert that above. Now you should be able to do
session_start(); echo $_SESSION['variable'];

I got this information from cake's Session::_init();



On Jan 28, 9:36 am, Paolo <[EMAIL PROTECTED]> wrote:
> Hi!
>
> How can I access cake variables from an external php file?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to