Update web2py manually

233 views
Skip to first unread message

Константин Комков

unread,
Feb 11, 2019, 3:39:22 AM2/11/19
to web2py-users
Hello!

Now I have last version of framework, but on my server It work not correct. The reason of uncorrect work is not full update, maybe uncorrect update. I have 6 projects and they are working. What I need to do in that case?

Nico Zanferrari

unread,
Feb 11, 2019, 3:49:30 AM2/11/19
to web...@googlegroups.com
Hi,

in order to be able to help you, we need informations: at least the Operating system, web2py & Python version used. And what exactly is not working, of course ;-)

Nico

Il giorno lun 11 feb 2019 alle ore 09:39 Константин Комков <firean...@gmail.com> ha scritto:
Hello!

Now I have last version of framework, but on my server It work not correct. The reason of uncorrect work is not full update, maybe uncorrect update. I have 6 projects and they are working. What I need to do in that case?

--
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+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

黄祥

unread,
Feb 11, 2019, 4:18:02 AM2/11/19
to web2py-users
the step are:
- backup your web2py apps from applications folders (copy or sync)
- update webp2y (either download and extract the package or using git fetch or pull)
- restore your web2py apps to applications folders (copy or sync)

the command line will match with your os environment
test it first on another environment (testing or staging before do it on production environment)

best regards,
stifan

Константин Комков

unread,
Feb 11, 2019, 5:47:34 AM2/11/19
to web...@googlegroups.com
Nico Zanferrari, I created that https://groups.google.com/forum/#!topic/web2py/6NZ7Ht-HXRQ item first becouse I didn't understand that problem in framework. It's windows IIS server, python 2.7.9, web2py 2.17.2.

Константин Комков

unread,
Feb 11, 2019, 5:57:16 AM2/11/19
to web2py-users
Stifan, can I delete all web2py files except folder with projects and paste new web2py files and what I need to do if something will not be removed?
I can not update web2py becouse its new last version. And that problem don't solved updating.
I have backup.

Константин Комков

unread,
Feb 11, 2019, 8:07:18 AM2/11/19
to web...@googlegroups.com
I delete all web2py files, which I can delete and nothing work. Then I tried to start web2py for run current projects but don't have succes. Backup saved me but I need to update web2py still.
Message has been deleted
Message has been deleted
Message has been deleted

Константин Комков

unread,
Feb 13, 2019, 6:07:44 AM2/13/19
to web2py-users
It's test app which work on my computer and don't work on server. On server ajax return welcome page 
ый.png
default.py
db.py
layout.html
index.html

Константин Комков

unread,
Feb 14, 2019, 3:34:29 AM2/14/19
to web2py-users
I have updated web2py alredy but that error remained. I can not start new project 2 week.

Dave S

unread,
Feb 14, 2019, 5:30:01 PM2/14/19
to web2py-users


On Thursday, February 14, 2019 at 12:34:29 AM UTC-8, Константин Комков wrote:
I have updated web2py alredy but that error remained. I can not start new project 2 week.


I think it would help for you to post part of your IIS logs showing the page load and the AJAX request (sanitize IPs, etc, of course).  You can also turn on logging in web2py, and include that logging information.  You probably want to put some logging into the controllers for your app.

Also, are you using routes.py or any other URL re-writing?

/dps
 

Константин Комков

unread,
Feb 15, 2019, 2:31:33 AM2/15/19
to web...@googlegroups.com
Dave, did you saw my project above? Is it return message or full welcome page on your computer? I saw iis logs and didn't find any helpful information. I use reutes.py in web2py folder and it contain that:
routers = dict(
    # base router
    BASE=dict(
default_function = 'index',
default_language = 'ru',
domains={
'oas.timacad.ru':'oas',
'www.oas.timacad.ru':'oas',
}
    ),
)
I have routes.example.py in ererer folder also and it contain. Ererer is project name without sense becouse it test.
from fileutils import abspath
from languages import read_possible_languages
possible_languages = read_possible_languages(abspath('applications', app))
#NOTE! app - is an application based router's parameter with name of an
#            application. E.g.'welcome'
routers = {
    app: dict(
        default_language = possible_languages['default'][0],
        languages = [lang for lang in possible_languages
                           if lang != 'default']
    )
 I included logging in web2py in progress.log that:
[2019-02-15 10:20:30] START
[2019-02-15 10:20:30] EDIT ererer/models/db.py: 3
But ajax return welcome page and I don't see it here.
I have reinstalled python, fdb driver, url rewrite, wfastcgi and error remained. Maybe something wrong in project, but it correct work on 2 my computers and don't work on server. 

Val K

unread,
Feb 15, 2019, 4:19:50 PM2/15/19
to web2py-users
progress.log  - is about development progress :)
Show your httpserver.log or IIS  log (something like access.log/error.log)

Константин Комков

unread,
Feb 18, 2019, 1:49:04 AM2/18/19
to web2py-users
Maybe it help. Last 3 rows contain my transition on "ererer" project then erererAjax is ajax function name on server and I don't know why I GET welcome. After I push one button I get http://192.168.XXX.XXX/ererer 303 0 0 5 and http://192.168.XXX.XXX/ererer 200 0 0 1068.
Moreover I see time is 06:17:36 but real windows time on that server 9:17:??.
#Software: Microsoft Internet Information Services 8.5
#Version: 1.0
#Date: 2019-02-18 06:17:36
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2019-02-18 06:17:36 192.168.XXX.XXX GET /admin - 80 - 192.168.XXX.XXX Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/72.0.3626.109+Safari/537.36 - 200 0 0 12060
2019-02-18 06:17:41 192.168.XXX.XXX POST /admin - 80 - 192.168.XXX.XXX Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/72.0.3626.109+Safari/537.36 http://192.168.XXX.XXX/admin 303 0 0 110
2019-02-18 06:17:41 192.168.XXX.XXX GET /admin/site - 80 - 192.168.XXX.XXX Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/72.0.3626.109+Safari/537.36 http://192.168.XXX.XXX/admin 200 0 0 962
2019-02-18 06:17:43 192.168.XXX.XXX POST /admin/check_version - 80 - 192.168.XXX.XXX Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/72.0.3626.109+Safari/537.36 http://192.168.XXX.XXX/admin/site 200 0 0 440
2019-02-18 06:17:48 192.168.XXX.XXX GET /ererer - 80 - 192.168.XXX.XXX Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/72.0.3626.109+Safari/537.36 http://192.168.XXX.XXX/admin/site 200 0 0 3205
2019-02-18 06:18:09 192.168.XXX.XXX POST /erererAjax - 80 - 192.168.XXX.XXX Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/72.0.3626.109+Safari/537.36 http://192.168.XXX.XXX/ererer 303 0 0 5
2019-02-18 06:18:10 192.168.XXX.XXX GET /welcome - 80 - 192.168.XXX.XXX Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/72.0.3626.109+Safari/537.36 http://192.168.XXX.XXX/ererer 200 0 0 1068

111.png

Val K

unread,
Feb 18, 2019, 5:12:06 AM2/18/19
to web2py-users
Just for the test open db.py and comment the line 'response.generic_patterns= ...' then try app on local machine

Константин Комков

unread,
Feb 18, 2019, 5:51:11 AM2/18/19
to web...@googlegroups.com
On local machine ajax work without 'response.generic_patterns= ...' but without 'response.generic_patterns= ...' don't work preloader but it is not important now, becouse I have tasted it on server too and I got welcome page already.
Also I tried:
response.generic_patterns = ['*'] if request.is_local else []
it don't work.
but now in current project link is https://oas.timacad.ru/name_Ajax without project name.

Константин Комков

unread,
Feb 20, 2019, 1:31:19 AM2/20/19
to web...@googlegroups.com
Maybe, somebody use iis with web2py and can test my project https://drive.google.com/drive/folders/17-iut--_OQTTrc2_ZsZrB6MZVCDROCb5?usp=sharing

Dave S

unread,
Feb 20, 2019, 2:18:54 AM2/20/19
to web2py-users


On Tuesday, February 19, 2019 at 10:31:19 PM UTC-8, Константин Комков wrote:
Maybe, somebody use iis with web2py and can test my project https://drive.google.com/drive/folders/17-iut--_OQTTrc2_ZsZrB6MZVCDROCb5?usp=sharing


I'm not an IIS user, although a couple of the familiar names are.  In addition to the book recommendations, and the current version of the install scripts that ship with web2py, the following bits from the forum archive might help:

<URL:https://groups.google.com/d/msg/web2py/OdOJ2loo_BI/6GztgJyHBAAJ>
<URL:https://groups.google.com/d/topic/web2py/eFtumWi8RMU/discussion>
<URL:https://groups.google.com/d/topic/web2py/ej-qwULC2R8/discussion>

Good luck!

/dps "Rocket at home, NginX at work"



Константин Комков

unread,
Feb 20, 2019, 6:41:31 AM2/20/19
to web...@googlegroups.com
Dave, thank you, that link https://docs.google.com/document/d/1uT2SS1xNMuWF38Dq2QZfe30LLnqELGeCYKgWsicz9zQ/edit# and that video https://www.youtube.com/watch?time_continue=1093&v=kXbfHtAvubc with instructions was very helpful.
DJANGO_SETTINGS_MODULE     FirstSite.settings
PYTHONPATH                                 C:\inetpub\wwwroot\FirsSite
WSGI_HANDLER                            django.core.handlers.wsgi.WSGIHandler()
What I need to write here if I use web2py. Men on video had writen that  ↑. Which folder should I select for copying wfastcgi.py my project name "ererer" or folder with all applications "applications"?

re.png

Константин Комков

unread,
Feb 21, 2019, 2:16:27 AM2/21/19
to web...@googlegroups.com
If I use web2py on windows server which version of web2py should I use "for windows" or "source cod"? Are there difference between wfastcgi.py and wfastcgi.pyc?

Константин Комков

unread,
Feb 21, 2019, 9:00:44 AM2/21/19
to web2py-users
Today I tryied to do somthing like in instruction in web2py book and another video and topics. In my way web2py work with version for windows and don't work with source code. My test project "ererer" don't work also. I think maybe somebody test it on server even if it is not IIS, becouse I don't know what to do. It is link for download https://drive.google.com/drive/folders/17-iut--_OQTTrc2_ZsZrB6MZVCDROCb5?usp=sharing

Константин Комков

unread,
Feb 22, 2019, 2:25:31 AM2/22/19
to web...@googlegroups.com
Web2py book in chapter 13 about IIS says that we need to install wfastcgi but link not actual and now we can install it in cmd - "pip install wfastcgi".
Default paths were changed also and now - "c:\Python27\python.exe|c:\Python27\lib\site-packages\wfastcgi.pyc".

All in all project don't work I do next steps in IIS Add web-site picture 1. Then I choose Handler Mappings for app picture 2. In Handler Mapping I see Python_via_FastCGI - picture 3. I don't create it. Maybe it do somebody before me. Then I add new module mapping picture 4.
And in the end "Do you want to create a FastCGI application for this executable? Click "Yes" to add the entry to the FastCGI collection and to enable this executable to run as a FastCGI application." I choose "No" like men on that video. After that project don't work too but I see web.config in folder hotline which contain:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
</configuration>
I changed it on web.config from examples and changed SCRIPT_PROCESSOR on that "c:\Python27\python.exe|c:\Python27\lib\site-packages\wfastcgi.pyc" After that in browser I see error picture 5.
1.png
2.png
3.png
4.png
5.png

Константин Комков

unread,
Feb 22, 2019, 7:19:06 AM2/22/19
to web...@googlegroups.com
I renamed my new project to old project name which worked, and new project work. It means that there is sometging in iis settings, but I can't find that.

Константин Комков

unread,
Jun 10, 2019, 8:12:09 AM6/10/19
to web...@googlegroups.com
Hello! Today I can start all my apps with Windows Server 2019 Microsoft-IIS/10.0, Python 3.7.3 and fdb driver. I use that web.config:
<?xml version="1.0" encoding="UTF-8"?>
<!-- app configuration for web2py on IIS -->
<configuration>
  <appSettings>
    <add key="WSGI_HANDLER" value="gluon.main.wsgibase" />
    <add key="WSGI_RESTART_FILE_REGEX" value=".*((routes\.py)|(\.config))$" />
  </appSettings>
  <system.webServer>
    <rewrite>
      <rules>
        <clear />
        <rule name="static" enabled="true" stopProcessing="true">
          <match url="^(\w+)/static(?:/_[\d]+\.[\d]+\.[\d]+)?/(.*)$" />
          <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
          <action type="Rewrite" url="applications/{R:1}/static/{R:2}" logRewrittenUrl="false" />
        </rule>
        <rule name="web2py_app" enabled="true" stopProcessing="true">
          <match url="(.*)" ignoreCase="false" />
          <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
          <action type="Rewrite" url="handler.web2py/{R:1}" appendQueryString="true" />
        </rule>
      </rules>
      <outboundRules>
        <rule name="static_version_cache_control" preCondition="static_version">
          <match serverVariable="RESPONSE_Cache-Control" pattern=".*" />
          <action type="Rewrite" value="max-age=315360000" />
          <conditions>
          </conditions>
        </rule>
        <rule name="static_version_Expires" preCondition="static_version">
          <match serverVariable="RESPONSE_Expires" pattern=".*" />
          <action type="Rewrite" value="Thu, 31 Dec 2037 23:59:59 GMT" />
        </rule>
        <preConditions>
          <preCondition name="static_version">
            <add input="{REQUEST_URI}" pattern="(\w+)/static(?:/_[\d]+\.[\d]+\.[\d]+)?/(.*)$" />
          </preCondition>
        </preConditions>
      </outboundRules>
    </rewrite>
  </system.webServer>
</configuration>


Reply all
Reply to author
Forward
0 new messages