Hi all, I played with K7 <http://github.com/sebastien/k7/tree/master> and found it very promising. But I had several problems with getting FastCGI to work.
Here is how I compiled it: $ make mkdir build g++ -g -Ideps/v8/include -Isrc -Ideps -c src/main.cpp -o build/main.o g++ -g -Ideps/v8/include -Isrc -Ideps -c src/modules.cpp -o build/modules.o g++ -g -Ideps/v8/include -Isrc -Ideps -c lib/data/formats/json.cpp -o build/data/formats/json.o g++ -g -Ideps/v8/include -Isrc -Ideps -c lib/system/k7/modules.cpp -o build/system/k7/modules.o g++ -g -Ideps/v8/include -Isrc -Ideps -c lib/system/posix/posix.cpp -o build/system/posix/posix.o g++ -g -Ideps/v8/include -Isrc -Ideps -c lib/net/http/client/curl.cpp -o build/net/http/client/curl.o g++ -g -Ideps/v8/include -Isrc -Ideps -c lib/net/http/server/fcgi.cpp -o build/net/http/server/fcgi.o g++ -g -Ideps/v8/include -Isrc -Ideps -c lib/net/http/server/shttpd.cpp -o build/net/http/server/shttpd.o g++ -g -Ideps/v8/include -Isrc -Ideps build/main.o build/modules.o build/data/formats/json.o build/system/k7/modules.o build/system/posix/posix.o build/net/http/client/curl.o build/net/http/server/fcgi.o build/net/http/server/shttpd.o -o k7 deps/v8/libv8.a deps/shttpd/src/libshttpd.a -lpthread -ldl -lrt -lcurl -lfcgi As you can see, both curl and fcgi were compiled and linked in. But when ran the FastCGI example, I got: $ ./fcgi.sh Starting lighttpd on http://localhost:8888 2009-03-27 08:10:26: (configfile.c.805) source: /tmp/k7-fcgi.conf line: 20 pos: 29 parser failed somehow near here: ) That problematic line is: "bin-environment" => (), When I commented it out, I could go further but got: $ ./fcgi.sh Starting lighttpd on http://localhost:8888 2009-03-27 08:11:50: (mod_fastcgi.c.1330) --- fastcgi spawning local proc: /tmp/k7-2/k7 /tmp/k7-2/examples/fcgi.js port: 0 socket /tmp/k7-fastcgi.sock min-procs: 4 max-procs: 4 2009-03-27 08:11:50: (mod_fastcgi.c.1355) --- fastcgi spawning port: 0 socket /tmp/k7-fastcgi.sock current: 0 / 4 2009-03-27 08:11:50: (mod_fastcgi.c.1055) the fastcgi-backend /tmp/k7-2/k7 /tmp/k7-2/examples/fcgi.js failed to start: 2009-03-27 08:11:50: (mod_fastcgi.c.1059) child exited with status 1 /tmp/k7-2/k7 /tmp/k7-2/examples/fcgi.js 2009-03-27 08:11:50: (mod_fastcgi.c.1062) if you try do run PHP as FastCGI backend make sure you use the FastCGI enabled version. You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' in the output, NOT (cgi) NOR (cli) For more information check http://www.lighttpd.net/documentation/fastcgi.html#preparing-php-as-a-fastcgi-program 2009-03-27 08:11:50: (mod_fastcgi.c.1067) If this is PHP on Gentoo add fastcgi to the USE flags 2009-03-27 08:11:50: (mod_fastcgi.c.1363) [ERROR]: spawning fcgi failed. 2009-03-27 08:11:50: (server.c.848) Configuration of plugins failed. Going down. Then I tried k7 executable itself and found curl and fastcgi both missing: $ ./k7 ReferenceError: system is not defined ReferenceError: has is not defined K7/V8 version 1.1.3 > for (var p in net.http.server) print(p); shttpd > for (var p in net.http.client) print(p); > What did I do wrong? How to get curl and fastcgi loaded? Thanks! Jun --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
