{"action":"created","issue":{"url":"https://api.github.com/repos/nicktacular/php-mongo-session/issues/22","labels_url":"https://api.github.com/repos/nicktacular/php-mongo-session/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/nicktacular/php-mongo-session/issues/22/comments","events_url":"https://api.github.com/repos/nicktacular/php-mongo-session/issues/22/events","html_url":"https://github.com/nicktacular/php-mongo-session/pull/22","id":61775738,"number":22,"title":"Added support for apps using namespaces","user":{"login":"philrykoff","id":1710847,"avatar_url":"https://avatars.githubusercontent.com/u/1710847?v=3","gravatar_id":"","url":"https://api.github.com/users/philrykoff","html_url":"https://github.com/philrykoff","followers_url":"https://api.github.com/users/philrykoff/followers","following_url":"https://api.github.com/users/philrykoff/following{/other_user}","gists_url":"https://api.github.com/users/philrykoff/gists{/gist_id}","starred_url":"https://api.github.com/users/philrykoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philrykoff/subscriptions","organizations_url":"https://api.github.com/users/philrykoff/orgs","repos_url":"https://api.github.com/users/philrykoff/repos","events_url":"https://api.github.com/users/philrykoff/events{/privacy}","received_events_url":"https://api.github.com/users/philrykoff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-15T08:27:08Z","updated_at":"2015-03-16T11:03:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nicktacular/php-mongo-session/pulls/22","html_url":"https://github.com/nicktacular/php-mongo-session/pull/22","diff_url":"https://github.com/nicktacular/php-mongo-session/pull/22.diff","patch_url":"https://github.com/nicktacular/php-mongo-session/pull/22.patch"},"body":"For coherency, I had to place the class into a namespace (not included in this fix of course). \r\n\r\nPrior to the fix, class_exists('MongoClient') would fail, as MongoClient was not in the same namespace, hence the change to class_exists('\\MongoClient'). \r\n\r\nTwo issues were fixed regarding session timeout:\r\n\r\n- cookie was not set\r\n- session.gc_maxlifetime was not set using the right option\r\n\r\nThanks for this awesome class!\r\n"},"comment":{"url":"https://api.github.com/repos/nicktacular/php-mongo-session/issues/comments/81581486","html_url":"https://github.com/nicktacular/php-mongo-session/pull/22#issuecomment-81581486","issue_url":"https://api.github.com/repos/nicktacular/php-mongo-session/issues/22","id":81581486,"user":{"login":"nicktacular","id":810546,"avatar_url":"https://avatars.githubusercontent.com/u/810546?v=3","gravatar_id":"","url":"https://api.github.com/users/nicktacular","html_url":"https://github.com/nicktacular","followers_url":"https://api.github.com/users/nicktacular/followers","following_url":"https://api.github.com/users/nicktacular/following{/other_user}","gists_url":"https://api.github.com/users/nicktacular/gists{/gist_id}","starred_url":"https://api.github.com/users/nicktacular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicktacular/subscriptions","organizations_url":"https://api.github.com/users/nicktacular/orgs","repos_url":"https://api.github.com/users/nicktacular/repos","events_url":"https://api.github.com/users/nicktacular/events{/privacy}","received_events_url":"https://api.github.com/users/nicktacular/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T11:03:52Z","updated_at":"2015-03-16T11:03:52Z","body":"Hi @philrykoff thank you for your contribution.\r\n\r\nRegarding the namespaces, I'm still maintaining PHP 5.2.17+ support at this moment so the code needs to make this check carefully since `\\MongoClient` isn't a valid classname prior to 5.2.17.\r\n\r\nHowever, unless a `namespace` is declared, there should be no issues with classes not used with the full namespace:\r\n\r\n```php\r\nphp > class_exists('MongoClient');\r\nphp > var_dump(class_exists('MongoClient'));\r\nbool(true)\r\nphp > var_dump(phpversion());\r\nstring(5) \"5.6.3\"\r\nphp > \r\n```\r\n\r\nI would ask that you verify that you have the mongo extension loaded and running.\r\n\r\nI would also ask that you split up your PR and separate the cookie/session settings and I will merge that."}}