Hi Graham, It was the same issue but no worries. They blew away the server I was working on and I'm going to another project anyway. I was trying to get them in a good position but it'll have to be done at some other point.
Thanks again for your quick response and being willing to assist. Justin On Apr 11, 2016 18:49, "Graham Dumpleton" <[email protected]> wrote: > What is the current issues you are having? What are the error messages? I > don’t want to assume it is the same issue. > > On 12 Apr 2016, at 2:02 AM, Justin Martin <[email protected]> wrote: > > Hey Graham, > > Coming back to you again because I'm having issues with a django > installation. I followed what we did last time and was still having issues. > I was hoping your more trained eye would be helpful. > > I was able to do the hello word and that came back fine. This is what I > have so far > > sys.path = ['/usr/lib/power', > '/usr/lib64/python26.zip','/usr/lib64/python2.6','/usr/lib64/plat-linux2','/usr/lib64/lib-tk','/usr/lib64/lib-old','/usr/lib64/lib-dynload','/usr/lib64/site-packages','/usr/lib64/site-packages/gtk-20','/usr/lib/python2.6/sitepackages'] > > sys.version = '2.6.6 (v266:84292, May 22 2015, 08:34:51)' > > sys.prefix = '/usr' > > Thanks in advance. > > On Wed, Oct 28, 2015 at 6:56 AM, Graham Dumpleton < > [email protected]> wrote: > >> Likely you had a restrictive umask setting when installing Django, if you >> had installed it using pip or its own setup.py file. >> >> Graham >> >> On 28 Oct 2015, at 9:53 pm, Justin Martin <[email protected]> wrote: >> >> Graham, >> That did it. I didn't have the permissions set correctly on that folder. >> Once I updated those everything started displaying correctly. Thought I had >> looked there before but apparently not. >> >> Thanks for all your help in tracking this issue down >> On Oct 25, 2015 21:10, "Graham Dumpleton" <[email protected]> >> wrote: >> >>> Since '/usr/lib/python2.6/site-packages’ does appear to be in sys.path, >>> what do you get for: >>> >>> ls -las /usr/lib/python2.6/site-packages/django >>> >>> Then try a simple WSGI hello world that does: >>> >>> import sys >>> import os >>> >>> def application(environ, start_response): >>> status = '200 OK' >>> output = 'sys.path = >>> %s' % repr(os.listdir('/usr/lib/python2.6/site-packages/django') >>> >>> response_headers = [('Content-type', 'text/plain'), >>> ('Content-Length', str(len(output)))] >>> start_response(status, response_headers) >>> >>> return [output] >>> >>> The latter should show whether the Apache process has access rights to >>> the directory to see in it and whether file system permissions are okay or >>> whether there may be SELinux restrictions coming into play. >>> >>> Graham >>> >>> On 24 Oct 2015, at 12:50 am, Justin Martin <[email protected]> wrote: >>> >>> sys.path= ['/path/to/myapplication', '/usr/lib64/python26.zip', >>> '/usr/lib64/python2.6/','/usr/lib64/python2.6/plat-linux2', >>> '/usr/lib64/python2.6/lib-tk','/usr/lib64/python2.6/lib-old', >>> '/usr/lib64/python2.6/lib-dynload','/usr/lib64/python2.6/site-packages', >>> '/usr/lib64/python2.6/site-packages/gtk2-0', >>> '/usr/lib/python2.6/site-packages', >>> '/usr/lib/python2.6/site-packages/setuptools-0.6cll-py2.6.egg-info'] >>> >>> >>> >>> On Thursday, October 22, 2015 at 7:13:49 AM UTC-4, Graham Dumpleton >>> wrote: >>>> >>>> The second program that outputs sys.path, not the first. >>>> >>>> import sys >>>> >>>> def application(environ, start_response): >>>> status = '200 OK' >>>> output = 'sys.path = %s' % repr(sys.path) >>>> >>>> response_headers = [('Content-type', 'text/plain'), >>>> ('Content-Length', str(len(output)))] >>>> start_response(status, response_headers) >>>> >>>> return [output] >>>> >>>> >>>> >>>> Graham >>>> >>>> On 22 Oct 2015, at 10:12 pm, Justin Martin <[email protected]> wrote: >>>> >>>> Graham, >>>> I got what's pasted below >>>> >>>> sys.version = '2.6.6 (r266:84292, Nov 21 2013, 10:50:32) \n[GCC 4.4.7 >>>> 21020313 (Red Hat 4.4.7-4)]' >>>> sys.prefix = '/usr' >>>> >>>> On Oct 22, 2015 07:03, "Graham Dumpleton" <[email protected]> >>>> wrote: >>>> >>>>> What do you get if you use the test WSGI application in: >>>>> >>>>> >>>>> https://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Python_Installation_In_Use >>>>> >>>>> to print out what sys.path is inside of the WSGI application process? >>>>> >>>>> Graham >>>>> >>>>> On 22 Oct 2015, at 12:47 pm, Justin Martin <[email protected]> wrote: >>>>> >>>>> I got /usr/lib/python2.6/site-packages/django/__init__.pyc >>>>> >>>>> I am pretty sure I'm not using a virtual environment but I'd there a >>>>> way to tell if django is installed in system wide python? I am not sure if >>>>> django was installed via rpm or from the repo or how it was installed as >>>>> it >>>>> was already installed >>>>> On Oct 20, 2015 17:09, "Graham Dumpleton" <[email protected]> >>>>> wrote: >>>>> >>>>>> Correct, you would use something like: >>>>>> >>>>>> Order allow,deny >>>>>> Allow from all >>>>>> >>>>>> within the Directory block set up to allow access to the directory >>>>>> containing the WSGI script file. >>>>>> >>>>>> As this is Red Hat, maybe the issue is a SELinux issue restrictions >>>>>> on Apache, although since you aren’t using a Python virtual environment, >>>>>> if >>>>>> Django is installed in system wide Python it should be accessible. >>>>>> >>>>>> At the Python interpreter, what do you get for: >>>>>> >>>>>> import django >>>>>> print django.__file__ >>>>>> >>>>>> Graham >>>>>> >>>>>> On 21 Oct 2015, at 3:09 am, Justin Martin <[email protected]> wrote: >>>>>> >>>>>> No worries I was just making sure the post didn't get lost. I did the >>>>>> django.get_version() and it returned 1.6.1. I'm using apache 2.2 and I >>>>>> shouldn't have to use Require all granted and I get a authtype not set. I >>>>>> should be using the order and granted correct? >>>>>> >>>>>> Thanks, >>>>>> Justin >>>>>> On Oct 19, 2015 23:30, "Graham Dumpleton" <[email protected]> >>>>>> wrote: >>>>>> >>>>>>> Sorry for the slow reply, been travelling for work the last couple >>>>>>> of weeks. >>>>>>> >>>>>>> From the Python interpreter, what do you get if you go: >>>>>>> >>>>>>> $ python >>>>>>> Python 2.7.10 (default, Jul 14 2015, 19:46:27) >>>>>>> [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin >>>>>>> Type "help", "copyright", "credits" or "license" for more >>>>>>> information. >>>>>>> >>> import django >>>>>>> >>> django.get_version() >>>>>>> ‘1.7.1' >>>>>>> >>>>>>> This will validate Django is actually installed, but also tell you >>>>>>> how old of a Django version you have. >>>>>>> >>>>>>> The wsgi.py code you have likely need Django 1.4 (???) or newer. >>>>>>> >>>>>>> Am wondering whether you have a really old version of Django >>>>>>> installed from a system package, rather than you having pip installed it >>>>>>> yourself. >>>>>>> >>>>>>> Graham >>>>>>> >>>>>>> On 15 Oct 2015, at 6:10 am, Justin Martin <[email protected]> >>>>>>> wrote: >>>>>>> >>>>>>> Graham, >>>>>>> >>>>>>> I'm not using python in a virtual environment no. >>>>>>> >>>>>>> I ran the checks and this is what was returned. >>>>>>> >>>>>>> linux_vdso.so.1 => (0x00007fff4c6ae000) >>>>>>> libpython2.6.so.1.0 => /usr/lib64/libpython2.6.so.1.0 ( >>>>>>> 0x00007fb7830e0000) >>>>>>> libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb782ec30000) >>>>>>> libdl.so.2 => /lib64/libdl.so.2 (0x00007fb782cbe000) >>>>>>> libutil.so.1 => /lib64/libutil.so.1 (0x00007fb782abb000) >>>>>>> libm.so.6 => /lib64/libm.so.6 (0x00007fb782837000) >>>>>>> libc.so.6 => /lib64/libc.so.6 (0x00007fb782402000) >>>>>>> /lib64/ld-linux-x86-64.so.2 (0x000003ad6c00000) >>>>>>> >>>>>>> sys.version = '2.6.6 (r266:84292, Nov 21 2013, 10:50:32) \n[GCC >>>>>>> 4.4.7 21020313 (Red Hat 4.4.7-4)]' >>>>>>> sys.prefix = '/usr' >>>>>>> >>>>>>> >>>>>>> Justin >>>>>>> >>>>>>> On Tuesday, October 13, 2015 at 11:29:00 PM UTC-4, Graham Dumpleton >>>>>>> wrote: >>>>>>>> >>>>>>>> Are you using a Python virtual environment and are you installing >>>>>>>> Django into the Python virtual environment if you are, or is Django >>>>>>>> installed into system wide Python installation? >>>>>>>> >>>>>>>> Also, check what version of Python mod_wsgi is actually compiled >>>>>>>> for by running checks in: >>>>>>>> >>>>>>>> >>>>>>>> https://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Python_Shared_Library >>>>>>>> >>>>>>>> >>>>>>>> https://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Python_Installation_In_Use >>>>>>>> >>>>>>>> What do you get? >>>>>>>> >>>>>>>> Graham >>>>>>>> >>>>>>>> On 14 Oct 2015, at 12:59 pm, Justin Martin <[email protected]> >>>>>>>> wrote: >>>>>>>> >>>>>>>> I'm trying to get a stand alone server up and running and running >>>>>>>> into some difficulties. I'm receiving the error below. I'm also not too >>>>>>>> familiar with django and mod_wsgi in general so this might be a rookie >>>>>>>> mistake. >>>>>>>> >>>>>>>> I'm running RedHat 6.6, apache 2.2.15, django 1.6.1, python 2.6.6, >>>>>>>> mod_wsgi 3.2 >>>>>>>> >>>>>>>> mod_wsgi(pid=<PID>): Target WSGI script >>>>>>>> '/path/to/my/application/wsgi.py' cannot be loaded as Python module >>>>>>>> . >>>>>>>> mod_wsgi(pid=<PID>): Exception occurred process WSGI script >>>>>>>> 'path/to/my/application/wsgi.py'. >>>>>>>> Traceback (most recent call list): File /path/to/my/application/ >>>>>>>> wsgi.py, line 14 in <module> From django.core.wsgi import >>>>>>>> get_wsgi_application >>>>>>>> ImportError: no module name django.core.wsgi >>>>>>>> >>>>>>>> >>>>>>>> When I run it as python wsgi.py it doesn’t seem to have an issue. >>>>>>>> >>>>>>>> I will also put my .conf files below in case they are needed. I >>>>>>>> didn't edit the httpd.conf file but instead created a seperate conf >>>>>>>> file. >>>>>>>> >>>>>>>> /etc/httpd/conf.d/myapplication.conf >>>>>>>> Alias /static/ /path/to/myapplication >>>>>>>> >>>>>>>> <Directory /path/to/myapplication> >>>>>>>> Order deny,allow >>>>>>>> Allow from all >>>>>>>> </Directory> >>>>>>>> >>>>>>>> WSGIScriptAlias / /path/to/myapplication/wsgi.py >>>>>>>> WSGIPythonPath /path/to >>>>>>>> >>>>>>>> <Directory /path/to/myapplication> >>>>>>>> <Files wsgi.py> >>>>>>>> Order deny,allow >>>>>>>> Allow from all >>>>>>>> </Files> >>>>>>>> </Directory> >>>>>>>> >>>>>>>> /etc/httpd/conf.d/wsgi.conf >>>>>>>> <IfModule !wsgi_module> >>>>>>>> LoadModule wsgi_module modules/mod_wsgi.so >>>>>>>> </IfModule> >>>>>>>> >>>>>>>> The weird thing is it is up and running on a few other servers with >>>>>>>> the same layout but those work and this one doesn't. I've been trying >>>>>>>> to >>>>>>>> come up with ideas but I'm kind of stuck and it might come to do with >>>>>>>> my >>>>>>>> lack of knowledge of mod_wsgi and django. >>>>>>>> >>>>>>>> Thanks for any and all assistance. >>>>>>>> >>>>>>>> -- >>>>>>>> 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 http://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 http://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/ZnHn8AYnAbg/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 http://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 http://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/ZnHn8AYnAbg/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 http://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 http://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/ZnHn8AYnAbg/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 http://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 http://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 http://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/ZnHn8AYnAbg/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 http://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 http://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/ZnHn8AYnAbg/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 http://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/ZnHn8AYnAbg/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.
