>cat /usr/ports/www/ocsigen/Makefile |grep -i version PORTVERSION= 1.1.0 >ocsigen -c test.conf -V [warnings.log] 2011-11-28 08:25:47 - Exception while creating IPv6 socket: Invalid argument in function bind () -- Dependencies of ocsigen_ext.redirectmod: ocsigen_ext.redirectmod -- Needed: /usr/local/lib/ocsigen/extensions/redirectmod.cmo Loading extension /usr/local/lib/ocsigen/extensions/redirectmod.cmo -- Dependencies of ocsigen_ext.cgimod: ocsigen_ext.cgimod -- Needed: /usr/local/lib/ocsigen/extensions/cgimod.cmo Loading extension /usr/local/lib/ocsigen/extensions/cgimod.cmo -- Dependencies of ocsigen_ext.staticmod: ocsigen_ext.staticmod -- Needed: /usr/local/lib/ocsigen/extensions/staticmod.cmo Loading extension /usr/local/lib/ocsigen/extensions/staticmod.cmo -- Dependencies of ocsigen_ext.ocsipersist-sqlite: sqlite3, ocsigen_ext.ocsipersist sqlite -- Needed: /usr/local/lib/ocaml/site-lib/sqlite3/sqlite3.cma, /usr/local/lib/ocsigen/ extensions/ocsipersist-sqlite.cma Loading extension /usr/local/lib/ocaml/site-lib/sqlite3/sqlite3.cma Loading extension /usr/local/lib/ocsigen/extensions/ocsipersist-sqlite.cma -- Dependencies of ocsigen_ext.eliom: num.core, num, cryptokit, ocsigen_ext.eliom -- Needed: /usr/local/lib/ocaml/nums.cma, /usr/local/lib/ocaml/site-lib/cryptokit cryptokit.cma, /usr/local/lib/ocsigen/extensions/eliom.cma Loading extension /usr/local/lib/ocaml/nums.cma Loading extension /usr/local/lib/ocaml/site-lib/cryptokit/cryptokit.cma Loading extension /usr/local/lib/ocsigen/extensions/eliom.cma [warnings.log] 2011-11-28 08:25:47 - While parsing config file, tag <host>: Assuming defaulthostname is "localhost" -- Dependencies of eliom_examples.miniwiki: eliom_examples.miniwiki -- Needed: /usr/local/lib/ocsigen/examples/miniwiki.cmo Loading /usr/local/lib/ocsigen/examples/miniwiki.cmo (will be reloaded every times) -- Dependencies of eliom_examples.tutoeliom: eliom_examples.tutoeliom -- Needed: /usr/local/lib/ocsigen/examples/tutoeliom.cmo Loading /usr/local/lib/ocsigen/examples/tutoeliom.cmo (will be reloaded every times) [warnings.log] 2011-11-28 08:25:47 - Reloading config file ... [warnings.log] 2011-11-28 08:25:47 - Config file reloaded [warnings.log] 2011-11-28 08:25:47 - Ocsigen has been launched (initialisations ok)
When visiting http: // localhost: 8000 / qachina / cgi-bin / nav.py using Opera:
GET /qachina/cgi-bin/nav.py HTTP/1.1 User-Agent: Opera/9.80 (X11; FreeBSD 8.2-RELEASE i386; U; zh-cn) Presto/2.9.168 Version/11.50 Host: localhost:8000 Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 Accept-Language: zh-CN,zh;q=0.9,en;q=0.8 Accept-Encoding: gzip, deflate Cache-Control: no-cache Connection: Keep-Alive - host=localhost [access.log] 2011-11-28 08:42:06 - connection for localhost from 127.0.0.1 (Opera/9.80 (X11; FreeBSD 8.2-RELEASE i386; U; zh-cn) Presto/2.9.168 Version/11.50): /qachina/cgi-bin/nav.py -------- host found! localhost:8000 matches * site "ocsigenstuff" does not match url "qachina/cgi-bin/nav.py". site "miniwiki" does not match url "qachina/cgi-bin/nav.py". -------- site found: url "qachina/cgi-bin/nav.py" matches "qachina". --Cgimod: Is it a cgi file? --Cgimod: Testing "/media/E/www/qachina/cgi-bin/nav.py". --Cgimod: Looking for "/media/E/www/qachina/cgi-bin/nav.py". ** Receiving HTTP message [warnings.log] 2011-11-28 08:42:06 - CGI says: env: python: No such file or directory Thread 10 killed on uncaught exception Invalid_argument("index out of bounds") [warnings.log] 2011-11-28 08:42:06 - CGI exited with code 127 ~~~ Exception during generation/sending: Ocsigen_http_com.Connection_closed
[warnings.log] 2011-11-28 08:42:06 - Exn during page generation: Ocsigen_http_com.Connection_closed (sending 500) -> Sending 500 ...
After changing #!/usr/bin/env python
to #!/usr/local/bin/python
for each python file now it works!
thanks!
source share