g-wan

Are there any low-level languages that can be used in place of scripts?

我与影子孤独终老i 提交于 2020-01-01 06:36:50
问题 I am a "high-level" scripting guy. All my code is Class-based PHP or JavaScript. However, I want to know if there is any form of useful interpreter projects for "low-level" compiled languages like C or C++ (strange sounding huh?). This all came about when I stumbled upon http://g-wan.com/ and was fascinated by the fact that you could setup C code to run as server scripts. However, that project is all but useless because it is run by one guy and is closed source. So, is there anything out

Does anyone has first-hand experience with G-WAN web Server?

雨燕双飞 提交于 2019-12-31 08:29:18
问题 The only place where I found informations on G-WAN web server was the project web site and it looked very much like advertisement. What I would really know is, for someone who is proficient with C, if it is as easy to use and extend that other architectures. For now I would mostly focus on scripting abilities. Are C scripts on GWAN easy to write ? Can you easily update and upload new C scripts to the server (say as easily than some PHP or Java pages on other architectures) ? Do you have to

Gwan stops working every night

北慕城南 提交于 2019-12-25 11:17:29
问题 I have a arch 64bit VPS on digitalocean. I installed gwan and run it in deamon mode. It stopped running every midnight. Here is the log file [Wed Apr 24 06:10:28 2013 GMT] memory footprint: 3.78 MiB [Thu, 25 Apr 2013 00:00:19 GMT] * child abort(8) coredump [Thu, 25 Apr 2013 00:00:19 GMT] * child abort(8) coredump [Thu, 25 Apr 2013 00:00:19 GMT] * child abort(8) coredump [Thu, 25 Apr 2013 00:00:19 GMT] * child died 3 times within 3 seconds [Thu Apr 25 12:39:39 2013 GMT] memory footprint: 3.77

Gwan stops working every night

社会主义新天地 提交于 2019-12-25 11:15:12
问题 I have a arch 64bit VPS on digitalocean. I installed gwan and run it in deamon mode. It stopped running every midnight. Here is the log file [Wed Apr 24 06:10:28 2013 GMT] memory footprint: 3.78 MiB [Thu, 25 Apr 2013 00:00:19 GMT] * child abort(8) coredump [Thu, 25 Apr 2013 00:00:19 GMT] * child abort(8) coredump [Thu, 25 Apr 2013 00:00:19 GMT] * child abort(8) coredump [Thu, 25 Apr 2013 00:00:19 GMT] * child died 3 times within 3 seconds [Thu Apr 25 12:39:39 2013 GMT] memory footprint: 3.77

How to use gwan with wordpress installation through php-fpm?

陌路散爱 提交于 2019-12-24 13:19:44
问题 Is there an easy way to use wordpress through php-fpm using gwan? Any use case, example of this to share? 回答1: As we never succeeded in making Zend PHP run in a thread-safe manner, there's no way we can advise, unless someone makes a Wordpress port for PH7 , which is both supported by G-WAN and thread-safe. As multicore systems are now the norm (even on embedded platforms), either Zend will finally publicly release a thread-safe PHP, or people will increasingly look for alternatives. Per the

GWAN : How to read cookies

依然范特西╮ 提交于 2019-12-24 12:22:15
问题 I'm trying to read cookies but the script below returns an empty string. http_t *http = (http_t*)get_env(argv, HTTP_HEADERS); xbuf_t *read_buf = (xbuf_t*)get_env(argv, READ_XBUF); char *p = read_buf->ptr; char *cookies = http->h_cookies ? p + http->h_cookies : 0; xbuf_xcat(reply, "<HR>COOKIES [%s]<br>", cookies); I have set a cookie previously using : http_header (which I can see in chrome's console) So how can I read cookies? Thank you for your answer. I'm using GWAN 4.11.20 回答1: v4.11 was

Managing the caching in G-WAN with KV store

こ雲淡風輕ζ 提交于 2019-12-24 10:22:14
问题 I am currently developing a web app in C using the G-Wan web server and I want to use the KV Store included with G-Wan in order to store the generated web page and a counter on the number of times the page has been displayed. The KV store is a hash map you can use to store complex data, like structures. That's what I have used to store the HTML data and an integer which is the counter: typedef struct { char* HTML; int nbDisplays; } my_data; The web server is using several threads and the KV

Gwan C#, how to get HTTP headers?

本秂侑毒 提交于 2019-12-23 19:04:56
问题 I need it for rewriting url, to know which friendly url I am processing. For User-Agent and other stuff. EDIT: public class Gwan { [MethodImplAttribute(MethodImplOptions.InternalCall)] extern public static long getEnv(string arg, int name); } Gwan.xbufCat(Gwan.getReply(args[0]), Gwan.getEnv(args[0], 3).ToString()); Unhandled Exception: System.MissingMethodException: Cannot find the requested method. at (wrapper managed-to-native) Gwan:getEnv (string,int) What am I doing wrong? I guess on your

X-Forwarded-For in Gwan

谁说胖子不能爱 提交于 2019-12-23 04:30:11
问题 I have read through the documentation (both API and Manual), and haven't seem to find any support by gwan for the X-Forwarded-For header. The only thing I have found that could be related was REMOTE_BIN_ADDR . I know to get a client IP you can use REMOTE_ADDR however my gwan servers are behind a HA Proxy load balancer, which forwards the client IP via X-Forwarded-For . Does Gwan not support this header? 回答1: As far as we know, while widely used, the X-Forwarded-For HTTP header is not part of

How to set http response header when php is used with g-wan

China☆狼群 提交于 2019-12-13 19:25:21
问题 I add the header function in the hello.php sample, as below: <?php header("xxxxx: yyyyy"); fwrite(STDOUT, "see headers.<br><br>Hello, PHP!<br>current working directory: ".getcwd()); exit(200); // return an HTTP code (200:'OK') ?> but there is no such header found in firebug. Who can explain how to add additional headers in php cli with gwan? 回答1: Thanks to Gil and Richard, Now, it is what i did according to your advices. PHP works in gwan with customized headers. <?php $output='See headers...