{"action":"created","issue":{"url":"https://api.github.com/repos/MindscapeHQ/raygun4php/issues/74","labels_url":"https://api.github.com/repos/MindscapeHQ/raygun4php/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/MindscapeHQ/raygun4php/issues/74/comments","events_url":"https://api.github.com/repos/MindscapeHQ/raygun4php/issues/74/events","html_url":"https://github.com/MindscapeHQ/raygun4php/pull/74","id":115278216,"number":74,"title":"Send path when setting cookies","user":{"login":"john-n-smith","id":1314694,"avatar_url":"https://avatars.githubusercontent.com/u/1314694?v=3","gravatar_id":"","url":"https://api.github.com/users/john-n-smith","html_url":"https://github.com/john-n-smith","followers_url":"https://api.github.com/users/john-n-smith/followers","following_url":"https://api.github.com/users/john-n-smith/following{/other_user}","gists_url":"https://api.github.com/users/john-n-smith/gists{/gist_id}","starred_url":"https://api.github.com/users/john-n-smith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john-n-smith/subscriptions","organizations_url":"https://api.github.com/users/john-n-smith/orgs","repos_url":"https://api.github.com/users/john-n-smith/repos","events_url":"https://api.github.com/users/john-n-smith/events{/privacy}","received_events_url":"https://api.github.com/users/john-n-smith/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-05T12:57:03Z","updated_at":"2015-11-05T13:00:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/MindscapeHQ/raygun4php/pulls/74","html_url":"https://github.com/MindscapeHQ/raygun4php/pull/74","diff_url":"https://github.com/MindscapeHQ/raygun4php/pull/74.diff","patch_url":"https://github.com/MindscapeHQ/raygun4php/pull/74.patch"},"body":"Calling `setcookie` with an empty `$path` parameter causes the browser to set a cookie using the path of the current request.\r\n\r\nFor example, `http://example.com/foo/a.php` and `http://example.com/foo/bar/b.php` both instantiate `RaygunClient` with `$disableUserTracking == false`.\r\nIf a browser visits these pages, it will have two instances of the `rgisanonymous` cookie stored. One at `/foo` and one at `/foo/bar`.\r\n\r\nWhat we found with this behaviour, is that browsers would hit the max cookie limit (as low as 50 cookies on some browsers) which would cause younger cookies to be replaced.\r\n\r\nThis fix sets the `$path` parameter to `/` when calling set cookie, so only a single cookie is set per key, per domain."},"comment":{"url":"https://api.github.com/repos/MindscapeHQ/raygun4php/issues/comments/154052852","html_url":"https://github.com/MindscapeHQ/raygun4php/pull/74#issuecomment-154052852","issue_url":"https://api.github.com/repos/MindscapeHQ/raygun4php/issues/74","id":154052852,"user":{"login":"john-n-smith","id":1314694,"avatar_url":"https://avatars.githubusercontent.com/u/1314694?v=3","gravatar_id":"","url":"https://api.github.com/users/john-n-smith","html_url":"https://github.com/john-n-smith","followers_url":"https://api.github.com/users/john-n-smith/followers","following_url":"https://api.github.com/users/john-n-smith/following{/other_user}","gists_url":"https://api.github.com/users/john-n-smith/gists{/gist_id}","starred_url":"https://api.github.com/users/john-n-smith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john-n-smith/subscriptions","organizations_url":"https://api.github.com/users/john-n-smith/orgs","repos_url":"https://api.github.com/users/john-n-smith/repos","events_url":"https://api.github.com/users/john-n-smith/events{/privacy}","received_events_url":"https://api.github.com/users/john-n-smith/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T13:00:10Z","updated_at":"2015-11-05T13:00:10Z","body":"This is a quick way to fix #66, although another way is to not call `$this->StoreOrRetrieveUserCookie('rgisanonymous', ...)` twice."}}