disconnect / apache-websocket

Apache WebSocket module
Apache License 2.0
196 stars 46 forks source link

Getting error :- Could not find initialization function in module #6

Closed kiransakhare closed 12 years ago

kiransakhare commented 12 years ago

Hello everyone

I am trying to build and run the example echo on windows. I followed the steps given and built the mod_websocket_echo.so and after updating configuration in apache config. And starting apache getting "Could not find initialization function in module". In httpd.conf i am getting this error in line WebSocketHandler libexec/apache2/mod_websocket_echo.so echo_init for mod_websocket.so ifmodule block.

Please help me in resolving this issue.

disconnect commented 12 years ago

Since you are running this under Windows, you need to follow the Windows-specific instructions for modifying the httpd.conf, not the Mac OS X instructions (also notice that use should use modules, not libexec/apache2. Please read the entire README carefully. Here is the excerpt that you should follow:

Under Windows, the initialization function is of the form _echo_init@0, as it is using the __stdcall calling convention:

LoadModule websocket_module   modules/mod_websocket.so
LoadModule websocket_draft76_module   modules/mod_websocket_draft76.so

<IfModule mod_websocket.c>
  <Location /echo>
    SetHandler websocket-handler
    WebSocketHandler modules/mod_websocket_echo.so _echo_init@0
  </Location>
</IfModule>

<IfModule mod_websocket_draft76.c>
  <Location /echo>
    SetHandler websocket-handler
    WebSocketHandler modules/mod_websocket_echo.so _echo_init@0
    SupportDraft75 On
  </Location>
</IfModule>

That includes support for draft-75 and draft-76. You can most likely drop the draft-75 support (remove the SupportDraft75 On line), but keep draft-76 until Safari finally upgrades.