Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming app directory to 1234 breaks Auth #99

Closed
mehlah opened this issue Aug 29, 2011 · 4 comments
Closed

Renaming app directory to 1234 breaks Auth #99

mehlah opened this issue Aug 29, 2011 · 4 comments
Labels

Comments

@mehlah
Copy link
Contributor

mehlah commented Aug 29, 2011

Howdy folks,

I'm opening a ticket while digging deeper, 'cause maybe someone will have a clue faster.

The problem, as I see it

Taken a fresh app and directories layout, and renaming the main app/ directory to 1234 (or any integer), break Auth.

Environment details

I'm using PHP 5.3.6, nginx, and all tests are green

Background

I'm deploying an app using Capistrano and a home made gem for Lithium easy deployments.
Capistrano, by default, creates a directory layout as follows:

[deploy_to]
[deploy_to]/releases
[deploy_to]/releases/20080819001122
[deploy_to]/releases/...
[deploy_to]/shared
[deploy_to]/shared/log
[deploy_to]/shared/pids
[deploy_to]/shared/system
[deploy_to]/current -> [deploy_to]/releases/20100819001122

Each time you deploy, a new directory will be created under the “releases” directory, and the new version placed there. Then, the “current” symbolic link will be updated to point to that directory. (For now, don’t worry about the shared directory; we’ll get to that eventually.)

The web server's document root should be set to the [deploy_to]/current directory.

That means, the app/ directory name is a timestamp, which break things right now.

A "maybe" related ticket: http://dev.lithify.me/lithium/tickets/view/367

@mariuswilms
Copy link
Member

This todo might be the cause for the problem you are seeing. https://github.com/UnionOfRAD/lithium/blob/master/action/Request.php#L592 Can you verify this, manually by changing those values and/or providing a test case against the session auth adapter?

@gwoo gwoo closed this as completed Sep 9, 2011
@gwoo
Copy link
Contributor

gwoo commented Sep 9, 2011

set session.name in Session::config()

@nateabele
Copy link
Member

@gwoo: Should Session throw an exception if that happens?

@gwoo
Copy link
Contributor

gwoo commented Sep 14, 2011

Probably better to change the behavior so it uses a static string like 'lithium-app'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants