After too much frustration, I made a simple script for installation on dreamhost, or likely most places (see below). It does not allow the admin because it is not local (still figuring out how to change that one--any ideas would be welcome).
run by cd ~ python web2py.install.py The code is below. If anyone can build on this to allow access to the admin window it would be most appreciated! --Peter code for web2py.install.py -------------------------- subdomain="yourDomaiNname.com" ## <--CHANGE THIS user="yourUserID" ## <-- CHANGE THIs # should be something like web2py.mydomain.com where you have set up the web2py subdomain from the # dreamhost control pannel allowing rails (note: have to add public to the directory to make this happen). # # note that it takes a few minutes for dreamhost to create the domain.. # import os # if the file os.system("cd ~/") os.system("mkdir bin") #if bin already exists, it won't over write found=0 bash=[] try: bash=open(".bash").read().split("\n") for line in bash: if line=="PATH=$HOME/bin:$PATH": found=1 except: print "No .bash file found, creating one..." found=0 if found==0: #add it print "Modifying .bash profile.." f=open(".bash","w") bash.append("PATH=$HOME/bin:$PATH") f.write("\n".join(bash)) f.close() else: print ".bash profile already modified..." os.system("source .bash_profile") os.system("curl http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.3.3.tar.gz > ve.tar.gz") os.system("tar xzf ve.tar.gz") os.system("python2.5 virtualenv-1.3.3/virtualenv.py $HOME") # installs a local version of python2.5 # now you should have a folder bin/python2.5 that runs. os.system("rm -fr virtualenv-1.3.3") #cleanup os.system("rm ve.tar.gz") # cleanup # get a fresh copy of web2py os.system("curl http://www.web2py.com/examples/static/web2py_src.zip > w2p.zip") os.system("unzip w2p.zip") os.system("mv web2py/* "+subdomain+"/") os.system("rm w2p.zip") os.system("rm -r web2py") #os.system("cd "+subdomain) os.system("ln -s ~/"+subdomain+"/wsgihandler.py ~/"+subdomain+"/ passenger_wsgi.py") ws=open(subdomain+"/wsgihandler.py").read().split("\n") found=0 for line in ws: if line=='INTERP = "/home/'+user+'/bin/python2.5"': found=1 if found==1: print "wsgihandler.py already modified" else: for l in range(len(ws)): if ws[l]=='import os': ws[l]='import os\nINTERP = "/home/'+user+'/bin/python2.5"\nif sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)' f=open(subdomain+"/wsgihandler.py","w") f.write("\n".join(ws)) f.close() os.system("python2.5 "+subdomain+"/web2py.py") -------------------------- On Aug 23, 6:58 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > It works with 2.6. The issue is that the cgi module of 2.6 behaves > differently than the cgi module in 2.5. In particular is the same > variable appears in both GET and POST vars, 2.5 ignores the former and > returns a string, 2.6 assumes a multiple submission and returns a > list. This incompatibility is not something we can build a way around > because it is a fundamental one. > > If your app never mixes GET and POST vars than you have no problems. > If it does we have to make a choice and choose to support 2.5. > > Massimo > > On Aug 23, 1:54 am, Alexei Vinidiktov <alexei.vinidik...@gmail.com> > wrote: > > > > > What about 2.6. I read some time ago that web2py had issues with this > > version. Have they been resolved? > > > On Sat, Aug 22, 2009 at 12:46 AM, mdipierro<mdipie...@cs.depaul.edu> wrote: > > > > web2y should work with 2.4. Some apps that use specific 2.5 syntax may > > > need tweaking. > > > > On Aug 21, 3:53 am, Alexei Vinidiktov <alexei.vinidik...@gmail.com> > > > wrote: > > >> I've checked and unfortunately on mydreamhostserver they have Python > > >> 2.4, so no luck with the stock install of Python. I'll have to > > >> continue with the custom version. If only I could figure out how to > > >> compile the custom version of Python with ssl support... > > > >> On Thu, Aug 20, 2009 at 10:57 PM, mr.freeze<nat...@freezable.com> wrote: > > > >> > It works for me using smtp.gmail.com:587. Also, I have the web2py > > >> > examples running athttp://safeasmilk.com/examples/default/indexif > > >> > you want to take a look. > > > >> > On Aug 20, 9:32 am, Alexei Vinidiktov <alexei.vinidik...@gmail.com> > > >> > wrote: > > >> >> Does the Mail module work fine? > > > >> >> I also have a working web2py installation onDreamhost, but I'm using > > >> >> a custom Python install and I have problems with the Mail module, > > >> >> namely with the ssl used by smtp. > > > >> >> On Thu, Aug 20, 2009 at 11:37 AM, mr.freeze<nat...@freezable.com> > > >> >> wrote: > > > >> >> > All of the solutions looked a bit hackish to me so I chose the > > >> >> > easiest > > >> >> > one :) By the way, I'm running it off ofDreamhost'spython2.5 binary, > > >> >> > not a custom install. I haven't run into any problems yet. > > > >> >> > On Aug 19, 10:29 pm, Jason Brower <encomp...@gmail.com> wrote: > > >> >> >> I will be setting up another account soon. Perhaps I can try > > >> >> >> it... it > > >> >> >> looks like quite the hack to me. > > > >> >> >> On Wed, 2009-08-19 at 20:12 -0700, mr.freeze wrote: > > >> >> >> > Have you considered Passenger WSGI? I am using it on myDreamhost > > >> >> >> > account and it seems fast/stable. The setup took about 2 minutes > > >> >> >> > (seriously). > > >> >> >> > I can put together a step by step if you're interested (for free > > >> >> >> > :) > > > >> >> >> > On Aug 19, 12:11 pm, Jason Brower <encomp...@gmail.com> wrote: > > >> >> >> > > I almost have this settup working on adreamhostserver. > > >> >> >> > > Here is the tutorial I am > > >> >> >> > > following...http://wiki.dreamhost.com/Web2py > > >> >> >> > > Everything seems to work ok... Except when I try to go to the > > >> >> >> > > directory > > >> >> >> > > I get this in my > > >> >> >> > > browser...http://www.trimaxsafety.com.tw/web2py/ > > >> >> >> > > This is not the ussual 404 error. > > >> >> >> > > Here is my setup.... > > >> >> >> > > [redwings]$ python -V > > >> >> >> > > Python 2.5 > > >> >> >> > > [redwings]$ pwd > > >> >> >> > > /home/interestid/trimaxsafety.com.tw/web2py > > >> >> >> > > [redwings]$ ls -l > > >> >> >> > > total 2676 > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 225 2009-02-07 15:23 > > >> >> >> > > ABOUT > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 6006 2009-02-07 15:23 > > >> >> >> > > LICENSE > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 5040 2009-08-17 22:07 > > >> >> >> > > Makefile > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 15964 2009-08-11 04:56 > > >> >> >> > > README > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 37 2009-08-17 22:07 > > >> >> >> > > VERSION > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 0 2009-07-17 19:33 > > >> >> >> > > __init__.py > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 392896 2009-08-17 22:08 > > >> >> >> > > admin.w2p > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 601 2009-05-21 21:58 > > >> >> >> > > app.yaml > > >> >> >> > > drwxrwxr-x 5 interestid pg2250868 4096 2009-08-19 08:27 > > >> >> >> > > applications > > >> >> >> > > -rwxr-xr-x 1 interestid pg2250868 334 2009-05-15 09:45 > > >> >> >> > > cgihandler.py > > >> >> >> > > drwxrwxr-x 2 interestid pg2250868 4096 2009-08-19 08:27 > > >> >> >> > > deposit > > >> >> >> > > -rwxrwxr-x 1 interestid pg2250868 226 2009-08-19 08:08 > > >> >> >> > > dispatch.fcgi > > >> >> >> > > -rwxr-xr-x 1 interestid pg2250868 4753 2009-07-12 14:02 > > >> >> >> > > epydoc.conf > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 20993 2009-07-12 14:01 > > >> >> >> > > epydoc.css > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 2115361 2009-08-17 22:08 > > >> >> >> > > examples.w2p > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 1242 2009-05-15 09:45 > > >> >> >> > > fcgihandler.py > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 1606 2009-07-17 19:33 > > >> >> >> > > gaehandler.py > > >> >> >> > > drwxrwxr-x 3 interestid pg2250868 4096 2009-08-19 08:27 > > >> >> >> > > gluon > > >> >> >> > > -rw-rw-r-- 1 interestid pg2250868 5 2009-08-19 08:27 > > >> >> >> > > httpserver.pid > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 5878 2009-07-17 19:33 > > >> >> >> > > modpythonhandler.py > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 490 2009-02-11 13:36 > > >> >> >> > > options_std.py > > >> >> >> > > -rw-rw-r-- 1 interestid pg2250868 14 2009-08-19 08:27 > > >> >> >> > > parameters_8000.py > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 2181 2009-07-27 18:35 > > >> >> >> > > routes.example.py > > >> >> >> > > drwxrwxr-x 2 interestid pg2250868 4096 2009-08-19 08:24 > > >> >> >> > > scripts > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 606 2009-05-17 08:34 > > >> >> >> > > setup_app.py > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 653 2009-07-17 19:33 > > >> >> >> > > setup_exe.py > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 379 2009-05-17 08:34 > > >> >> >> > > web2py.py > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 63072 2009-08-17 22:08 > > >> >> >> > > welcome.w2p > > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 614 2009-07-17 19:33 > > >> >> >> > > wsgihandler.py > > >> >> >> > > [redwings]$ less dispatch.fcgi > > >> >> >> > > [redwings]$ cat dispatch.fcgi > > >> >> >> > > #!/home/youruserhere/run/bin/python > > >> >> >> > > import sys > > >> >> >> > > from flup.server.fcgi_fork import WSGIServer > > >> >> >> > > import gluon.main > > >> >> >> > > application=gluon.main.wsgibase > > >> >> >> > > ## or > > >> >> >> > > # application=gluon.main.wsgibase_with_logging > > >> >> >> > > WSGIServer(application).run() > > > >> >> >> > > [redwings]$ cat .htaccess > > >> >> >> > > RewriteEngine On > > >> >> >> > > RewriteBase / > > >> >> >> > > RewriteRule ^dispatch\.fcgi/ - [L] > > >> >> >> > > RewriteRule ^(.*)$ dispatch.fcgi/$1 [L] > > > >> >> >> > > [redwings]$ > > >> >> >> > > --- > > >> >> >> > > And for those of you that can automate thisdreamhostweb2py > > >> >> >> > > setup with > > >> >> >> > > a script... I would give them 50$ with paypal. That or buy > > >> >> >> > > them > > >> >> >> > > something online, or take them to dinner. (If they are in > > >> >> >> > > finland.) > > >> >> >> > > Best Regards, > > >> >> >> > > Jason Brower- Hide quoted text - > > > >> >> >> - Show quoted text - > > > >> >> -- > > >> >> Alexei Vinidiktov- Hide quoted text - > > > >> >> - Show quoted text - > > > >> -- > > >> Alexei Vinidiktov > > > -- > > Alexei Vinidiktov --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---