The problem may be that Apache often run as a special service user and not you. Because it isn't a user account, how it behaves mat be different if you don't explicitly set a user. How can an empty string for user be valid? Would user would that actually translate to?
Graham > On 23 Feb 2018, at 8:13 am, Jonathan Schmitt <[email protected]> wrote: > > Thank you for the reply. I am not quite sure what you are asking but this is > the only variable value I have ;C:\Program Files\Microsoft VS Code\bin. FYI, > I downloaded wamp to the system root C:\wamp64\bin\apache and my anaconda > package is located at > C:\Users\jxs215\AppData\Local\Continuum\anaconda3\envs\py3_prod. > > I included an attachment for your reference. Thanks again. > > > On Wednesday, February 21, 2018 at 4:09:34 PM UTC-5, Graham Dumpleton wrote: > Are you setting any environment variables in your personal user account to > have it connect normally when run under your own user account using the > development server? These environment variables will not be set when run > under Apache. > > Graham > >> On 22 Feb 2018, at 6:45 am, Jonathan Schmitt <jonsch...@ <>gmail.com >> <http://gmail.com/>> wrote: >> >> I am trying to deploy my django project on my company LAN. I am able to get >> the site working, however, I lose connectivity to my Microsoft SQL Server >> when I run the site through apache and modwsgi. Everything works fine in the >> development environment. It seems that when django is trying to connect >> using pyodbc is tries to connect as user 'MEDSTAR\COMPUTER_NAME' instead of >> 'user': ' ' which i put in my django settings file. This is what my db >> settings are in my settings.py files: >> >> >> >> 'mosaiq': { >> 'ENGINE': 'sql_server.pyodbc', >> 'NAME': 'MOSAIQ', >> 'USER': '', >> 'PASSWORD': '', >> 'HOST': 'MOSAIQ01T', >> 'PORT': '', >> >> 'OPTIONS': {'driver': 'ODBC Driver 11 for SQL Server', >> }, >> >> >> >> >> ('28000', "[28000] [Microsoft][ODBC Driver 11 for SQL Server][SQL >> Server]Login failed for user 'MEDSTAR\COMPUTER_NAME$'. (18456) >> (SQLDriverConnect)") >> >> >> >> Request Method: GET >> Request URL: http://172.23.81.185/patient/165033E/1/ >> <http://172.23.81.185/patient/165033E/1/> >> Django Version: 1.11.3 >> Exception Type: Error >> Exception Value: >> ('28000', "[28000] [Microsoft][ODBC Driver 11 for SQL Server][SQL >> Server]Login failed for user 'MEDSTAR\\RAMFSHONCDT472$'. (18456) >> (SQLDriverConnect)") >> Exception Location: >> c:\users\jxs215\appdata\local\continuum\anaconda3\envs\py3_env\lib\site-packages\sql_server\pyodbc\base.py >> in get_new_connection, line 309 >> Python Executable: >> C:\Users\jxs215\wamp64\bin\apache\apache2.4.27\bin\httpd.exe >> Python Version: 3.6.2 >> Python Path: >> ['C:\\users\\jxs215\\wamp64\\www\\jons_project\\compare\\apps', >> 'C:\\users\\jxs215\\wamp64\\www\\jons_project', >> >> 'C:\\Users\\jxs215\\AppData\\Local\\Continuum\\Anaconda3\\envs\\py3_env\\python36.zip', >> >> 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\DLLs', >> >> 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib', >> 'C:\\Users\\jxs215\\wamp64\\bin\\apache\\apache2.4.27\\bin', >> 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env', >> >> 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib\\site-packages', >> >> 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib\\site-packages\\win32', >> >> 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib\\site-packages\\win32\\lib', >> >> 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib\\site-packages\\Pythonwin', >> >> 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib\\site-packages\\setuptools-27.2.0-py3.6.egg', >> 'C:\\Users\\jxs215\\wamp64\\www\\jons_project'] >> Server time: Wed, 21 Feb 2018 19:38:09 +00 >> >> >> >> Does anyone know how to get passed this problem? >> >> >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "modwsgi" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to modwsgi+u...@ <>googlegroups.com <http://googlegroups.com/>. >> To post to this group, send email to mod...@ <>googlegroups.com >> <http://googlegroups.com/>. >> Visit this group at https://groups.google.com/group/modwsgi >> <https://groups.google.com/group/modwsgi>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/modwsgi > <https://groups.google.com/group/modwsgi>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > <uservariables.png> -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
