Im trying to mount a fresh web2py in a hosting with mod_python, i dont have 
shell access, only ftp and htaccess editing.

Steps ive done:

   1. Unzip web2py in my hard drive and execute rocket server to create 
   deposit, logs folders and parameters_80.py (password and port 80)
   2. Delete all pyc files
   3. Uploaded web2py folder to "/httpdocs/wordpress/python/" (i have to 
   mount the application there because existing rewrite rules)
   4. Place modpythonhandler.py at web2py root folder
   5. Create .htaccess at web2py root:
   SetHandler python-program
   PythonHandler web2py_modpython
   SetEnv SCRIPT_URL '/python/web2py/welcome' 
   PythonDebug On
   
   
   6. Create another file web2py_modpython at web2py root:
   from mod_python import apache
   import modpythonhandler
   
   def handler(req):
       req.subprocess_env['PATH_INFO'] = req.subprocess_env['SCRIPT_URL']
       return modpythonhandler.handler(req)
   
I can access the handler at:
http://mydomain.com/python/web2py/

And this is the error log:

MOD_PYTHON ERROR

ProcessId:      30794
Interpreter:    'mydomain.com'

ServerName:     'mydomain.com'
DocumentRoot:   '/var/www/vhosts/mydomain.com/httpdocs/wordpress'

URI:            '/python/web2py/'
Location:       None
Directory:      
'/var/www/vhosts/mydomain.com/httpdocs/wordpress/python/web2py/'
Filename:       
'/var/www/vhosts/mydomain.com/httpdocs/wordpress/python/web2py/'
PathInfo:       ''

Phase:          'PythonHandler'
Handler:        'web2py_modpython'

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1537, 
in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1202, 
in _process_target
    module = import_module(module_name, path=path)

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 296, 
in import_module
    log, import_path)

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 680, 
in import_module
    execfile(file, module.__dict__)

  File 
"/var/www/vhosts/mydomain.com/httpdocs/wordpress/python/web2py/web2py_modpython.py"
, line 2, in <module>
    import modpythonhandler

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 991, 
in load_module
    return _global_modules_cache.import_module(self.__file)

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 680, 
in import_module
    execfile(file, module.__dict__)

  File 
"/var/www/vhosts/mydomain.com/httpdocs/wordpress/python/web2py/modpythonhandler.py"
, line 43, in <module>
    import gluon.main

  File 
"/var/www/vhosts/mydomain.com/httpdocs/wordpress/python/web2py/gluon/__init__.py"
, line 29, in <module>
    "You can also download a complete copy from http://www.web2py.com.";

RuntimeError: web2py depends on pydal, which apparently you have not 
installed.
Probably you cloned the repository using git without '--recursive'
To fix this, please run (from inside your web2py folder):

Ive downloaded the source files from web2py and it does work locally. I may 
have any misconfiguration on the htaccess but i dont know how to fix it.

Please some help.

Thanks.



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to