I am trying to start Apache server on my laptop with Windows 11. I typed the command mod_wsgi-express module-config and got:
LoadFile "C:/Program Files/WindowsApps/PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0/python310.dll"
LoadModule wsgi_module "C:/Users/Sergey/ProgPython/CabeeFashion/my_env1/lib/site-packages/mod_wsgi/server/mod_wsgi.cp310-win_amd64.pyd"
WSGIPythonHome "C:/Users/Sergey/ProgPython/CabeeFashion/my_env1"
I added all these to the httpd.conf file, but when I am trying to start httpd.exe, I am getting next error: cannot load
httpd.exe: Syntax error on line 539 of C:/Users/Sergey/ProgPython/CabeeFashion/Apache24/conf/httpd.conf: Syntax error on line 1 of C:/Users/Sergey/ProgPython/CabeeFashion/Apache24/conf/extra/httpd-wsgi.conf: Cannot load C:/Program Files/WindowsApps/PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0/python310.dll into server: \xce\xf2\xea\xe0\xe7\xe0\xed\xee \xe2 \xe4\xee\xf1\xf2\xf3\xef\xe5.
I used extart file httpd-wsgi.conf and included it in httpd.conf:
Include conf/extra/httpd-wsgi.conf
How can I fix this. Why http.exe says me cannot lod file, if it exists.
I have checked version of Apache and wsgi modules, all of them are 64. VC is installed.
Related
This is the url http://www.iwantthis.co.in/opencart/admin/
Here is the errorlog file
[16-Nov-2019 14:50:31 UTC] PHP Warning: require_once(../vqmod/vqmod.php): failed to open stream: No such file or directory in /home/wp88umzgp8jr/public_html/opencart/admin/index.php on line 17
[16-Nov-2019 14:50:31 UTC] PHP Fatal error: require_once(): Failed opening required '../vqmod/vqmod.php' (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/wp88umzgp8jr/public_html/opencart/admin/index.php on line 17
Looks like the VQMOD folder has been deleted / moved. If you weren't using VQMOD you can remove the offending code from both index.php files:
To test this, comment out these lines:
/index.php:
// VirtualQMOD
//require_once('./vqmod/vqmod.php');
//VQMod::bootup();
// VQMODDED Startup
//require_once(VQMod::modCheck(DIR_SYSTEM . 'startup.php'));
/admin/index.php:
//VirtualQMOD
//require_once('../vqmod/vqmod.php');
//VQMod::bootup();
// VQMODDED Startup
//require_once(VQMod::modCheck(DIR_SYSTEM . 'startup.php'));
The bigger question is why is the VQMOD folder is missing from the original path?
VQMOD folder is missing in your website. download VQMOD extension and upload it to your website by FTP
http://docs.opencart.com/en-gb/administration/vqmod/
I'm deploying an application with mod_wsgi-express, and I've a new error when launching the service :
oct. 12 09:15:29 Angara mod_wsgi-express[12284]: Usage: mod_wsgi-express start-server script [options]
oct. 12 09:15:29 Angara mod_wsgi-express[12284]: mod_wsgi-express: error: no such option: --url-alias /static /var/www/agenda-v3.example.tld/static --url-alias /media /var/www/agenda-v3.example.tld/media
The mod_wsgi-express application fails to launch...
I've added the --log-directory directive to route logs to the ${SERVER_PATH}/log, which works great (I can read the log files now),
Have you any idea ? It worked before...
I've checked the /var/www/agenda-v3.example.tld/media and /var/www/agenda-v3.example.tld/static directories, they exist for now.
Thanks for your help !
The problem is that WSGI_URL_ALIASES is being passed through and interpreted as a single value rather than three separate arguments.
IOW, the argument is seen as single value of:
--url-alias /static /var/www/agenda-v3.example.tld/static
What I would actually suggest you do is use setup-server to pre-setup the mod_wsgi-express directory with the options you required. The only thing your init files then need to do is apachectl start and apachectl stop. All the stuff about options is recorded in scripts in the mod_wsgi-express directory.
See the PyPi page about using setup-server.
https://pypi.python.org/pypi/mod_wsgi
I have a local Django application that I've been developing for a while. Today, after about a month off from working on it I went back to it, but it wouldn't load. Checking the apache error log, I see the following over and over:
Current thread 0x00007fffc0be23c0 (most recent call first):
[Tue Sep 26 19:18:09.154141 2017] [core:notice] [pid 1590] AH00052: child pid 1651 exit signal Abort trap (6)
Fatal Python error: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
The last time I was working on the project, I made some changes to my project code, but didn't touch and of my apache or mod_wsgi configuration.
My PYTHONPATH is not set (nor was it set a month ago when everything was working. Here's my mod_wsgi configs (again haven't changed):
WSGIDaemonProcess secureDash python-path=/Users/user/projects/secureDash_project python-home=/Users/user/.venvs/securedash_py3.6
WSGIProcessGroup secureDash
WSGIScriptAlias / /Users/user/projects/secureDash_project/config/wsgi.py
I've spent a lot of time googling this issue, but none of the common fixes seem to apply. Looking for some guidance on where else to look.
I discovered that, while in my virtualenv:
workon securedash_py3.6
I got an error trying to run the python console:
(securedash_py3.6) user conf $ python3
dyld: Library not loaded: #executable_path/../.Python
Referenced from: /Users/user/.venvs/securedash_py3.6/bin/python3
Reason: image not found
Abort trap: 6
Searching that error pointed me to this SO topic that eventually resolved my issue. Basically I had done some stuff with homebrew that must have broken the symlinks in my venv. Here are the specific commands that I read to resolve:
find ~/.venvs/securedash_py3.6/ -type l -delete
Then cd to the virtualenv directory:
$ cd ~/.venvs/securedash_py3.6
$ virtualenv .
Using base prefix '/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6'
Overwriting /Users/user/.venvs/securedash_py3.6/lib/python3.6/orig-prefix.txt with new content
New python executable in /Users/user/.venvs/securedash_py3.6/bin/python3.6
Also creating executable in /Users/user/.venvs/securedash_py3.6/bin/python
Installing setuptools, pip, wheel...done.
And all is well.
I restarted my app and it didn't come back up with the error:
httpd: Syntax error in -C/-c directive: Syntax error on line 1 of
/var/lib/openshift/#######/python/etc/conf.d/wsgi.conf: Cannot load
/var/lib/openshift/#######/python/modules/python27-mod_wsgi.so into server:
/var/lib/openshift/#######/python/modules/python27-mod_wsgi.so:
cannot open shared object file: No such file or directory
I changed nothing, not sure what to do.
Am not able to get dispatcher working on my Ubuntu machine, following is the error that I get after apache restart
Syntax error on line 2 of /etc/apache2/conf.d/dispatcher.any:
Invalid command '/farms', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
Am using the default dispatcher.any file without any changes.
I've enabled the dispatcher module as below:
LoadModule dispatcher_module /usr/lib/apache2/modules/dispatcher-apache2.2-4.1.4.so
<IfModule disp_apache2.c>
# location of the configuration file. eg: 'conf/dispatcher.any'
DispatcherConfig conf.d/dispatcher.any
# location of the dispatcher log file. eg: 'logs/dispatcher.log'
DispatcherLog /var/log/apache2/dispatcher.log
# log level for the dispatcher log
# 0 Errors
# 1 Warnings
# 2 Infos
# 3 Debug
DispatcherLogLevel 3
# if turned to 1, the dispatcher looks like a normal module
DispatcherNoServerHeader 0
# if turned to 1, request to / are not handled by the dispatcher
# use the mod_alias then for the correct mapping
DispatcherDeclineRoot 0
# if turned to 1, the dispatcher uses the URL already processed
# by handlers preceeding the dispatcher (i.e. mod_rewrite)
# instead of the original one passed to the web server.
DispatcherUseProcessedURL 0
# if turned to 1, the dispatcher does not spool an error
# response to the client (where the status code is greater
# or equal than 400), but passes the status code to
# Apache, which e.g. allows an ErrorDocument directive
# to process such a status code.
DispatcherPassError 0
</IfModule>
Can anyone please help me out in resolving the issue?
Thanks,
-- Pawan
Move dispatcher.any out of conf.d/ and into conf/ and update DispatcherConfig
What happens is, when apache starts up it goes through the conf.d directory and tries to load the files contained within as apache configuration files. The dispatcher.any file is not an apache configuration file and cannot be loaded as such. This causes the syntax error on the first non-comment line of the file.