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

IIS install command uses wrong path for FastCGI configuration #87

Open
jkeifer opened this issue Apr 3, 2018 · 0 comments
Open

IIS install command uses wrong path for FastCGI configuration #87

jkeifer opened this issue Apr 3, 2018 · 0 comments
Assignees
Labels

Comments

@jkeifer
Copy link
Member

jkeifer commented Apr 3, 2018

Currently, the IIS commands generates something like this for the FastCGI command:
C:\Anaconda_x86\envs\ebagis_prod\python.exe|C:\Anaconda_x86\envs\ebagis_prod\Scripts\ebagis winfcgi --pythonpath=C:\Anaconda_x86\envs\ebagis_prod\Scripts\ebagis

But that example actually should be:
C:\Anaconda_x86\envs\ebagis_prod\python.exe|D:\projects\ebagis\production\ebagis_prod\django-ebagis\manage.py winfcgi --pythonpath=D:\projects\ebagis\production\ebagis_prod\django-ebagis

We see the FastCGI command generated on this line:

<add name="FastCGI" path="*" verb="*" modules="FastCgiModule" scriptProcessor="{{ python_interpreter }}|{{ current_script }} winfcgi --pythonpath={{ project_dir }}" resourceType="Unspecified" requireAccess="Script" />

The current_script and project_directory are created with the assumption the current process is run under the local manage.py, but we are running under the ebagis command. While this assumption is really not valid nor safe, it is reasonable enough given typical usage. Therefore, I think the manage.py ultimately called by the ebagis command needs to replace sys.argv[0] with itself in certain contexts to ensure this commands and others depending on similar mechanisms will not fail like we see in this situation.

@jkeifer jkeifer added the bug label Apr 3, 2018
@jkeifer jkeifer self-assigned this Apr 3, 2018
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

1 participant