Re: [web2py] Re: Running PHP on top of Web2Py

2011-01-09 Thread pbreit
I'm late to the party here but my sense is that you'll be best off just moving everything over. You mentioned that it's a content site with not a lot of traffic any a moderate amount of content. Sounds to me like you would have a relatively easy time moving it over than trying to cobble together

Re: [web2py] Re: Running PHP on top of Web2Py

2011-01-08 Thread John-Kim Murphy
>From your original message, I was assuming you did not wish to run a PHP server at all. If running a PHP server is allowed, it is possible to run Web2Py and PHP side-by-side, in parallel: - http://web2py.relevantmatter.com/welcome/ - http://web2py.relevantmatter.com/presite/phpinfo.php3

Re: [web2py] Re: Running PHP on top of Web2Py

2011-01-08 Thread Jonathan Lundell
On Jan 8, 2011, at 5:43 AM, jeff wrote: > > And I have obviously to write some lines in routes.py like (the proxy > action is in the w.py controller of the poc app): > > (r'.*:http://.*:.* /(?P(?:admin/|poc/).*)', > r'/\g'), > (r'.*:http://.*:.* /(?P.*)', > r'/poc/w/proxy/vars=\g'), # I think tha

[web2py] Re: Running PHP on top of Web2Py

2011-01-08 Thread jeff
I had another idea which is a simplification on my first one : an action acting like a proxy on the php server. I just wrote a little POC that seems to work. Here are the few lines to put in a controller: import urllib def make_get_stuff(an_url): def get_stuff(): stuff=urllib.urlopen

[web2py] Re: Running PHP on top of Web2Py

2010-12-30 Thread mdipierro
> My main concerns about this way are: > - the complexity of having runphp working there is no complexity but it is rally slow. > - the work on the templates : I guess that I have to put the php > templates in the view folder but I don't see exactly what else I have > to do on them Or move

[web2py] Re: Running PHP on top of Web2Py

2010-12-30 Thread jeff
This is very interesting and could make me save (or waste) a lot of time : I have to move a website from PHP to web2py. The website is small and not really dynamic : the content is in tables and so but the site will be extended (in web2py) and can be see as a static website (but with ugly urls w

[web2py] Re: Running PHP on top of Web2Py

2010-12-29 Thread mdipierro
All you need is this this (except for windows) in a model (php.py?): from subprocess import Popen, PIPE import sys, os, threading def runphp(source): PHP_BIN = '/usr/bin/php' PHP_ARGS = ['-q'] PHP_IN_SHELL = True php = Popen([PHP_BIN,] + PHP_ARGS, shell=PHP_IN_S