Yo -
I never actually released a mod_cplusplus for apache 2.0.40 - there=20
were api changes that I kept up with, but i did not re-release. Either=20=
try from cvs, or wait - and I will put up a new version compatibly with=20=
2.0.40
thanks -
John
On Monday, August 26, 2002, at 12:31 PM, Pachi Sucunza wrote:
>
> Hi John,
>
> Thanks for your fast reply!
>
>> I'm CC-ing the mod_cplusplus users list (we can take it off=20
>> users@httpd
>> if you like). I can help out later today on this, in the mean time=20
>> can you
>> send me the version of apache and mod_cplusplus you are using (from=20=
>> cvs?).
>
> Ok. I sent the mail to the httpd list because I saw little activity on
> the mod_cplusplus, sorry... But now modcpluspus-users seems more
> appropriate (and I subscribed).
>
> I'm using apache 2.0.40, the latest available version (I think so) =
from
> www.apache.org. mod_cplusplus is version 1.0.2 ("Apache2_GA4"), from
> your page at SourceForge. There are more details about my system in =
the
> first message below.
>
> Now that you have been so kind to answer, I'll send you more specific
> information about my efforts, hope I don't bore you :)
>
> This are the lines I added to httpd.conf to test my module and your
> samples:
>
> ---begin
>
> LoadModule cplusplus_module modules/libmod_cplusplus.so
>
> LoadCPPHandler hello_world modules/libmod_HelloWorld.so
> LoadCPPHandler test_handler modules/libtest_handler.so
> LoadCPPHandler test_input_filter modules/libtest_input.so
>
> <Location /hello-world>
> SetHandler hello-world
> AddCPPHandler hello_world
> </Location>
>
> <Location /test-handler>
> SetHandler test-handler
> AddCPPHandler test_handler
> </Location>
>
> AddCPPConnectionInputFilter test_input_filter
> <Location /test-input>
> SetHandler cpp-handler
> AddCPPHandler test_input_filter
> </Location>
>
> ---end
>
> I think they are correct (?), as I said, because everything works with
> "-X". I tried only some of them, as I explained (only one c++ module =
at
> a time), and the result is the same. Loading only mod_cplusplus.so=20
> works
> fine, but I can't do any AddCPPHandler.
>
> My module is VERY simple:
>
> ---begin
>
> #include "apache_handler.h"
> class mod_HelloWorld : public ApacheHandler
> {
> public:
> mod_HelloWorld( void );
> ~mod_HelloWorld( void );
> int handler( ApacheRequestRec *pRequest );
> };
>
> extern "C" cpp_factory_t hello_world;
>
> mod_HelloWorld::mod_HelloWorld() : ApacheHandler()
> {
> fprintf(stderr, "foo\n"); // or whatever...
> }
>
> mod_HelloWorld::~mod_HelloWorld()
> {
> fprintf(stderr, "bar\n");
> }
>
> int mod_HelloWorld::handler( ApacheRequestRec *pRequest )
> {
> pRequest->content_type( "text/html" );
> pRequest->rputs( "<HTML>\n" );
> pRequest->rputs( "<TITLE>M=F3dulo Hello World</TITLE>\n" );
> pRequest->rputs( "<H1>HELLO WORLD</H1>\n" );
> pRequest->rputs("</BODY></HTML>\n");
> return OK;
> }
>
> ApacheHandler* instanciate_HelloWorld()
> {
> return new mod_HelloWorld();
> }
>
> cpp_factory_t hello_world =3D {
> instanciate_HelloWorld,
> NULL,
> NULL,
> NULL,
> };
>
>
> --end
>
> I compiled it by hand (-fPIC, -shared to gcc...) and by modifying the
> Makefiles in your samples. In both ways the result was the same :(
> Everything works and I can see the "Hello World" with -X, as I said.
>
> Any hint? Thank you very much again for your help.
>
>
> Pachi.
>
> PS: It's late now here, so I'm afraid I won't be able to respond very
> quickly if you need any other information... I'll check mail early
> tomorrow.
>
>
>>> -- Original Message --
>>> Subject: httpd crash at startup with custom c++ (mod_cplusplus)=20
>>> module
>>> From: Pachi Sucunza <pa...@sc...>
>>> To: us...@ht..., jo...@st...
>>> Date: 26 Aug 2002 16:45:38 +0200
>>>
>>>
>>> Hi everyone
>>>
>>> I have written an Apache module in C++ (using mod_cplusplus...
>>> http://modcplusplus.sourceforge.net/ )
>>> The problem is that I can't get any C++ module working, the httpd=20
>>> process
>>> dies right after initialization, without any complaint or message=20
>>> (in stdout
>>> or any of the log files).
>>>
>>> I'll try to explain more thoroughly the situation:
>>> - I'm running Linux - Debian 2.2 (potato), kernel 2.2.19-smp on a=20
>>> 2x1GHz
>>> Intel Pentium III. I use Apache 2.0.40. mod_cplusplus is the latest=20=
>>> version
>>> (1.0.2).
>>> My compiler is gcc 2.95.2 (the one packaged by Debian).
>>> - I configured and compiled Apache, and mod_cplusplus, without=20
>>> problems.
>>> - I changed httpd.conf accordingly, to load mod_cplusplus and my=20
>>> module
>>> (as in the mod_cplusplus sample configuration files), copied =
modules
>> in
>>> the
>>> "modules" directory, etc.
>>> - When I launch httpd, the mod_cplusplus initialization is done, and=20=
>>> then
>>> the one
>>> in my custom module. After this (FIRST initializations), the server=20=
>>> dies
>>> without
>>> any message.
>>> - If I just load mod_cplusplus module, but none of the C++ modules,=20=
>>> the
>> server
>>> doesn't die (but it's not very useful... :)
>>> - If I launch apache with the "-X" option (single-process mode),=20
>>> EVERYTHING
>>> works
>>> PERFECTLY: mod_cplusplus, mod_cplusplus samples, and my module.=20
>>> That's
>>> why I think
>>> that the setup (httpd.conf) is right, and that my compilation and=20=
>>> linking
>>> seem
>>> correct, too.. (?)
>>> With that switch, mod_cplusplus' and my module's initialization are=20=
>>> called
>>> the second
>>> time, and everything starts working OK.
>>> - I've tried different settings to compile Apache=20
>>> (--enable-rule=3DSHARED_CORE,
>>> --enable-module=3Dmost --enable-mods-shared=3Dmost, different =
MPM's...),
>> all
>>> of them with the same results.
>>> - I've tried all of this in a non-SMP machine, also with the same=20
>>> results.
>>> - I've reduced my module to a minimum, just a few "pRequest->rputs(=20=
>>> ...
>> );",
>>> content-type, etc.. in the "handler()" method. So I think it cant't=20=
>>> be
>>> (for the
>>> moment :) a bug in my code.
>>> - With the mod_cplusplus sample modules, the result are always the=20=
>>> same
>> as
>>> with my
>>> little module.
>>>
>>> Any hints? Anyone had any similar problem, even if not using=20
>>> mod_cplusplus?
>>> Could it be a compiling/linking problem? Or with libraries?
>>>
>>> Any help would be *HIGHLY* appreciated, as I don't know what else=20
>>> can I
>> try...
>>>
>>> Best regards,
>>>
>>> Pachi.
>>>
>>>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone? Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=3Dsourceforge1&refcode1=3Dvs3390
> _______________________________________________
> Modcplusplus-user mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modcplusplus-user
>
|