For testing, I also exported
DD_LIBRARY_PATH=/Users/teemu/edge_tools/oracle. DYLD_LIBRARY_PATH refuses
to be set. DD_LIBRARY_PATH is there.
PID: 545
UID: 501
GID: 20
CWD: /Users/teemu/edge_tools
python.version: '2.7.10 (default, Oct 23 2015, 19:19:21) \n[GCC 4.2.1
Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]'
python.prefix: '/Users/teemu/edge_tools/flask'
python.path: ['/Users/teemu/edge_tools',
'/Users/teemu/edge_tools/flask/lib/python27.zip',
'/Users/teemu/edge_tools/flask/lib/python2.7',
'/Users/teemu/edge_tools/flask/lib/python2.7/plat-darwin',
'/Users/teemu/edge_tools/flask/lib/python2.7/plat-mac',
'/Users/teemu/edge_tools/flask/lib/python2.7/plat-mac/lib-scriptpackages',
'/Users/teemu/edge_tools/flask/Extras/lib/python',
'/Users/teemu/edge_tools/flask/lib/python2.7/lib-tk',
'/Users/teemu/edge_tools/flask/lib/python2.7/lib-old',
'/Users/teemu/edge_tools/flask/lib/python2.7/lib-dynload',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
'/Users/teemu/edge_tools/flask/lib/python2.7/site-packages']
apache.version: (2, 4, 18)
mod_wsgi.version: (4, 5, 5)
mod_wsgi.process_group: localhost:8000
mod_wsgi.application_group:
mod_wsgi.maximum_processes: 1
mod_wsgi.threads_per_process: 5
mod_wsgi.process_metrics: {'cpu_system_time': 0.009999999776482582,
'request_busy_time': 0.000294, 'current_time': 1472134445.337643,
'memory_max_rss': 9998336L, 'memory_rss': 9998336L, 'pid': 545,
'request_threads': 1, 'restart_time': 1472134442.218155, 'threads':
[{'thread_id': 1, 'request_count': 1L}], 'request_count': 0L,
'active_requests': 1, 'cpu_user_time': 0.03999999910593033, 'running_time': 3L}
mod_wsgi.server_metrics: None
apache.description: Apache/2.4.18 (Unix) mod_wsgi/4.5.5 Python/2.7.10
apache.build_date: Feb 20 2016 20:03:19
apache.mpm_name: prefork
apache.maximum_processes: 20
apache.threads_per_process: 1
PATH: ['/Users/teemu/edge_tools',
'/Users/teemu/edge_tools/flask/lib/python27.zip',
'/Users/teemu/edge_tools/flask/lib/python2.7',
'/Users/teemu/edge_tools/flask/lib/python2.7/plat-darwin',
'/Users/teemu/edge_tools/flask/lib/python2.7/plat-mac',
'/Users/teemu/edge_tools/flask/lib/python2.7/plat-mac/lib-scriptpackages',
'/Users/teemu/edge_tools/flask/Extras/lib/python',
'/Users/teemu/edge_tools/flask/lib/python2.7/lib-tk',
'/Users/teemu/edge_tools/flask/lib/python2.7/lib-old',
'/Users/teemu/edge_tools/flask/lib/python2.7/lib-dynload',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
'/Users/teemu/edge_tools/flask/lib/python2.7/site-packages']
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
sys.getdefaultencoding(): ascii
sys.getfilesystemencoding(): utf-8
locale.getlocale(): ('en_US', 'UTF-8')
locale.getdefaultlocale(): ('en_US', 'UTF-8')
locale.getpreferredencoding(): UTF-8
CONTEXT_DOCUMENT_ROOT: '/tmp/mod_wsgi-localhost:8000:501/htdocs'
CONTEXT_PREFIX: ''
DOCUMENT_ROOT: '/tmp/mod_wsgi-localhost:8000:501/htdocs'
GATEWAY_INTERFACE: 'CGI/1.1'
HTTP_ACCEPT: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
HTTP_ACCEPT_ENCODING: 'gzip, deflate'
HTTP_ACCEPT_LANGUAGE: 'en-us'
HTTP_CACHE_CONTROL: 'max-age=0'
HTTP_CONNECTION: 'keep-alive'
HTTP_HOST: '127.0.0.1:8000'
HTTP_USER_AGENT: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6)
AppleWebKit/601.7.7 (KHTML, like Gecko) Version/9.1.2 Safari/601.7.7'
PATH_INFO: '/'
QUERY_STRING: ''
REMOTE_ADDR: '127.0.0.1'
REMOTE_PORT: '49345'
REQUEST_METHOD: 'GET'
REQUEST_SCHEME: 'http'
REQUEST_URI: '/'
SCRIPT_FILENAME: '/tmp/mod_wsgi-localhost:8000:501/htdocs/'
SCRIPT_NAME: ''
SERVER_ADDR: '127.0.0.1'
SERVER_ADMIN: '[no address given]'
SERVER_NAME: '127.0.0.1'
SERVER_PORT: '8000'
SERVER_PROTOCOL: 'HTTP/1.1'
SERVER_SIGNATURE: ''
SERVER_SOFTWARE: 'Apache'
apache.version: (2, 4, 18)
mod_wsgi.application_group: ''
mod_wsgi.callable_object: 'handle_request'
mod_wsgi.daemon_connects: '1'
mod_wsgi.daemon_restarts: '0'
mod_wsgi.daemon_start: '1472134445337256'
mod_wsgi.enable_sendfile: '0'
mod_wsgi.handler_script: '/tmp/mod_wsgi-localhost:8000:501/handler.wsgi'
mod_wsgi.listener_host: ''
mod_wsgi.listener_port: '8000'
mod_wsgi.path_info: ''
mod_wsgi.process_group: 'localhost:8000'
mod_wsgi.queue_start: '1472134445337091'
mod_wsgi.request_handler: 'wsgi-handler'
mod_wsgi.request_id: 'lwitAkZIgqw'
mod_wsgi.request_start: '1472134445336727'
mod_wsgi.script_name: '/'
mod_wsgi.script_reloading: '1'
mod_wsgi.script_start: '1472134445337340'
mod_wsgi.thread_id: 1
mod_wsgi.thread_requests: 0L
mod_wsgi.total_requests: 0L
mod_wsgi.version: (4, 5, 5)
wsgi.errors: <mod_wsgi.Log object at 0x10fe16348>
wsgi.file_wrapper: <type 'mod_wsgi.FileWrapper'>
wsgi.input: <mod_wsgi.Input object at 0x10f83f4a8>
wsgi.multiprocess: False
wsgi.multithread: True
wsgi.run_once: False
wsgi.url_scheme: 'http'
wsgi.version: (1, 0)
Apple_PubSub_Socket_Render: '/private/tmp/com.apple.launchd.t2P6nQjuzu/Render'
DD_LIBRARY_PATH: '/Users/teemu/edge_tools/oracle'
HOME: '/Users/teemu'
LANG: 'en_US.UTF-8'
LC_ALL: 'en_US.UTF-8'
LOGNAME: 'teemu'
MOD_WSGI_EXPRESS: 'true'
MOD_WSGI_GROUP: 'staff'
MOD_WSGI_HTTPS_PORT: 'None'
MOD_WSGI_HTTP_PORT: '8000'
MOD_WSGI_LISTENER_HOST: 'localhost'
MOD_WSGI_MODULES_DIRECTORY: '/usr/libexec/apache2'
MOD_WSGI_SERVER_ALIASES: ''
MOD_WSGI_SERVER_NAME: 'localhost'
MOD_WSGI_SERVER_ROOT: '/tmp/mod_wsgi-localhost:8000:501'
MOD_WSGI_USER: 'teemu'
MOD_WSGI_WORKING_DIRECTORY: '/Users/teemu/edge_tools'
PATH: '/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin'
PWD: '/Users/teemu/edge_tools'
PYTHON_EGG_CACHE: '/tmp/mod_wsgi-localhost:8000:501/python-eggs'
SECURITYSESSIONID: '186a8'
SHELL: '/bin/bash'
SHLVL: '1'
SSH_AUTH_SOCK: '/private/tmp/com.apple.launchd.v5nfJkVKCT/Listeners'
TERM: 'xterm-256color'
TERM_PROGRAM: 'Apple_Terminal'
TERM_PROGRAM_VERSION: '361.1'
TERM_SESSION_ID: '3B0D99A9-5BD3-4968-9511-DC203C857F8B'
TMPDIR: '/var/folders/wd/kg12dkg908n42nzf75w6pr540000gn/T/'
USER: 'teemu'
VERSIONER_PYTHON_PREFER_32_BIT: 'no'
VERSIONER_PYTHON_VERSION: '2.7'
XPC_FLAGS: '0x0'
XPC_SERVICE_NAME: '0'
__CF_USER_TEXT_ENCODING: '0x1F5:0x0:0x0'
On Wednesday, August 24, 2016 at 8:41:06 PM UTC-4, Graham Dumpleton wrote:
>
> Hmmm, most odd:
>
> $ export DYLD_LIBRARY_PATH=xxx
> grumpy-old-man:~ graham$ echo $DYLD_LIBRARY_PATH
> xxx
> grumpy-old-man:~ graham$ env | grep DYLD
>
> What about in browser output when use:
>
>
> https://raw.githubusercontent.com/GrahamDumpleton/mod_wsgi/develop/tests/environ.wsgi
>
> as WSGI application?
>
> Graham
>
> On 25 Aug 2016, at 10:36 AM, Teemu Korpijaakko <[email protected]
> <javascript:>> wrote:
>
> I think this might be strange...
>
>
> I added export DYLD_LIBRARY_PATH=/Users/teemu/edge_tools/oracle to
> envvars. Still nothing shows in the console output.
>
>
> Then I did a test by exporting DYLD_LIBRARY_PATH and DD_LIBRARY_PATH right
> before running mod_wsgi-express. The console output only shows
> DD_LIBRARY_PATH?
>
>
> Teemus-Mac-mini:edge_tools teemu$ export
> DYLD_LIBRARY_PATH=/Users/teemu/edge_tools/oracle
>
> Teemus-Mac-mini:edge_tools teemu$ export
> DD_LIBRARY_PATH=/Users/teemu/edge_tools/oracle
>
> Teemus-Mac-mini:edge_tools teemu$ flask/bin/mod_wsgi-express start-server
> wsgi.py
>
> Server URL : http://localhost:8000/
>
> Server Root : /tmp/mod_wsgi-localhost:8000:501
>
> Server Conf : /tmp/mod_wsgi-localhost:8000:501/httpd.conf
>
> Error Log File : /tmp/mod_wsgi-localhost:8000:501/error_log (warn)
>
> Request Capacity : 5 (1 process * 5 threads)
>
> Request Timeout : 60 (seconds)
>
> Queue Backlog : 100 (connections)
>
> Queue Timeout : 45 (seconds)
>
> Server Capacity : 20 (event/worker), 20 (prefork)
>
> Server Backlog : 500 (connections)
>
> Locale Setting : en_US.UTF-8
>
> MOD_WSGI_MODULES_DIRECTORY=/usr/libexec/apache2
>
> MOD_WSGI_SERVER_ROOT=/tmp/mod_wsgi-localhost:8000:501
>
> SHELL=/bin/bash
>
> TERM=xterm-256color
>
> SSH_CLIENT=192.168.254.106 57809 22
>
> TMPDIR=/var/folders/wd/kg12dkg908n42nzf75w6pr540000gn/T/
>
> DD_LIBRARY_PATH=/Users/teemu/edge_tools/oracle
>
> SSH_TTY=/dev/ttys004
>
> LC_ALL=en_US.UTF-8
>
> USER=teemu
>
> MOD_WSGI_LISTENER_HOST=localhost
>
> __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
>
> PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
>
> MAIL=/var/mail/teemu
>
> MOD_WSGI_HTTPS_PORT=None
>
> VERSIONER_PYTHON_VERSION=2.7
>
> PWD=/Users/teemu/edge_tools
>
> LANG=en_US.UTF-8
>
> MOD_WSGI_HTTP_PORT=8000
>
> HOME=/Users/teemu
>
> SHLVL=2
>
> MOD_WSGI_GROUP=staff
>
> MOD_WSGI_USER=teemu
>
> LOGNAME=teemu
>
> MOD_WSGI_WORKING_DIRECTORY=/Users/teemu/edge_tools
>
> VERSIONER_PYTHON_PREFER_32_BIT=no
>
> SSH_CONNECTION=192.168.254.106 57809 192.168.101.61 22
>
> _=/usr/bin/env
>
>
> On Wednesday, August 24, 2016 at 8:18:01 PM UTC-4, Graham Dumpleton wrote:
>>
>> Try setting and exporting it in:
>>
>> /tmp/mod_wsgi-localhost:8000:501/envvars
>>
>> Then see if in environ script output in browser.
>>
>> I can’t think how I would be stripping it out in mod_wsgi-express wrapper.
>>
>> Graham
>>
>> On 25 Aug 2016, at 10:08 AM, Teemu Korpijaakko <[email protected]> wrote:
>>
>> I've done that and nothing changes. Also, if I export DYLD_LIBRARY_PATH
>> right before running mod_wsgi-express, I still don't see it listed in the
>> envvar output?
>>
>> This is confusing me!
>>
>> On Wednesday, August 24, 2016 at 7:58:38 PM UTC-4, Graham Dumpleton wrote:
>>>
>>> Crap, gave you wrong URL for test app. I meant:
>>>
>>>
>>> https://raw.githubusercontent.com/GrahamDumpleton/mod_wsgi/develop/tests/environ.wsgi
>>>
>>> Doesn’t matter.
>>>
>>> If the directory /ade/b/3071542110/oracle/rdbms/lib doesn’t exist, then
>>> output form ‘otool -L’ isn’t what I expect. You had:
>>>
>>> /Users/teemu/edge_tools/flask/lib/python2.7/site-packages/cx_Oracle.so:
>>>
>>> /ade/b/3071542110/oracle/rdbms/lib/libclntsh.dylib.11.1 (compatibility
>>> version 0.0.0, current version 0.0.0)
>>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
>>> 1226.10.1)
>>>
>>> Based on that, the directory '/ade/b/3071542110/oracle/rdbms/lib’ should
>>> exist and should contain the file 'libclntsh.dylib.11.1’.
>>>
>>> If it doesn’t, fine where 'libclntsh.dylib.11.1’ is located and set
>>> DYLD_LIBRARY_PATH to the directory it is in.
>>>
>>> Graham
>>>
>>> On 25 Aug 2016, at 9:54 AM, Teemu Korpijaakko <[email protected]> wrote:
>>>
>>> Oh, right! The browser window...there I see Hello World!
>>>
>>> That folder doesn't exist on the machine, but if I export first, I get
>>> the same result. 500 Internal Server Error and the same error in error_log.
>>>
>>>
>>>
>>> On Wed, Aug 24, 2016 at 7:32 PM, Graham Dumpleton <[email protected]
>>> > wrote:
>>>
>>>> For the environ WSGI script. The values of DYLD variables was
>>>> interested in was what was shown in the browser window, not console. But
>>>> then that wasn’t in console anyway, means shouldn’t be in browser either.
>>>>
>>>> I don’t understand why it would be required, but try setting:
>>>>
>>>> export DYLD_LIBRARY_PATH=/ade/b/3071542110/oracle/rdbms/lib
>>>>
>>>> before running mod_wsgi-express.
>>>>
>>>> This would normally be the solution, but don’t understand why would if
>>>> ‘otool -L’ resolves properly.
>>>>
>>>> Graham
>>>>
>>>> On 25 Aug 2016, at 9:23 AM, Teemu Korpijaakko <[email protected]> wrote:
>>>>
>>>> I'm nearly 100% certain that I unset it when I ran 'otool -L'
>>>>
>>>> Anyway, so the apachectl script is as expected.
>>>>
>>>> Here's the output after adding env to envvars:
>>>>
>>>> Server URL : http://localhost:8000/
>>>>
>>>> Server Root : /tmp/mod_wsgi-localhost:8000:501
>>>>
>>>> Server Conf : /tmp/mod_wsgi-localhost:8000:501/httpd.conf
>>>>
>>>> Error Log File : /tmp/mod_wsgi-localhost:8000:501/error_log (warn)
>>>>
>>>> Request Capacity : 5 (1 process * 5 threads)
>>>>
>>>> Request Timeout : 60 (seconds)
>>>>
>>>> Queue Backlog : 100 (connections)
>>>>
>>>> Queue Timeout : 45 (seconds)
>>>>
>>>> Server Capacity : 20 (event/worker), 20 (prefork)
>>>>
>>>> Server Backlog : 500 (connections)
>>>>
>>>> Locale Setting : en_US.UTF-8
>>>>
>>>> MOD_WSGI_MODULES_DIRECTORY=/usr/libexec/apache2
>>>>
>>>> MOD_WSGI_SERVER_ROOT=/tmp/mod_wsgi-localhost:8000:501
>>>>
>>>> SHELL=/bin/bash
>>>>
>>>> TERM=xterm-256color
>>>>
>>>> SSH_CLIENT=192.168.254.106 56498 22
>>>>
>>>> TMPDIR=/var/folders/wd/kg12dkg908n42nzf75w6pr540000gn/T/
>>>>
>>>> SSH_TTY=/dev/ttys003
>>>>
>>>> LC_ALL=en_US.UTF-8
>>>>
>>>> USER=teemu
>>>>
>>>> MOD_WSGI_LISTENER_HOST=localhost
>>>>
>>>> __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
>>>>
>>>> PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
>>>>
>>>> MAIL=/var/mail/teemu
>>>>
>>>> MOD_WSGI_HTTPS_PORT=None
>>>>
>>>> VERSIONER_PYTHON_VERSION=2.7
>>>>
>>>> PWD=/Users/teemu/edge_tools
>>>>
>>>> LANG=en_US.UTF-8
>>>>
>>>> MOD_WSGI_HTTP_PORT=8000
>>>>
>>>> HOME=/Users/teemu
>>>>
>>>> SHLVL=2
>>>>
>>>> MOD_WSGI_GROUP=staff
>>>>
>>>> MOD_WSGI_USER=teemu
>>>>
>>>> LOGNAME=teemu
>>>>
>>>> MOD_WSGI_WORKING_DIRECTORY=/Users/teemu/edge_tools
>>>>
>>>> VERSIONER_PYTHON_PREFER_32_BIT=no
>>>>
>>>> SSH_CONNECTION=192.168.254.106 56498 192.168.101.61 22
>>>>
>>>> _=/usr/bin/env
>>>>
>>>> I don't see DYLD_LIBRARY_PATH there.
>>>>
>>>> When I run you test application, I see the following output:
>>>>
>>>> Teemus-Mac-mini:edge_tools teemu$ flask/bin/mod_wsgi-express
>>>> start-server events.wsgi
>>>>
>>>> Server URL : http://localhost:8000/
>>>>
>>>> Server Root : /tmp/mod_wsgi-localhost:8000:501
>>>>
>>>> Server Conf : /tmp/mod_wsgi-localhost:8000:501/httpd.conf
>>>>
>>>> Error Log File : /tmp/mod_wsgi-localhost:8000:501/error_log (warn)
>>>>
>>>> Request Capacity : 5 (1 process * 5 threads)
>>>>
>>>> Request Timeout : 60 (seconds)
>>>>
>>>> Queue Backlog : 100 (connections)
>>>>
>>>> Queue Timeout : 45 (seconds)
>>>>
>>>> Server Capacity : 20 (event/worker), 20 (prefork)
>>>>
>>>> Server Backlog : 500 (connections)
>>>>
>>>> Locale Setting : en_US.UTF-8
>>>>
>>>> MOD_WSGI_MODULES_DIRECTORY=/usr/libexec/apache2
>>>>
>>>> MOD_WSGI_SERVER_ROOT=/tmp/mod_wsgi-localhost:8000:501
>>>>
>>>> SHELL=/bin/bash
>>>>
>>>> TERM=xterm-256color
>>>>
>>>> SSH_CLIENT=192.168.254.106 56498 22
>>>>
>>>> TMPDIR=/var/folders/wd/kg12dkg908n42nzf75w6pr540000gn/T/
>>>>
>>>> SSH_TTY=/dev/ttys003
>>>>
>>>> LC_ALL=en_US.UTF-8
>>>>
>>>> USER=teemu
>>>>
>>>> MOD_WSGI_LISTENER_HOST=localhost
>>>>
>>>> __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
>>>>
>>>> PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
>>>>
>>>> MAIL=/var/mail/teemu
>>>>
>>>> MOD_WSGI_HTTPS_PORT=None
>>>>
>>>> VERSIONER_PYTHON_VERSION=2.7
>>>>
>>>> PWD=/Users/teemu/edge_tools
>>>>
>>>> LANG=en_US.UTF-8
>>>>
>>>> MOD_WSGI_HTTP_PORT=8000
>>>>
>>>> HOME=/Users/teemu
>>>>
>>>> SHLVL=2
>>>>
>>>> MOD_WSGI_GROUP=staff
>>>>
>>>> MOD_WSGI_USER=teemu
>>>>
>>>> LOGNAME=teemu
>>>>
>>>> MOD_WSGI_WORKING_DIRECTORY=/Users/teemu/edge_tools
>>>>
>>>> VERSIONER_PYTHON_PREFER_32_BIT=no
>>>>
>>>> SSH_CONNECTION=192.168.254.106 56498 192.168.101.61 22
>>>>
>>>> _=/usr/bin/env
>>>>
>>>>
>>>> Again, no DYLD_LIBRARY_PATH set
>>>>
>>>>
>>>> FWIW, I have the Oracle file in /Users/teemu/edge_tools/oracle. This
>>>> seems to work fine for simply import cx_Oracle in the interpreter.
>>>> Setting
>>>> DYLD_LIBRARY_PATH to whatever you end up configuring as ORACLE_HOME
>>>> appears
>>>> to be SOP for the installation. In order to get cx_Oracle to install
>>>> properly, I had to set ORACLE_HOME and DYLD_LIBRARY_PATH to
>>>> /Users/teemu/edge_tools/oracle
>>>>
>>>>
>>>>
>>>>
>>>> On Wednesday, August 24, 2016 at 6:44:11 PM UTC-4, Graham Dumpleton
>>>> wrote:
>>>>>
>>>>> Okay, this is confusing.
>>>>>
>>>>> This specific problem is usually caused because Oracle libraries are
>>>>> not in a standard directory location. It is therefore necessary to
>>>>> set DYLD_LIBRARY_PATH environment variable to say where they reside.
>>>>>
>>>>> When I did the ‘otool -L’ test on cx_Oracle.so I asked you to ensure
>>>>> you had unset the DYLD_LIBRARY_PATH environment variable. With that not
>>>>> set, if DYLD_LIBRARY_PATH was required I would have expected ‘otool -L’
>>>>> to
>>>>> not be able to resolve the Oracle library, yet it was.
>>>>>
>>>>> Even if you hadn’t unset it, it means it was in your environment
>>>>> either way. This means that when you ran mod_wsgi-express it should have
>>>>> inherited DYLD_LIBRARY_PATH and it still should find the Oracle libraries
>>>>> when loading cx_Oracle.so.
>>>>>
>>>>> Few more things to check.
>>>>>
>>>>> Find the ‘apachectl’ script that is generated by mod_wsgi-express.
>>>>> Usually it would be at:
>>>>>
>>>>> /tmp/mod_wsgi-localhost\:8000\:502/apachectl
>>>>>
>>>>> What does it have for:
>>>>>
>>>>> SHLIBPATH=""
>>>>>
>>>>> if [ "x$SHLIBPATH" != "x" ]; then
>>>>> DYLD_LIBRARY_PATH="$SHLIBPATH:$DYLD_LIBRARY_PATH"
>>>>> export DYLD_LIBRARY_PATH
>>>>> fi
>>>>>
>>>>> It should probably be the same, but want to check.
>>>>>
>>>>> Also edit:
>>>>>
>>>>> /tmp/mod_wsgi-localhost\:8000\:502/envvars
>>>>>
>>>>> and add to it:
>>>>>
>>>>> env
>>>>>
>>>>> This will output to console when running mod_wsgi-express all the
>>>>> environment variables set.
>>>>>
>>>>> What does DYLD_LIBRARY_PATH show in that? Are there any other DYLD
>>>>> environment variables set?
>>>>>
>>>>> Also trying running mod_wsgi-express with this test WSGI application:
>>>>>
>>>>>
>>>>> https://raw.githubusercontent.com/GrahamDumpleton/mod_wsgi/develop/tests/events.wsgi
>>>>>
>>>>> What DYLD environment variables get through to the WSGI application.
>>>>>
>>>>> Graham
>>>>>
>>>>> On 24 Aug 2016, at 11:44 PM, Teemu Korpijaakko <[email protected]>
>>>>> wrote:
>>>>>
>>>>> I'm sorry. I forgot to run the virtualenv interpreter...
>>>>>
>>>>> ('HTTPD', '/usr/sbin/httpd')
>>>>>
>>>>> ('WITH_TARBALL_PACKAGE', False)
>>>>>
>>>>> ('ROTATELOGS', '/usr/sbin/rotatelogs')
>>>>>
>>>>> ('WITH_HTTPD_PACKAGE', False)
>>>>>
>>>>> ('__file__',
>>>>> '/Users/teemu/edge_tools/flask/lib/python2.7/site-packages/mod_wsgi/server/apxs_config.pyc')
>>>>>
>>>>> ('PROGNAME', 'httpd')
>>>>>
>>>>> ('__package__', 'mod_wsgi.server')
>>>>>
>>>>> ('SBINDIR', '/usr/sbin')
>>>>>
>>>>> ('MPM_NAME', '')
>>>>>
>>>>> ('LIBEXECDIR', '/usr/libexec/apache2')
>>>>>
>>>>> ('SHLIBPATH_VAR', 'DYLD_LIBRARY_PATH')
>>>>>
>>>>> ('__name__', 'mod_wsgi.server.apxs_config')
>>>>>
>>>>> ('SHLIBPATH', '')
>>>>>
>>>>> ('os', <module 'os' from
>>>>> '/Users/teemu/edge_tools/flask/lib/python2.7/os.pyc'>)
>>>>>
>>>>> ('__doc__', None)
>>>>>
>>>>> ('BINDIR', '/usr/bin')
>>>>>
>>>>>
>>>>>
>>>>> On Wednesday, August 24, 2016 at 9:39:20 AM UTC-4, Teemu Korpijaakko
>>>>> wrote:
>>>>>>
>>>>>> I'm getting ImportError: No module name mod_wsgi.server.apxs_config
>>>>>>
>>>>>> On Tuesday, August 23, 2016 at 11:36:55 PM UTC-4, Graham Dumpleton
>>>>>> wrote:
>>>>>>>
>>>>>>> What do you get if you fire up the command line Python interpreter
>>>>>>> and enter:
>>>>>>>
>>>>>>> import mod_wsgi.server.apxs_config as config
>>>>>>> for k,v in config.__dict__.items():
>>>>>>> if k != '__builtins__': print(k, v))
>>>>>>>
>>>>>>> Graham
>>>>>>>
>>>>>>> On 24 Aug 2016, at 6:50 AM, Teemu Korpijaakko <[email protected]>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Thank you for the quick reply! I've run the commands you listed and
>>>>>>> the output is as follows:
>>>>>>>
>>>>>>>
>>>>>>> /Users/teemu/edge_tools/flask/lib/python2.7/site-packages/cx_Oracle.so:
>>>>>>> Mach-O universal binary with 2 architectures
>>>>>>>
>>>>>>> /Users/teemu/edge_tools/flask/lib/python2.7/site-packages/cx_Oracle.so
>>>>>>> (for architecture i386): Mach-O bundle i386
>>>>>>>
>>>>>>> /Users/teemu/edge_tools/flask/lib/python2.7/site-packages/cx_Oracle.so
>>>>>>> (for architecture x86_64): Mach-O 64-bit bundle x86_64
>>>>>>>
>>>>>>>
>>>>>>> and
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> /Users/teemu/edge_tools/flask/lib/python2.7/site-packages/cx_Oracle.so:
>>>>>>>
>>>>>>> /ade/b/3071542110/oracle/rdbms/lib/libclntsh.dylib.11.1
>>>>>>> (compatibility version 0.0.0, current version 0.0.0)
>>>>>>>
>>>>>>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
>>>>>>> version 1226.10.1)
>>>>>>>
>>>>>>> On Tuesday, August 23, 2016 at 4:34:54 PM UTC-4, Graham Dumpleton
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> What do you get one when you run:
>>>>>>>>
>>>>>>>>
>>>>>>>> file
>>>>>>>> /Users/teemu/edge_tools/flask/lib/python2.7/site-packages/cx_Oracle.so
>>>>>>>>
>>>>>>>> and:
>>>>>>>>
>>>>>>>> otool -L
>>>>>>>> /Users/teemu/edge_tools/flask/lib/python2.7/site-packages/cx_Oracle.so
>>>>>>>>
>>>>>>>> When doing the latter make sure that you don’t have
>>>>>>>> ‘DYLD_LIBRARY_PATH’ environment variable set.
>>>>>>>>
>>>>>>>> On MacOS X that error generally means that the shared library
>>>>>>>> hasn’t been compiled as a fat binary. That is, doesn’t supply all
>>>>>>>> architectures and it more specifically doesn’t supply the
>>>>>>>> architecture for
>>>>>>>> what the Apache web server is running as. This issue though hasn’t
>>>>>>>> generally existed for ages though as everything should be 64bit in
>>>>>>>> MacOS X
>>>>>>>> now.
>>>>>>>>
>>>>>>>> Graham
>>>>>>>>
>>>>>>>> On 24 Aug 2016, at 5:52 AM, Teemu Korpijaakko <[email protected]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> So mod_wsgi-express seems like a lovely way to quickly deploy a
>>>>>>>> fairly simple Flask application that I have, but I've run into an
>>>>>>>> issue
>>>>>>>> that I can't seem to solve. It's probably pretty simple though...my
>>>>>>>> Flask
>>>>>>>> application runs fine with the dev server included with Flask. When I
>>>>>>>> attempt to run the same application using mod_wsgi-express
>>>>>>>> start-server, it
>>>>>>>> fails. Looking at the error log, I can see that i fails because the
>>>>>>>> Oracle
>>>>>>>> Instant client fails to load. How can I fix this? Python and Flask
>>>>>>>> are
>>>>>>>> all installed in a virtualenv.
>>>>>>>>
>>>>>>>> OS X El Capitan 10.11.6
>>>>>>>>
>>>>>>>> wsgi.py:
>>>>>>>> from app import app as application
>>>>>>>>
>>>>>>>> snippet of error_log:
>>>>>>>>
>>>>>>>> [Tue Aug 23 12:47:05.771184 2016] [wsgi:error] [pid 1508] File
>>>>>>>> "/Users/teemu/edge_tools/app/__init__.py", line 1, in <module>
>>>>>>>>
>>>>>>>> [Tue Aug 23 12:47:05.771210 2016] [wsgi:error] [pid 1508]
>>>>>>>> import cx_Oracle
>>>>>>>>
>>>>>>>> [Tue Aug 23 12:47:05.771225 2016] [wsgi:error] [pid 1508]
>>>>>>>> ImportError:
>>>>>>>> dlopen(/Users/teemu/edge_tools/flask/lib/python2.7/site-packages/cx_Oracle.so,
>>>>>>>>
>>>>>>>> 2): Library not loaded:
>>>>>>>> /ade/b/3071542110/oracle/rdbms/lib/libclntsh.dylib.11.1
>>>>>>>>
>>>>>>>> [Tue Aug 23 12:47:05.771229 2016] [wsgi:error] [pid 1508]
>>>>>>>> Referenced from:
>>>>>>>> /Users/teemu/edge_tools/flask/lib/python2.7/site-packages/cx_Oracle.so
>>>>>>>>
>>>>>>>> [Tue Aug 23 12:47:05.771231 2016] [wsgi:error] [pid 1508] Reason:
>>>>>>>> image not found
>>>>>>>>
>>>>>>>> [Tue Aug 23 12:47:46.005206 2016] [mpm_prefork:notice] [pid 1506]
>>>>>>>> AH00169: caught SIGTERM, shutting down
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>>> 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.
>>>>>>> <http://googlegroups.com/>com <http://googlegroups.com/>.
>>>>>>> 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.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>> --
>>>>> 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. <http://googlegroups.com/>com
>>>>> <http://googlegroups.com/>.
>>>>> 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.
>>>>>
>>>>>
>>>>>
>>>> --
>>>> 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.
>>>>
>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "modwsgi" group.
>>>> To unsubscribe from this topic, visit
>>>> https://groups.google.com/d/topic/modwsgi/DjR37hyY6Q4/unsubscribe.
>>>> To unsubscribe from this group and all its topics, 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.
>>>>
>>>
>>>
>>> --
>>> 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.
>>>
>>>
>>>
>> --
>> 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.
>>
>>
>>
> --
> 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] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at https://groups.google.com/group/modwsgi.
> For more options, visit 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].
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.