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

WSGI not accessible from apache Python 3.11 - Help needed #853

Open
kleebauer opened this issue Aug 15, 2023 · 2 comments
Open

WSGI not accessible from apache Python 3.11 - Help needed #853

kleebauer opened this issue Aug 15, 2023 · 2 comments

Comments

@kleebauer
Copy link

Who is able to help me?

Thank you in advance

my tries:
(venv) C:\xampp\apache\bin>mod_wsgi-express module-config
LoadFile "C:/Program Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.1008.0_x64__qbz5n2kfra8p0/python311.dll"
LoadModule wsgi_module "C:/Users/leona/OneDrive/Dokumente/PythonScripts/website/Django/15082023_quantdepot/venv/Lib/site-packages/mod_wsgi/server/mod_wsgi.cp311-win_amd64.pyd"
WSGIPythonHome "C:/Users/leona/OneDrive/Dokumente/PythonScripts/website/Django/15082023_quantdepot/venv"

(venv) C:\xampp\apache\bin>httpd -k restart
httpd: Syntax error on line 68 of C:/xampp/apache/conf/httpd.conf: Cannot load C:/Program Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.1008.0_x64__qbz5n2kfra8p0/python311.dll into server: Zugriff verweigert

(venv) C:\xampp\apache\bin>httpd -k restart
httpd: Syntax error on line 69 of C:/xampp/apache/conf/httpd.conf: Cannot load C:/Users/leona/OneDrive/Dokumente/PythonScripts/website/Django/15082023_quantdepot/venv/Lib/site-packages/mod_wsgi/server/mod_wsgi.cp311-win_amd64.pyd into server: Das System kann auf die Datei nicht zugreifen.

(venv) C:\xampp\apache\bin>httpd -k restart
httpd: Syntax error on line 67 of C:/xampp/apache/conf/httpd.conf: Cannot load modules/mod_wsgi.so into server: Das angegebene Modul wurde nicht gefunden.

my modified httpd.conf:

LoadFile "C:/Program Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.1008.0_x64__qbz5n2kfra8p0/python311.dll"
LoadModule wsgi_module "C:/Users/leona/OneDrive/Dokumente/PythonScripts/website/Django/15082023_quantdepot/venv/Lib/site-packages/mod_wsgi/server/mod_wsgi.cp311-win_amd64.pyd"
WSGIPythonHome "C:/Users/leona/OneDrive/Dokumente/PythonScripts/website/Django/15082023_quantdepot/venv"

WSGIScriptAlias / "C:/Users/leona/OneDrive/Dokumente/PythonScripts/website/Django/15082023_quantdepot/myproject/wsgi.py"
WSGIPythonPath "C:/Users/leona/OneDrive/Dokumente/PythonScripts/website/Django/15082023_quantdepot/myproject"

<Directory "C:/Users/leona/OneDrive/Dokumente/PythonScripts/website/Django/15082023_quantdepot/myproject">

Require all granted

my enviromental variables:

MOD_WSGI_APACHE_ROOTDIR: C:\xampp\apache\bin

PYTHONPATH C:\Users\leona\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311

@GrahamDumpleton
Copy link
Owner

Since Apache can't even load the python311.dll file, ensure the following:

  • Both Apache and Python are 64 bit apps. Python appears to be 64 bit, but Apache must also be.
  • Ensure that Python was installed for all users on the system and not just you.

@SomeAB
Copy link

SomeAB commented Sep 4, 2023

@kleebauer .. quicktip: you can use triple back tick or the code-block button .. to nicely format your post, to make it more easily readable.

Like this 

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

No branches or pull requests

3 participants