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
>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
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
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
> 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
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
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
7 matches
Mail list logo