[Modcplusplus-user] It works.
Brought to you by:
gr84b8,
johnksterling
From: <gra...@ax...> - 2005-03-31 08:48:42
|
Hi John, The installation of the latest version (1.5.1) was succesful. But still I have some questions. My cpp file looks like this: #include "apache_handler.h" class TestHandler : public ApacheHandler { public: TestHandler(void); ~TestHandler(void); int handler(ApacheRequestRec *pRequest); }; TestHandler::TestHandler(void) { ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL, "constructing a mod_cplusplus handler."); } TestHandler::~TestHandler(void) { ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL, "destroying a mod_cplusplus handler."); } int TestHandler::handler(ApacheRequestRec *pRequest) { ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL, "handling, handling, handling."); pRequest->rprintf("\nThis handler is called for user %s", pRequest->user()); pRequest->rputs("\nLets Dump The Request!\n"); pRequest->dump(); return OK; } ApacheHandler *instanciate_test() { return new TestHandler(); } cpp_factory_t test_handler = { instanciate_test, NULL, NULL, NULL, }; My httpd.conf contains these lines: LoadModule cplusplus_module /usr/local/apache2/modules/libmod_cplusplus.so and I defined the followings: LoadCPPHandler test_handler /usr/local/apache2/modules/test_handler.so Alias /cppt/ "/home/grafl/c_cpp/mod_apache2/mod_cpp_test/" <Directory "/home/grafl/c_cpp/mod_apache2/mod_cpp_test"> AllowOverride None Options Indexes FollowSymLinks Order allow,deny Allow from all AddHandler test_handler .axf </Directory> In this folder I have an index.axf file which contains only HTML mark-up. When I point my browser to http://host/cppt/index.axf it asks me to download or save the file. Second, none of the operations "ap_log_error" works. -- Graf László \\|// (O-O) --oOO--(_)--OOo--- --------------------------- 100% újrahasznosított bitek |