g-wan

gwan redirection after create cookie

本秂侑毒 提交于 2019-12-13 18:16:09
问题 For my form validation page, I'd like to create a cookie and be redirected to another page but that doesn't work. Redirection prevents the creation of cookie. Do you have any solution ? 回答1: One way of doing it is on the landing page add a flag (Query Parameter) in there to tell it to create cookie. http://domain/page?create_cookie=true if create_cookie exist the landing page will create the cookie. 回答2: A way to proceed is to create the cookie from a G-WAN handler, bypassing the servlet or

Running Web2Py on G-WAN (generally Python's framework on G-WAN)

跟風遠走 提交于 2019-12-13 17:28:58
问题 Yesterday I have found information about G-WAN server. I have searched many websites but I couldn't discover how to run frameworks like Web2Py which is more complex then simple hello.py file. Is there an easy way to do this? Maybe uWSGI support? 回答1: G-WAN supports the CGI interface , so the CGI environment variables are already there. Usually, Web frameworks are built over this layer. If uWSGI provides more environment variables that are needed for your project then please drop us a line at

GWAN is modifying jquery.min.js to error

这一生的挚爱 提交于 2019-12-13 14:29:35
问题 I am doing an experimental HTML template wich comes with jquery.min.js file - one of the most popular javascript libraries. When I load the template from my local hard drive it works fine. When I upload it and load it from server (GWAN) I get error (I think is not the only one) in Chrome looks like this: Uncaught SyntaxError: Unexpected token { jquery.min.js:3 I inspected a bit and realized there is a function $ which was turned into function$ by GWan. The space removed is causing an error in

Which Linux kernels and Linux distros are supported by G-WAN?

喜你入骨 提交于 2019-12-12 04:44:52
问题 I can find a statement at the beginning of the user's manual: version 3 for Linux (tested with Debian and CentOS 32-bit and 64-bit) I am using Ubuntu 12.10 64-bit for development. So far, I found no problem with it, but I still have no confidence on it, since there is no official announcement from gwan about this. 回答1: At least G-WAN v3.3 should be compatible with the Linux distributions used when the development started in 2009 (Ubuntu 8+). G-WAN v3.10+ added significant enhancements

G-WAN and persistent MySQL connexion

混江龙づ霸主 提交于 2019-12-12 02:59:56
问题 me again with a little question about G-WAN and MySQL. This script below works fine ... My only problem is when MySQL went down. G-WAN script crash and G-WAN as well. What is the nest way to keep a persistent MySQL connexion and handle MySQL downtime? typedef struct { MYSQL *conn; } data_t; int main(int argc, char *argv[]) { u64 start = getus(); data_t **data = (data_t**)get_env(argv, US_SERVER_DATA); xbuf_t *reply = get_reply(argv); if(!data[0]) // first time: persistent pointer is

G-WAN URL rewrite for home page not working

坚强是说给别人听的谎言 提交于 2019-12-12 01:23:46
问题 I am trying to do a URL rewrite for the site home page. Here is a simplified version of my handler. int init(int argc, char *argv[]) { u32 *states = (u32*)get_env(argv, US_HANDLER_STATES); *states = (1 << HDL_AFTER_READ); return 0; } int main(int argc, char *argv[]) { xbuf_t *read_xbuf = (xbuf_t*)get_env(argv, READ_XBUF); xbuf_replfrto(read_xbuf, read_xbuf->ptr, read_xbuf->ptr + 16, " / ", " /?home "); return 255; } void clean(int argc, char *argv[]) {} Basically it is just replacing " / "

gwan not re-compiling java files

て烟熏妆下的殇ゞ 提交于 2019-12-11 04:07:12
问题 I tested against the standard hello.java and hello.c that comes with the gwan server running on Ubuntu 12.04 server. G-WAN 4.3.1 64-bit (Mar 1 2013 17:36:39) Once I run gwan with sudo ./gwan -d I also noticed the same behavior running without the daemon option. Then browse to 192.168.0.2:8080/?hello.c I get the expected output of "Hello, ANSI C!". I change the text in hello.c and refresh the browser and get the expected changes. If I do the same thing with the hello.java file, changes to the

How to configure G-WAN to use php-fpm?

非 Y 不嫁゛ 提交于 2019-12-10 23:19:39
问题 As title said, how to configure G-WAN to use php-fpm? Currently using lighttpd with php-fpm. Heard G-WAN maybe even lighter, want to give it a try. But after downloading the package and have it running, doesn't seems to be able to find any doc about php-fpm setup. 回答1: To have G-WAN support FastCGI you would have to write a G-WAN handler . We did not do that because FastCGI is a much slower interface than the language runtime loaded in the G-WAN process address space . G-WAN currently

G-WAN, output headers from CGI script

孤街浪徒 提交于 2019-12-10 17:17:48
问题 I'm trying to set an HTTP header like Content-Type over a CGI script. In PHP : header('Content-Type: text/plain'); // or echo 'Content-Type: text/plain', "\r\n\r\n"; // as first line or in Go : fmt.Print("Content-Type: text/plain\r\n\r\n") // as first line Both have no effect on the output. How can this be done? EDIT I also tried the following in Go , using the CGI package: package main import "fmt" import "os" import "net/http/cgi" func main() { r,e := cgi.Request() if e != nil { fmt.Println

Bug G-WAN and Amazon EC2 [closed]

久未见 提交于 2019-12-08 14:14:11
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I thought my mistake was Problems to start G-WAN but today, I made more testst and my real problem is this: When I launch an instance with type micro, G-WAN works fine but if i launch the same instance with type small, medium, etc... G-WAN explote!!! It shows me the errors of the before post. This is a posible