cvs commit: modperl-2.0/src/modules/perl modperl_perl.c modperl_perl.h
dougm 2002/08/26 18:46:27 Modified:src/modules/perl modperl_perl.c modperl_perl.h Log: modperl_svptr_table api is an add-on to the Perl ptr_table_ api. we use a PTR_TBL_t to map config structures (e.g. from parsed httpd.conf or .htaccess), where each interpreter needs to have its own copy of the Perl SV object. we do not use an HV* for this, because the HV keys must be SVs with a string value, too much overhead. we do not use an apr_hash_t because they only have the lifetime of the pool used to create them. which may or may not be the same lifetime of the objects we need to lookup. Revision ChangesPath 1.15 +123 -0modperl-2.0/src/modules/perl/modperl_perl.c Index: modperl_perl.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- modperl_perl.c27 May 2002 18:41:52 - 1.14 +++ modperl_perl.c27 Aug 2002 01:46:27 - 1.15 -137,3 +137,126 } #endif } + +/* + * modperl_svptr_table api is an add-on to the Perl ptr_table_ api. + * we use a PTR_TBL_t to map config structures (e.g. from parsed + * httpd.conf or .htaccess), where each interpreter needs to have its + * own copy of the Perl SV object. we do not use an HV* for this, because + * the HV keys must be SVs with a string value, too much overhead. + * we do not use an apr_hash_t because they only have the lifetime of + * the pool used to create them. which may or may not be the same lifetime + * of the objects we need to lookup. + */ + +#ifdef USE_ITHREADS + +/* + * copy a PTR_TBL_t whos PTR_TBL_ENT_t values are SVs. + * the SVs are dup-ed so each interpreter has its own copy. + */ +PTR_TBL_t *modperl_svptr_table_clone(pTHX_ PerlInterpreter *proto_perl, + PTR_TBL_t *source) +{ +UV i; +PTR_TBL_t *tbl; +PTR_TBL_ENT_t **src_ary, **dst_ary; +CLONE_PARAMS parms; + +Newz(0, tbl, 1, PTR_TBL_t); +tbl-tbl_max = source-tbl_max; +tbl-tbl_items = source-tbl_items; +Newz(0, tbl-tbl_ary, tbl-tbl_max + 1, PTR_TBL_ENT_t *); + +dst_ary = tbl-tbl_ary; +src_ary = source-tbl_ary; + +Zero(parms, 0, CLONE_PARAMS); +parms.flags = 0; +parms.stashes = newAV(); + +for (i=0; i source-tbl_max; i++, dst_ary++, src_ary++) { + PTR_TBL_ENT_t *src_ent, *dst_ent=NULL; + + if (!*src_ary) { + continue; +} + + for (src_ent = *src_ary; + src_ent; + src_ent = src_ent-next) +{ +if (dst_ent == NULL) { +Newz(0, dst_ent, 1, PTR_TBL_ENT_t); +*dst_ary = dst_ent; +} +else { +Newz(0, dst_ent-next, 1, PTR_TBL_ENT_t); +dst_ent = dst_ent-next; +} + +/* key is just a pointer we do not modify, no need to copy */ +dst_ent-oldval = src_ent-oldval; + +dst_ent-newval = +SvREFCNT_inc(sv_dup((SV*)src_ent-newval, parms)); +} +} + +SvREFCNT_dec(parms.stashes); + +return tbl; +} + +/* + * need to free the SV values in addition to ptr_table_free + */ +void modperl_svptr_table_destroy(pTHX_ PTR_TBL_t *tbl) +{ +UV i; +PTR_TBL_ENT_t **ary = tbl-tbl_ary; + +for (i=0; i tbl-tbl_max; i++, ary++) { + PTR_TBL_ENT_t *ent; + + if (!*ary) { + continue; +} + + for (ent = *ary; ent; ent = ent-next) { +if (!ent-newval) { +continue; +} + +SvREFCNT_dec((SV*)ent-newval); +ent-newval = NULL; +} +} + +ptr_table_free(tbl); +} +#endif + +/* + * the Perl ptr_table_ api does not provide a function to remove + * an entry from the table. we need to SvREFCNT_dec the SV value + * anyhow. + */ +void modperl_svptr_table_delete(pTHX_ PTR_TBL_t *tbl, void *key) +{ +PTR_TBL_ENT_t *entry, **oentry; +UV hash = PTR2UV(key); + +oentry = tbl-tbl_ary[hash tbl-tbl_max]; +entry = *oentry; + +for (; entry; oentry = entry-next, entry = *oentry) { + if (entry-oldval == key) { +*oentry = entry-next; +SvREFCNT_dec((SV*)entry-newval); +Safefree(entry); +tbl-tbl_items--; + return; + } +} +} 1.8 +11 -0 modperl-2.0/src/modules/perl/modperl_perl.h Index: modperl_perl.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 ---
cvs commit: modperl-2.0/src/modules/perl modperl_module.c modperl_module.h
dougm 2002/08/26 21:21:20 Added: src/modules/perl modperl_module.c modperl_module.h Log: module to create an apache module on the fly to support directive handlers Revision ChangesPath 1.1 modperl-2.0/src/modules/perl/modperl_module.c Index: modperl_module.c === #include mod_perl.h typedef struct { server_rec *server; const char *name; int namelen; } modperl_module_cfg_t; typedef struct { module *modp; const char *cmd_data; const char *func_name; } modperl_module_cmd_data_t; static modperl_module_cfg_t *modperl_module_cfg_new(apr_pool_t *p) { modperl_module_cfg_t *cfg = (modperl_module_cfg_t *)apr_pcalloc(p, sizeof(*cfg)); return cfg; } static modperl_module_cmd_data_t *modperl_module_cmd_data_new(apr_pool_t *p) { modperl_module_cmd_data_t *cmd_data = (modperl_module_cmd_data_t *)apr_pcalloc(p, sizeof(*cmd_data)); return cmd_data; } static void *modperl_module_config_dir_create(apr_pool_t *p, char *dir) { return modperl_module_cfg_new(p); } static void *modperl_module_config_srv_create(apr_pool_t *p, server_rec *s) { return modperl_module_cfg_new(p); } static SV **modperl_module_config_hash_get(pTHX_ int create) { SV **svp; /* XXX: could make this lookup faster */ svp = hv_fetch(PL_modglobal, ModPerl::Module::ConfigTable, MP_SSTRLEN(ModPerl::Module::ConfigTable), create); return svp; } void modperl_module_config_table_set(pTHX_ PTR_TBL_t *table) { SV **svp = modperl_module_config_hash_get(aTHX_ TRUE); sv_setiv(*svp, (IV)table); } PTR_TBL_t *modperl_module_config_table_get(pTHX_ int create) { PTR_TBL_t *table = NULL; SV *sv, **svp = modperl_module_config_hash_get(aTHX_ create); if (!svp) { return NULL; } sv = *svp; if (!SvIOK(sv) create) { table = ptr_table_new(); sv_setiv(sv, (IV)table); } else { table = (PTR_TBL_t *)SvIV(sv); } return table; } typedef struct { PerlInterpreter *perl; PTR_TBL_t *table; void *ptr; } config_obj_cleanup_t; /* * any per-dir CREATE or MERGE that happens at request time * needs to be removed from the pointer table. */ static apr_status_t modperl_module_config_obj_cleanup(void *data) { config_obj_cleanup_t *cleanup = (config_obj_cleanup_t *)data; dTHXa(cleanup-perl); modperl_svptr_table_delete(aTHX_ cleanup-table, cleanup-ptr); MP_TRACE_c(MP_FUNC, deleting ptr 0x%lx from table 0x%lx\n, (unsigned long)cleanup-ptr, (unsigned long)cleanup-table); return APR_SUCCESS; } static void modperl_module_config_obj_cleanup_register(pTHX_ apr_pool_t *p, PTR_TBL_t *table, void *ptr) { config_obj_cleanup_t *cleanup = (config_obj_cleanup_t *)apr_palloc(p, sizeof(*cleanup)); cleanup-table = table; cleanup-ptr = ptr; #ifdef USE_ITHREADS cleanup-perl = aTHX; #endif apr_pool_cleanup_register(p, cleanup, modperl_module_config_obj_cleanup, apr_pool_cleanup_null); } static void *modperl_module_config_merge(apr_pool_t *p, void *basev, void *addv, const char *method) { GV *gv; modperl_module_cfg_t *mrg = NULL, *base = (modperl_module_cfg_t *)basev, *add = (modperl_module_cfg_t *)addv, *tmp = base-server ? base : add; server_rec *s = tmp-server; int is_startup = (p == s-process-pconf); #ifdef USE_ITHREADS modperl_interp_t *interp = modperl_interp_pool_select(p, s); dTHXa(interp-perl); #endif PTR_TBL_t *table = modperl_module_config_table_get(aTHX_ TRUE); SV *mrg_obj = Nullsv, *base_obj = ptr_table_fetch(table, base), *add_obj = ptr_table_fetch(table, add); HV *stash; if (!base_obj || (base_obj == add_obj)) { return add_obj; } stash = SvSTASH(SvRV(base_obj)); MP_TRACE_c(MP_FUNC, looking for method %s in package `%s'\n, method, SvCLASS(base_obj)); /* XXX: should do this lookup at startup time */ if ((gv = gv_fetchmethod_autoload(stash, method, FALSE)) isGV(gv)) { int count; dSP; mrg = modperl_module_cfg_new(p); memcpy(mrg, tmp, sizeof(*mrg));
ANNOUNCE: Bricolage 1.3.3
The Bricolage developers are pleased to announce the release of Bricolage version 1.3.3! This the release candidate for Bricolage verion 1.4.0, and is considered feature-complete. Nearly 50 new features have been added since the 1.2.2 release, and over 80 bugs fixed. Barring any unforseen major bugs cropping up, 1.4.0 will be released within a week of this release. Please feel give it a try, and report any issues to the Bricolage Bugzilla database, at http://bugzilla.bricolage.cc/. Learn more about Bricolage and download it from the Bricolage home page, http://bricolage.cc/. General description: Bricolage is a full-featured, enterprise-class content management system. It offers a browser-based interface for ease-of use, a full-fledged templating system with complete programming language support for flexibility, and many other features. It operates in an Apache/mod_perl environment, and uses the PostgreSQL RDBMS for its repository. Enjoy! --The Bricolage Team
Re: DBI makes apache fail in perl58.dll
thanks for preceeding answer. I have two others : 1/ is it going to be fixed in a future release of DBI ? I am sure Tim will fix it. 2/ if I don't want to trace DBI can I ignore the trace file in children processes created by modperl ? Yes you can ignore it Gerald
Three tier computing: suggestion needed for DBI connection.
Hello all, At the moment I'm running Apache 1.3.12+mod_perl 1.27 with PG 7.2.1 via DBI-DBD on a SS5 Solaris 2.6 machine. I'd like to separate the database engine from the Apache environment so, running Apache+mod_perl+DBI+DBD on the front end and PostgreSQL at the backend (hope I'm right with this particular interpretation of 3tier and split of modules...) I have glanced around for DBI connect scenarios but could not find any useful example. My questions are: - How do I setup my connection string from $dbh=DBI-connect('DBI:Pg:dbname=mydb','login','password') to include in my 'dbname' the host name i.e. 'dbname=mydb@Ultra1' being Ultra1 a fully qualified alias into my hosts table, - Providing the above is possible, I imagine that leaving PG installed at the front end it could only be useful for 'psql -h Ultra1 mydb' but not necessarily used for DBI? Any suggestions are much appreciated. Fabian.
Re: Three tier computing: suggestion needed for DBI connection.
After digging more docs, finally found for PG DBI: DBI:Pg:dbname=mydb;host=Ultra1;port=5432 question 2 still there, thanks. Fabian. Fabián R. Breschi wrote: Hello all, At the moment I'm running Apache 1.3.12+mod_perl 1.27 with PG 7.2.1 via DBI-DBD on a SS5 Solaris 2.6 machine. I'd like to separate the database engine from the Apache environment so, running Apache+mod_perl+DBI+DBD on the front end and PostgreSQL at the backend (hope I'm right with this particular interpretation of 3tier and split of modules...) I have glanced around for DBI connect scenarios but could not find any useful example. My questions are: - How do I setup my connection string from $dbh=DBI-connect('DBI:Pg:dbname=mydb','login','password') to include in my 'dbname' the host name i.e. 'dbname=mydb@Ultra1' being Ultra1 a fully qualified alias into my hosts table, - Providing the above is possible, I imagine that leaving PG installed at the front end it could only be useful for 'psql -h Ultra1 mydb' but not necessarily used for DBI? Any suggestions are much appreciated. Fabian.
Re: Three tier computing: suggestion needed for DBI connection.
--On Thursday, August 15, 2002 12:32:16 +0200 Fabiàn R. Breschi [EMAIL PROTECTED] wrote: After digging more docs, finally found for PG DBI: DBI:Pg:dbname=mydb;host=Ultra1;port=5432 question 2 still there, thanks. All you need is the pgsql/lib and pgsql/include directories so that you can install DBD::Pg. Fabian. Fabián R. Breschi wrote: Hello all, At the moment I'm running Apache 1.3.12+mod_perl 1.27 with PG 7.2.1 via DBI-DBD on a SS5 Solaris 2.6 machine. I'd like to separate the database engine from the Apache environment so, running Apache+mod_perl+DBI+DBD on the front end and PostgreSQL at the backend (hope I'm right with this particular interpretation of 3tier and split of modules...) I have glanced around for DBI connect scenarios but could not find any useful example. My questions are: - How do I setup my connection string from $dbh=DBI-connect('DBI:Pg:dbname=mydb','login','password') to include in my 'dbname' the host name i.e. 'dbname=mydb@Ultra1' being Ultra1 a fully qualified alias into my hosts table, - Providing the above is possible, I imagine that leaving PG installed at the front end it could only be useful for 'psql -h Ultra1 mydb' but not necessarily used for DBI? Any suggestions are much appreciated. Fabian. -- Eric Cholet
Re: Three tier computing: suggestion needed for DBI connection.
Thanks Eric, ..so, I could define at the backend my envvars: POSTGRES_INCLUDE=../psql/include POSTGRES_LIB=../psql/lib I imagine, hopefully, using the same OS on the backend (Sol2.6), I could only copy these two dirs from the frontend without recompiling PG again. That's all that I wanted. Many thanks again, Fabian. Eric Cholet wrote: --On Thursday, August 15, 2002 12:32:16 +0200 Fabiàn R. Breschi [EMAIL PROTECTED] wrote: After digging more docs, finally found for PG DBI: DBI:Pg:dbname=mydb;host=Ultra1;port=5432 question 2 still there, thanks. All you need is the pgsql/lib and pgsql/include directories so that you can install DBD::Pg. Fabian. Fabián R. Breschi wrote: Hello all, At the moment I'm running Apache 1.3.12+mod_perl 1.27 with PG 7.2.1 via DBI-DBD on a SS5 Solaris 2.6 machine. I'd like to separate the database engine from the Apache environment so, running Apache+mod_perl+DBI+DBD on the front end and PostgreSQL at the backend (hope I'm right with this particular interpretation of 3tier and split of modules...) I have glanced around for DBI connect scenarios but could not find any useful example. My questions are: - How do I setup my connection string from $dbh=DBI-connect('DBI:Pg:dbname=mydb','login','password') to include in my 'dbname' the host name i.e. 'dbname=mydb@Ultra1' being Ultra1 a fully qualified alias into my hosts table, - Providing the above is possible, I imagine that leaving PG installed at the front end it could only be useful for 'psql -h Ultra1 mydb' but not necessarily used for DBI? Any suggestions are much appreciated. Fabian. -- Eric Cholet
Clashing Apache::Symbol - Symbol ?
I just recently got my mod_perl to work. Config is mod_perl-1.27/Apache-1.3.26 on AIX 4.3.3. I wrote a PerlAuthenHandler which uses Expect.pm, requiring the normal Symbol.pm. In my startup.pl script for mod_perl I had this line: use lib qw(/usr/opt/perl5/lib/site_perl/5.6.1/aix/Apache); I get a bareword error when IO:Handle tries to call the gensym(Symbol.pm) BUT if I comment the above line out it seems to get past that. I see that there is an Apache::Symbol which looks quite different than the 'normal' one. My question is by letting the normal Symbol.pm load, so IO:Handle will work, is that going to mess things up since the Apache::Symbol is different? Or will everything be able to know which to use? Second the reason I'm using Expect is to wrap a Unix SecurID shell. I've tried installing the packages at CPAN for SecurID but I don't have access any .h files, or libraries for this SecurID shell so nothing has been installable. Any suggestions would be GREAT! Todd E. O'Dell Network Services - TSS Staff Room 1118 500 E. 8th Kansas City, MO 64106 Office: (816)275-3626 Alpha Page: [EMAIL PROTECTED] [EMAIL PROTECTED]
compilation problems in mod_perl
Hello, I am trying to compile mod_perl in my Redhat Linux 7.2. I run perl 5.8.0, when I do perl Makefile.PL MP_AP_PREFIX=/usr/local/apache2 Its looks fine (I get no errors) but then when I try to do make I get the following: - cd src/modules/perl make -f Makefile.modperl make[1]: Entering directory `/usr/src/mod_perl-1.99_04/src/modules/perl' gcc -I/usr/src/mod_perl-1.99_04/src/modules/perl -I/usr/src/mod_perl-1.99_04/xs -I/usr/local/apache2/include -fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm -I/usr/local/lib/perl5/5.8.0/i586-linux/CORE -DMOD_PERL -O2 -fpic \ -c mod_perl.c mv mod_perl.o mod_perl.lo mod_perl.c: In function `modperl_register_hooks': mod_perl.c:511: warning: passing arg 3 of `ap_register_output_filter' makes pointer from integer without a cast mod_perl.c:511: too few arguments to function `ap_register_output_filter' mod_perl.c:515: warning: passing arg 3 of `ap_register_input_filter' makes pointer from integer without a cast mod_perl.c:515: too few arguments to function `ap_register_input_filter' mod_perl.c:519: warning: passing arg 3 of `ap_register_output_filter' makes pointer from integer without a cast mod_perl.c:519: too few arguments to function `ap_register_output_filter' mod_perl.c:523: warning: passing arg 3 of `ap_register_input_filter' makes pointer from integer without a cast mod_perl.c:523: too few arguments to function `ap_register_input_filter' make[1]: *** [mod_perl.lo] Error 1 make[1]: Leaving directory `/usr/src/mod_perl-1.99_04/src/modules/perl' make: *** [modperl_lib] Error 2 - I am a newbie to Linux and I got pretty much in lost here, If someone could help I will appreciate it. Thanks in advance, And Best Regards ... Amir.
[DIGEST] mod_perl digest 2002/08/19
-- mod_perl digest August 19, 2002 - August 25, 2002 -- Recent happenings in the mod_perl world... Features o mod_perl status o module announcements o module rfcs o mailing list highlights o links mod_perl status o mod_perl - stable: 1.27 (released June 1, 2002) [1] - development: 1.27_01-dev [2] o Apache - stable: 1.3.26 (released June 18, 2002) [3] - development: 1.3.27-dev [4] o mod_perl 2.0 - beta: 1.99_05 (released August 20, 2002) [5] - development: (from cvs) [6] o Apache 2.0 - stable: 2.0.40 (released August 9, 2002) [7] o Perl - stable: 5.8.0 (released July 18, 2001) [8] - development: none [9] module announcements o Bricolage 1.3.3 - full-featured, enterprise-class content management system [10] o OpenInteract 1.50 - extensible web application server [11] module rfcs o Apache::SessionManager 0.01 [12] mailing list highlights o HTML to XHTML conversion [13] o Apache::Session - what goes into a session? [14] links o The Apache/Perl Integration Project [15] o mod_perl documentation [16] o Apache modules on CPAN [17] o _Writing Apache Modules with Perl and C_ homepage [18] o _mod_perl Developer's Cookbook_ homepage [19] o mod_perl news and advocacy [20] o mod_perl list archives - modperl@ [21] - dev@ [22] - docs-dev@ [23] - advocacy@ [24] happy mod_perling... --James [EMAIL PROTECTED] -- [1] http://perl.apache.org/dist/ [2] http://cvs.apache.org/snapshots/modperl/ [3] http://www.apache.org/dist/httpd/ [4] http://cvs.apache.org/snapshots/apache-1.3/ [5] http://perl.apache.org/dist/mod_perl-1.99_04.tar.gz [6] http://cvs.apache.org/snapshots/modperl-2.0/ [7] http://www.apache.org/dist/httpd/ [8] http://www.cpan.org/src/stable.tar.gz [9] http://www.cpan.org/src/README.html [10] http://mathforum.org/epigone/modperl/stroifleislil [11] http://mathforum.org/epigone/modperl/fromoabling [12] http://mathforum.org/epigone/modperl/trahglankram [13] http://mathforum.org/epigone/modperl/nungixno http://mathforum.org/epigone/modperl/trilpingwul [14] http://mathforum.org/epigone/modperl/liralging [15] http://perl.apache.org/ [16] http://perl.apache.org/docs/ [17] http://www.cpan.org/modules/by-module/Apache/ [18] http://www.modperl.com/ [19] http://www.modperlcookbook.org/ [20] http://www.take23.org/ [21] http://perl.apache.org/maillist/modperl.html#Searchable_Archives [22] http://perl.apache.org/maillist/dev.html#Searchable_Archives [23] http://perl.apache.org/maillist/docs-dev.html#Searchable_Archives [24] http://perl.apache.org/maillist/advocacy.html#Searchable_Archives
Apache::Reload -- can't locate main.pm?
I've been successfully using Apache::Reload for a few weeks now. However, I installed it on my home development system, and I'm getting this error when accessing a module that contains 'use Apache::Reload': [Mon Aug 26 09:59:12 2002] [error] Can't locate main.pm in INC (INC contains: ... at /home/miller/lib/perl5/site_perl/5.6.1/Apache/Reload.pm line 132. (yes, I install some modules under my own root tree - it keeps the base distribution nice and clean) What's main.pm, and why can't Apache::Reload find it? I've searched the archives, but have had little success in finding anything interesting. Apache1.3.26, mod_perl 1.26. Cheers! -klm.
Re: Apache::Reload -- can't locate main.pm?
* Ken Miller [EMAIL PROTECTED] [2002-08-26 12:03]: What's main.pm, and why can't Apache::Reload find it? I've searched the archives, but have had little success in finding anything interesting. Run find $dir -name 'main.pm' -print For each dir in @INC, and see what comes up. (darren) -- What the imagination siezes as beauty must be truth--whether it existed before on not. -- John Keats, Woman When I Behold Thee
Segmentation Fault with mod_php and mod_perl
There seems to be conflict between mod_php 4.2.2 and mod_perl 1.27 running with Apache 1.3.26 on Solaris 8 platform(FreeBSD with the same configuration seems to work fine). The Apache configuration as follows: CC=gcc \ CFLAGS= -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ ./configure \ --with-layout=Apache \ --prefix=/usr/apache \ --enable-module=info \ --enable-module=proxy \ --enable-module=usertrack \ --enable-module=rewrite \ --enable-module=speling \ --activate-module=src/modules/perl/libperl.a \ --activate-module=src/modules/php4/libphp4.a \ --disable-rule=EXPAT \ $ will cause Apache to Segmentation fault: [Wed Aug 21 11:59:47 2002] [notice] child pid 17907 exit signal Segmentation Fault (11) when accessing the default page(index.html). But the CGI script runs fine, so does server-status and server-info. If I take out the activate-module line for either mod_perl or mod_php, the problem disapper. BTW, the mod_perl make test runs fine. running with truss ./httpd -X produce: : lwp_cond_wait(0xFEFE5550, 0xFEFE5560, 0xFEFDEDB8) (sleeping...) lwp_cond_wait(0xFEFE5550, 0xFEFE5560, 0xFEFDEDB8) (sleeping...) door_return(0x, 0, 0x, 0) (sleeping...) accept(16, 0xFFBEF798, 0xFFBEF7BC, 1)= 5 fcntl(19, F_SETLKW64, 0x00301C60)= 0 sigaction(SIGUSR1, 0xFFBEF5D0, 0xFFBEF6D0) = 0 getsockname(5, 0xFFBEF7A8, 0xFFBEF7BC, 1)= 0 setsockopt(5, 6, 1, 0xFFBEF70C, 4, 1)= 0 alarm(300) = 0 read(5, G E T / H T T P / 1.., 4096) = 404 sigaction(SIGUSR1, 0xFFBED4C0, 0xFFBED5C0) = 0 time() = 1029956894 alarm(300) = 300 alarm(0) = 300 stat64(/usr/apache/htdocs, 0x00425108) = 0 sigaction(SIGALRM, 0x, 0xFFBEF490) = 0 stat64(/usr/apache/htdocs/index.html, 0x0044A108) = 0 stat64(/usr/apache/htdocs/index.html, 0x00425EC0) = 0 Incurred fault #6, FLTBOUNDS %pc = 0x00073554 siginfo: SIGSEGV SEGV_MAPERR addr=0x0060 Received signal #11, SIGSEGV [default] siginfo: SIGSEGV SEGV_MAPERR addr=0x0060 *** process killed *** Please help! Or if you know of a working combination of Apache/mod_perl/mod_php on Solaris 8, let me know.. Thanks! Alex _ Send and receive Hotmail on your mobile device: http://mobile.msn.com
Apache::Request
Hi, I dont know if this is the right place to ask but I just cant install Apache::Request. When calling 'make', make cant find any of the header files. Can anyone tell me where I did go wrong? Thanks UY
Re: Segmentation Fault with mod_php and mod_perl
On Monday 26 August 2002 10:43 am, Alex Lee wrote: I ran into this on a RH7 box. I compiled mod_perl into apache and compiled PHP as a DSO with APXS. Worked for me, but YMMV. There seems to be conflict between mod_php 4.2.2 and mod_perl 1.27 running with Apache 1.3.26 on Solaris 8 platform(FreeBSD with the same configuration seems to work fine). The Apache configuration as follows: CC=gcc \ CFLAGS= -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ ./configure \ --with-layout=Apache \ --prefix=/usr/apache \ --enable-module=info \ --enable-module=proxy \ --enable-module=usertrack \ --enable-module=rewrite \ --enable-module=speling \ --activate-module=src/modules/perl/libperl.a \ --activate-module=src/modules/php4/libphp4.a \ --disable-rule=EXPAT \ $ will cause Apache to Segmentation fault: [Wed Aug 21 11:59:47 2002] [notice] child pid 17907 exit signal Segmentation Fault (11) when accessing the default page(index.html). But the CGI script runs fine, so does server-status and server-info. If I take out the activate-module line for either mod_perl or mod_php, the problem disapper. BTW, the mod_perl make test runs fine. running with truss ./httpd -X produce: lwp_cond_wait(0xFEFE5550, 0xFEFE5560, 0xFEFDEDB8) (sleeping...) lwp_cond_wait(0xFEFE5550, 0xFEFE5560, 0xFEFDEDB8) (sleeping...) door_return(0x, 0, 0x, 0) (sleeping...) accept(16, 0xFFBEF798, 0xFFBEF7BC, 1) = 5 fcntl(19, F_SETLKW64, 0x00301C60) = 0 sigaction(SIGUSR1, 0xFFBEF5D0, 0xFFBEF6D0) = 0 getsockname(5, 0xFFBEF7A8, 0xFFBEF7BC, 1) = 0 setsockopt(5, 6, 1, 0xFFBEF70C, 4, 1) = 0 alarm(300) = 0 read(5, G E T / H T T P / 1.., 4096)= 404 sigaction(SIGUSR1, 0xFFBED4C0, 0xFFBED5C0) = 0 time() = 1029956894 alarm(300) = 300 alarm(0) = 300 stat64(/usr/apache/htdocs, 0x00425108) = 0 sigaction(SIGALRM, 0x, 0xFFBEF490) = 0 stat64(/usr/apache/htdocs/index.html, 0x0044A108) = 0 stat64(/usr/apache/htdocs/index.html, 0x00425EC0) = 0 Incurred fault #6, FLTBOUNDS %pc = 0x00073554 siginfo: SIGSEGV SEGV_MAPERR addr=0x0060 Received signal #11, SIGSEGV [default] siginfo: SIGSEGV SEGV_MAPERR addr=0x0060 *** process killed *** Please help! Or if you know of a working combination of Apache/mod_perl/mod_php on Solaris 8, let me know.. Thanks! Alex _ Send and receive Hotmail on your mobile device: http://mobile.msn.com
Re: Segmentation Fault with mod_php and mod_perl
Hmm. That's what I did in the first place and I can't even get Apache to compile in that case. It kept complaining about mod_proxy can't resolve some external symbols, if I remember correctly. So I thought maybe you can't do both DSO and static at the same time. After I changed both to static linked, it compiled fine. But then keep getting segmentation fault when accessing the default page. The strange thing is that perl CGI programs run fine. Alex From: C. David Wilde [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Alex Lee [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Segmentation Fault with mod_php and mod_perl Date: Mon, 26 Aug 2002 12:54:04 -0700 On Monday 26 August 2002 10:43 am, Alex Lee wrote: I ran into this on a RH7 box. I compiled mod_perl into apache and compiled PHP as a DSO with APXS. Worked for me, but YMMV. There seems to be conflict between mod_php 4.2.2 and mod_perl 1.27 running with Apache 1.3.26 on Solaris 8 platform(FreeBSD with the same configuration seems to work fine). The Apache configuration as follows: CC=gcc \ CFLAGS= -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ ./configure \ --with-layout=Apache \ --prefix=/usr/apache \ --enable-module=info \ --enable-module=proxy \ --enable-module=usertrack \ --enable-module=rewrite \ --enable-module=speling \ --activate-module=src/modules/perl/libperl.a \ --activate-module=src/modules/php4/libphp4.a \ --disable-rule=EXPAT \ $@ will cause Apache to Segmentation fault: [Wed Aug 21 11:59:47 2002] [notice] child pid 17907 exit signal Segmentation Fault (11) when accessing the default page(index.html). But the CGI script runs fine, so does server-status and server-info. If I take out the activate-module line for either mod_perl or mod_php, the problem disapper. BTW, the mod_perl make test runs fine. running with truss ./httpd -X produce: lwp_cond_wait(0xFEFE5550, 0xFEFE5560, 0xFEFDEDB8) (sleeping...) lwp_cond_wait(0xFEFE5550, 0xFEFE5560, 0xFEFDEDB8) (sleeping...) door_return(0x, 0, 0x, 0) (sleeping...) accept(16, 0xFFBEF798, 0xFFBEF7BC, 1)= 5 fcntl(19, F_SETLKW64, 0x00301C60)= 0 sigaction(SIGUSR1, 0xFFBEF5D0, 0xFFBEF6D0) = 0 getsockname(5, 0xFFBEF7A8, 0xFFBEF7BC, 1)= 0 setsockopt(5, 6, 1, 0xFFBEF70C, 4, 1)= 0 alarm(300) = 0 read(5, G E T / H T T P / 1.., 4096) = 404 sigaction(SIGUSR1, 0xFFBED4C0, 0xFFBED5C0) = 0 time() = 1029956894 alarm(300) = 300 alarm(0) = 300 stat64(/usr/apache/htdocs, 0x00425108) = 0 sigaction(SIGALRM, 0x, 0xFFBEF490) = 0 stat64(/usr/apache/htdocs/index.html, 0x0044A108) = 0 stat64(/usr/apache/htdocs/index.html, 0x00425EC0) = 0 Incurred fault #6, FLTBOUNDS %pc = 0x00073554 siginfo: SIGSEGV SEGV_MAPERR addr=0x0060 Received signal #11, SIGSEGV [default] siginfo: SIGSEGV SEGV_MAPERR addr=0x0060 *** process killed *** Please help! Or if you know of a working combination of Apache/mod_perl/mod_php on Solaris 8, let me know.. Thanks! Alex _ Send and receive Hotmail on your mobile device: http://mobile.msn.com _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com
Mason script not running
Hi, I have a Redhat 7.3 box running apache with mod_ssl and mod_perl. I configured the server to run on SSL. I have a very simple script as follows for Mason module: /PublicPages/WebComponents/small_dialog, data ="" $m-scomp('/PublicPages/WebComponents/main_menu'), title = 'Please Select a Feature' %docvim:syntax=mason/%doc I intsalled all the modules necessary including HTML_Mason, Apache::Request, etc. But when I try to go to my site https://172.16.1.1, I get a 500 Internal server error and the error log for apache gives me the messages: [Mon Aug 26 13:38:10 2002] [error] Can't locate object method "new" via package "Apache::Request" (perhaps you forgot to load "Apache::Request"?) at /usr/lib/perl5/site_perl/5.6.1/HTML/Mason/ApacheHandler.pm line 827. But I am pretty sure I installed Apache::Request using make Makefile.PL make install I will appreciate if anyone can help me with this. UY
RE: [OT] HTML to XHTML conversion
Reviewing the What is different between HTML and XHTML? we have All tags must close X/X or be single tags like X / Tag names are case sensitive All attributes must be name=value (double quotes required, no more multiple,checked,selected) And all tags must nest properly XHTML also has rules about which elements can appear where (the XHTML DTD) NOTE: There are two XHTML DTD's of interest, Strict and Transitional. Transitional is much more forgiving. I always View Source of www.w3.org to get the strange DOCTYPE syntax for Transitional, and the path to the DTD -Original Message- From: D. Hageman [mailto:[EMAIL PROTECTED]] Sent: Friday, August 23, 2002 12:08 PM To: Jonathan M. Hollin Cc: [EMAIL PROTECTED] Subject: Re: [OT] HTML to XHTML conversion My suggestion would to just use a XML parser module like XML::LibXML. Load the file up using the HTML loading functions and print it using the XML printing functions ... since the only difference I can see between HTML and XHMTL is that optional ending tags are no longer optional (per XML spec) and single tags must be ended properly (per XML spec). On Fri, 23 Aug 2002, Jonathan M. Hollin wrote: [OFF TOPIC] I am trying to find a module that can convert HTML to XHTML, but have drawn a blank on CPAN and GOOGLE. Is there anything out there to do this other than HTML TIDY? I am developing a mod_perl CMS application at the moment. All its output is compliant with XHTML Transitional. But its users can create content that isn't (and are likely to) and I'd like to parse this and convert it XHTML before it goes into the RDBMS if possible. If nothing exists along these lines - would anyone like to collaborate on the development of a module for this purpose? HTML::XHTML anyone? -- //\\ || D. Hageman[EMAIL PROTECTED] || \\// -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
Re: Clashing Apache::Symbol - Symbol ?
ODELL, TODD E (SWBT) wrote: I just recently got my mod_perl to work. Config is mod_perl-1.27/Apache-1.3.26 on AIX 4.3.3. I wrote a PerlAuthenHandler which uses Expect.pm, requiring the normal Symbol.pm. In my startup.pl script for mod_perl I had this line: use lib qw(/usr/opt/perl5/lib/site_perl/5.6.1/aix/Apache); I get a bareword error when IO:Handle tries to call the gensym(Symbol.pm) BUT if I comment the above line out it seems to get past that. I see that there is an Apache::Symbol which looks quite different than the 'normal' one. My question is by letting the normal Symbol.pm load, so IO:Handle will work, is that going to mess things up since the Apache::Symbol is different? Or will everything be able to know which to use? eh? why in the world you are trying to do that? there is no /usr/opt/perl5/lib/site_perl/5.6.1/aix/Apache, there is /usr/opt/perl5/lib/site_perl/5.6.1/aix. Of course you will have problems when you load the wrong package. It's Apache::Symbol, not Symbol in the dir Apache/. __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: Apache::Reload -- can't locate main.pm?
Ken Miller wrote: I've been successfully using Apache::Reload for a few weeks now. However, I installed it on my home development system, and I'm getting this error when accessing a module that contains 'use Apache::Reload': [Mon Aug 26 09:59:12 2002] [error] Can't locate main.pm in @INC (@INC contains: ... at /home/miller/lib/perl5/site_perl/5.6.1/Apache/Reload.pm line 132. (yes, I install some modules under my own root tree - it keeps the base distribution nice and clean) What's main.pm, and why can't Apache::Reload find it? I've searched the archives, but have had little success in finding anything interesting. Apache1.3.26, mod_perl 1.26. In addition to Darren's reply, this explains what happens: http://perl.apache.org/docs/2.0/api/mod_perl-2.0/Apache/Reload.html#Description says: Note that Apache::Reload operates on the current context of @INC. Which means, when called as a Perl*Handler it will not see @INC paths added or removed by Apache::Registry scripts, as the value of @INC is saved on server startup and restored to that value after each request. In other words, if you want Apache::Reload to work with modules that live in custom @INC paths, you should modify @INC when the server is started. - __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: Segmentation Fault with mod_php and mod_perl
Alex Lee wrote: There seems to be conflict between mod_php 4.2.2 and mod_perl 1.27 running with Apache 1.3.26 on Solaris 8 platform(FreeBSD with the same configuration seems to work fine). [...] Segmentation Fault (11) [...] running with truss ./httpd -X produce: Sending the core backtrace should help more that the output of truss. See http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com