i had a go at porting mod_neko to apache2. it basically works, although there 
are some issues left. the cvs diff is attached.

Cool !

issues remaining:
  * make it so the same source file can be used for apache1 and 2.

Yes, for that we need to check in the httpd.h, there must be some version definition in the header, and depending on it we can use #ifdef/#else to compile for either 1.3 or 2.0

  * putenv("MOD_NEKO=1") crashes my apache2. so we need to find another way to 
signal the cgi module that it's running in apache.

That's very strange. putenv is a pretty much standard C function. I don't see how it could crash your apache. If you try something else, like putenv("SOMETHINGELSE=1"); does it crash too ? That might be a problem related to linking, for example apache2 having a "putenv" method that is called instead of the libc one.

  * context.h doesnt exist with apache2, but it doesnt seem to be neccessary.

context.h is part of Neko sources, and is also used in mod_neko.
This is a small API that is saving a per-thread variable. It's right now only implemented on Windows, the Linux implementation is "empty" and shoud be completed in order to make Mod_neko2.0 work. In fact, this is needed to be able to be able to run multiple NekoVM at the same time. There is no such problem in Apache 1.3/Linux because it's singlethread/multiprocess but Apache 2.0 is multithread.

  * send_headers is not yet implemented, i haven't figured how its done in 
apache2

Maybe headers are sent automatically when some data is printed. It means then that you don't need it, although you should continue to manage the headers_sent flag.

  * i had to disable cgi_get_cache to make the cgi module load without apache.

With "context.h" it should work.
Being able to cache the bytecode as explained here (http://nekovm.org/doc/mod_neko#script_versus_application) is an important feature for mod_neko.

Don't hesitate to ask if you have more questions. When everything is working correctly I will apply the patch to Mod_neko sources.

Nicolas


--
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to