On Fri, Jun 15, 2012 at 12:54 PM, Daniel <[email protected]> wrote:
> In cake 2.0 I am using the cookie object as follows:
...
> $this->Cookie->domain = 'domain.com'; // I hope this is OK, I'm testing
> on localhost
Give your computer a unique name. On linux or OS X, edit /etc/hostname
or use the hostname command.
Then create a virtual host for each of your projects/sites and add it
to your hosts file so you can browse to it locally.
For example, if your machine is named "poseidon" you could have the
following in the hosts file:
127.0.0.1 project1.poseidon
127.0.0.1 project2.poseidon
etc.
Each site would have its own virtual host file, eg:
<VirtualHost *:80>
ServerName project1.poseidon
Then, to allow your code to run on both your local and remote machines:
$this->Cookie->domain = $_SERVER['SERVER_NAME'];
> I tried in Chrome but I could not find the function to view cookies.
Try Firefox with the WebDeveloper & Firebug extensions.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php