cvs commit: modperl-2.0/t/response/TestApache compat2.pm
dougm 2002/06/03 11:27:03 Modified:lib/Apache compat.pm t/response/TestApache compat2.pm Log: add $r-is_main compat method Revision ChangesPath 1.59 +2 -0 modperl-2.0/lib/Apache/compat.pm Index: compat.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- compat.pm 3 Jun 2002 18:23:16 - 1.58 +++ compat.pm 3 Jun 2002 18:27:03 - 1.59 -321,6 +321,8 $r-send_fd_length($fh, -1); } +sub is_main { !shift-main } + package Apache::File; use Fcntl (); 1.15 +4 -1 modperl-2.0/t/response/TestApache/compat2.pm Index: compat2.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat2.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- compat2.pm30 May 2002 04:05:06 - 1.14 +++ compat2.pm3 Jun 2002 18:27:03 - 1.15 -24,7 +24,7 sub handler { my $r = shift; -plan $r, tests = 45; +plan $r, tests = 46; $r-send_http_header('text/plain'); -230,6 +230,9 my $t_class = ref $t; ok t_cmp('APR::Table', $t_class, Apache::Table-new); + +ok t_cmp(!$r-main, $r-is_main, + '$r-is_main'); #note these are not actually part of the tests #since i think on platforms where crypt is not supported,
cvs commit: modperl-2.0/src/modules/perl mod_perl.c mod_perl.h
dougm 2002/06/03 16:41:18 Modified:src/modules/perl mod_perl.c mod_perl.h Log: add MODPERL2 config define, as if the server had been started with -DMODPERL2 Revision ChangesPath 1.121 +10 -2 modperl-2.0/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.120 retrieving revision 1.121 diff -u -r1.120 -r1.121 --- mod_perl.c30 May 2002 23:35:02 - 1.120 +++ mod_perl.c3 Jun 2002 23:41:18 - 1.121 -422,12 +422,17 return OK; } -void modperl_pre_config_handler(apr_pool_t *p, apr_pool_t *plog, -apr_pool_t *ptemp) +int modperl_hook_pre_config(apr_pool_t *p, apr_pool_t *plog, +apr_pool_t *ptemp) { +/* for IfDefine MODPERL2 and Apache-define(MODPERL2) */ +*(char **)apr_array_push(ap_server_config_defines) = MODPERL2; + /* XXX: htf can we have PerlPreConfigHandler * without first configuring mod_perl ? */ + +return OK; } static int modperl_hook_pre_connection(conn_rec *c, void *csd) -520,6 +525,9 void modperl_register_hooks(apr_pool_t *p) { +ap_hook_pre_config(modperl_hook_pre_config, + NULL, NULL, APR_HOOK_MIDDLE); + ap_hook_open_logs(modperl_hook_init, NULL, NULL, APR_HOOK_MIDDLE); 1.44 +2 -2 modperl-2.0/src/modules/perl/mod_perl.h Index: mod_perl.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- mod_perl.h31 May 2002 15:41:11 - 1.43 +++ mod_perl.h3 Jun 2002 23:41:18 - 1.44 -64,8 +64,8 void modperl_init(server_rec *s, apr_pool_t *p); int modperl_hook_init(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s); -void modperl_pre_config_handler(apr_pool_t *p, apr_pool_t *plog, -apr_pool_t *ptemp); +int modperl_hook_pre_config(apr_pool_t *p, apr_pool_t *plog, +apr_pool_t *ptemp); void modperl_register_hooks(apr_pool_t *p); apr_pool_t *modperl_server_pool(void); PerlInterpreter *modperl_startup(server_rec *s, apr_pool_t *p);
cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm
dougm 2002/06/03 16:46:44 Modified:xs/tables/current/ModPerl FunctionTable.pm Log: need to update pre_config hook namechange for win32 .def Revision ChangesPath 1.71 +2 -2 modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm Index: FunctionTable.pm === RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- FunctionTable.pm 30 May 2002 02:33:48 - 1.70 +++ FunctionTable.pm 3 Jun 2002 23:46:44 - 1.71 -3232,8 +3232,8 ] }, { -'return_type' = 'void', -'name' = 'modperl_pre_config_handler', +'return_type' = 'int', +'name' = 'modperl_hook_pre_config', 'args' = [ { 'type' = 'apr_pool_t *',
cvs commit: modperl-2.0/todo api.txt
dougm 2002/06/03 17:44:24 Modified:lib/Apache compat.pm t/response/TestApache compat2.pm todo api.txt Log: add Apache-define compat method Revision ChangesPath 1.60 +5 -0 modperl-2.0/lib/Apache/compat.pm Index: compat.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- compat.pm 3 Jun 2002 18:27:03 - 1.59 +++ compat.pm 4 Jun 2002 00:44:23 - 1.60 -99,6 +99,11 return Symbol::gensym(); } +sub define { +shift if _ == 2; +exists_config_define(_); +} + package Apache::Constants; use Apache::Const (); 1.16 +5 -1 modperl-2.0/t/response/TestApache/compat2.pm Index: compat2.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat2.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- compat2.pm3 Jun 2002 18:27:03 - 1.15 +++ compat2.pm4 Jun 2002 00:44:23 - 1.16 -24,7 +24,7 sub handler { my $r = shift; -plan $r, tests = 46; +plan $r, tests = 47; $r-send_http_header('text/plain'); -233,6 +233,10 ok t_cmp(!$r-main, $r-is_main, '$r-is_main'); + +ok t_cmp(Apache::exists_config_define('MODPERL2'), + Apache-define('MODPERL2'), + 'Apache-define'); #note these are not actually part of the tests #since i think on platforms where crypt is not supported, 1.24 +0 -4 modperl-2.0/todo/api.txt Index: api.txt === RCS file: /home/cvs/modperl-2.0/todo/api.txt,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- api.txt 25 May 2002 17:49:03 - 1.23 +++ api.txt 4 Jun 2002 00:44:23 - 1.24 -40,10 +40,6 1.x ht_time compat. should we just leave as is or see if ht_time can be changed to not require a pool? -Apache-define: -exists as Apache::exists_config_define, which should stay, -Apache::compat could implement a wrapper. - $r-document_root: cannot currently be modified. requires locking since it is part of the per-server config structure which is shared between threads
[2.x] test fails on win32 version 1.99_02
hi on win2k, perl 5.6.1, apache 2.036 i can successfully comile mod_perl-1.99_02 just released with as many flags as desired for instance MP_DEBUG now works but nmake test fails to start apache. with 2.0.36 there is a segfault and with 2.0.37-dev (last cvs) a transferlog directive not understood by the server (which prevents to start) here is results : after this log line is displayed [info] base server + 5 vhosts ready to run tests END in mod_perl_extra.pl, pid=2224 there is a segfault unhandled exception in perl56.dll PERL56! 28018443() PERL56! 280584a2() PERL56! 280587cb() PERL56! 28053778() and t/logs/error_log is blank thanks pascal 2. Used Components and their Configuration: *** using lib/Apache/BuildConfig.pm *** Makefile.PL options: MP_AP_PREFIX= c:\ap2036 MP_GENERATE_XS = 1 MP_INST_APACHE2 = 1 MP_LIBNAME = mod_perl MP_USE_DSO = 1 MP_USE_STATIC = 1 *** c:\ap2036/bin/Apache.exe -V Server version: Apache/2.0.36 Server built: May 7 2002 17:17:14 Server's Module Magic Number: 20020329:1 Architecture: 32-bit Server compiled with -D APACHE_MPM_DIR=server/mpm/winnt -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT=/apache -D SUEXEC_BIN=/apache/bin/suexec -D DEFAULT_ERRORLOG=logs/error.log -D SERVER_CONFIG_FILE=conf/httpd.conf *** C:\Perl\bin\perl.exe -V Summary of my perl5 (revision 5 version 6 subversion 1) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=undef use5005threads=undef useithreads=define usemultiplicity=define useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX', optimize='-O1 -MD -DNDEBUG', cppflags='-DWIN32' ccversion='', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='link', ldflags '-nologo -nodefaultlib -release -libpath:C:\Perl\lib\CORE -machine:x86' libpth=C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib C:\Program Files\Microsoft Visual Studio\VC98\lib C:\Perl\lib\CORE libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', ddlflags='-dll -nologo -nodefaultlib -release -libpath:C:\Perl\lib\CORE -machine:x86' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS Locally applied patches: ActivePerl Build 631 Built under MSWin32 Compiled at Jan 2 2002 17:16:22 %ENV: PERL_LWP_USE_HTTP_10=1 INC: C:/Perl/lib C:/Perl/site/lib .
please help me.
Dear Mr/Mrs. Please help me I have trouble with perl configuration in apache config file (httpd.conf) I had install ActivePerl-5.6.1.631-MSWin32-x86 and my computer's win2k. Please help me how to config in order I can run perl page. Your help will be appreciated. Thanks you very much. ps: please look at my config file. # # Based upon the NCSA server configuration files originally by Rob McCool. # # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See URL:http://www.apache.org/docs/ for detailed information about # the directives. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # After this file is processed, the server will look for and process # F:/Program Files/Apache Group/Apache/conf/srm.conf and then F:/Program Files/Apache Group/Apache/conf/access.conf # unless you have overridden these with ResourceConfig and/or # AccessConfig directives here. # # The configuration directives are grouped into three basic sections: # 1. Directives that control the operation of the Apache server process as a # whole (the 'global environment'). # 2. Directives that define the parameters of the 'main' or 'default' server, # which responds to requests that aren't handled by a virtual host. # These directives also provide default values for the settings # of all virtual hosts. # 3. Settings for virtual hosts, which allow Web requests to be sent to # different IP addresses or hostnames and have them handled by the # same Apache server process. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with / (or drive:/ for Win32), the # server will use that explicit path. If the filenames do *not* begin # with /, the value of ServerRoot is prepended -- so logs/foo.log # with ServerRoot set to /usr/local/apache will be interpreted by the # server as /usr/local/apache/logs/foo.log. # # NOTE: Where filenames are specified, you must use forward slashes # instead of backslashes (e.g., c:/apache instead of c:\apache). # If a drive letter is omitted, the drive on which Apache.exe is located # will be used by default. It is recommended that you always supply # an explicit drive letter in absolute paths, however, to avoid # confusion. # ### Section 1: Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent requests it can handle or where it # can find its configuration files. # # # ServerType is either inetd, or standalone. Inetd mode is only supported on # Unix platforms. # ServerType standalone # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # ServerRoot F:/Program Files/Apache Group/Apache # # PidFile: The file in which the server should record its process # identification number when it starts. # PidFile logs/httpd.pid # # ScoreBoardFile: File used to store internal server process information. # Not all architectures require this. But if yours does (you'll know because # this file will be created when you run Apache) then you *must* ensure that # no two invocations of Apache share the same scoreboard file. # ScoreBoardFile logs/apache_runtime_status # # In the standard configuration, the server will process httpd.conf (this # file, specified by the -f command line option), srm.conf, and access.conf # in that order. The latter two files are now distributed empty, as it is # recommended that all directives be kept in a single file for simplicity. # The commented-out values below are the built-in defaults. You can have the # server ignore these files altogether by using /dev/null (for Unix) or # nul (for Win32) for the arguments to the directives. # #ResourceConfig conf/srm.conf #AccessConfig conf/access.conf # # Timeout: The number of seconds before receives and sends time out. # Timeout 300 # # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to Off to deactivate. # KeepAlive On # # MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. # MaxKeepAliveRequests 100 # # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 15 # # Apache on Win32 always creates one child process to handle requests. If it # dies, another child process is created automatically. Within the child # process multiple threads handle incoming requests. The next two # directives
Problem: Internal redirection of ErrorDocument to mod_perl handler
List, Before I present a detailed description of the problem I thought I'd just bounce of an intro to see if its a common fault. I have found, using apache 1.x latest and mod_perl 1.x latest that if I use internal redirection to a mod_perl handler for ErrorDocument 500 (server_error) then even though I return the perfectly correct data (html headers etc) to the browser, every browser works fine. Except that is, Internet Explorer 6 (maybe earlier too but I have no test bed). Internet Explorer chooses to display the default Microsoft internal server error page and not the html which is actually returned. If I use a network monitor like Iris I can see that the data is returned perfectly...but Internet Explorer refuses to display it. This problem my apply to other error codes. The only fix I found is to use a fully qualified host redirect for the ErrorDocument.. but then I lose fancy stuff like previous request analysis. Any ideas? Ric p.s. The kind of httpd.conf block I am talking about is, ErrorDocument 500 /error Location /error SetHandler blahblah blahblah /Location
Re: please help me.
hi but what is the problem ? if you are running normal cgi script, then the first line of the file script called must contain #!path_path_to_perl and this is just a comment to remind you in httpd.conf : # Apache parses all CGI scripts for the shebang line by default. # This comment line, the first line of the script, consists of the symbols # pound (#) and exclamation (!) followed by the path of the program that # can execute this specific script. For a perl script, with perl.exe in # the C:\Program Files\Perl directory, the shebang line should be: #!F:/Perl/bin/perl.exe if you are running modperl there should a loadmodule perlmodule... somewhere pascal - Original Message - From: Tran Van Quan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 03, 2002 10:54 AM Subject: please help me. Dear Mr/Mrs. Please help me I have trouble with perl configuration in apache config file (httpd.conf) I had install ActivePerl-5.6.1.631-MSWin32-x86 and my computer's win2k. Please help me how to config in order I can run perl page. Your help will be appreciated. Thanks you very much. ps: please look at my config file.
Re: Apache-server_root_relative(); not found
m31 wrote: HI, sorry if this is the wrong place, I am new to the mailing list. This is the right place. If you are new to mod_perl, you probably want to read the docs first. See: http://perl.apache.org/release/docs/ I have apache/1.3.23 and mod_perl/1.27 (I just upgraded) and perl/5.6.0 When I try: BEGIN { use Apache (); use lib Apache-server_root_relative('lib/perl'); } I get compilation errors saying that it can't locate object method server_root_relative via pachage Apache. BEGIN failed. Can any-one help me out or point me in the right direction? Are you sure you are testing this under mod_perl? Also please be more specific, where did you put this code: in a startup file, a script or a handler? You cannot test code including Apache API without running under mod_perl. __ 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: Problem: Internal redirection of ErrorDocument to mod_perl handler
Before I present a detailed description of the problem I thought I'd just bounce of an intro to see if its a common fault. I have found, using apache 1.x latest and mod_perl 1.x latest that if I use internal redirection to a mod_perl handler for ErrorDocument 500 (server_error) then even though I return the perfectly correct data (html headers etc) to the browser, every browser works fine. Except that is, Internet Explorer 6 (maybe earlier too but I have no test bed). Internet Explorer chooses to display the default Microsoft internal server error page and not the html which is actually returned. If I use a network monitor like Iris I can see that the data is returned perfectly...but Internet Explorer refuses to display it. This problem my apply to other error codes. The only fix I found is to use a fully qualified host redirect for the ErrorDocument.. but then I lose fancy stuff like previous request analysis. Yet another example of M$ knowing what her consumers want better than those consumers themselves. IE will try to substitute so-called friendly error messages for all of the browser errors you could experience if the Show Friendly Error Messages option is selected in IE's Advanced Settings page (which it is by default I believe). Now, you can turn this option off in your own browser, but obviously you can't control your visitor's settings. However, there is a hack. Just make sure that your error message is bigger (in bytes) than than the trigger size that MS uses and your message will be displayed in place of theirs. Now, I can't remember what that trigger size is, so you may need to experiment, search the web, or wait for some human encyclopeadia to post it here... :-) Jonathan M. Hollin - WYPUG http://wypug.pm.org/
Re: Problem: Internal redirection of ErrorDocument to mod_perlhandler
On Sat, 1 Jun 2002, Richard Clarke wrote: Before I present a detailed description of the problem I thought I'd just bounce of an intro to see if its a common fault. I have found, using apache 1.x latest and mod_perl 1.x latest that if I use internal redirection to a mod_perl handler for ErrorDocument 500 (server_error) then even though I return the perfectly correct data (html headers etc) to the browser, every browser works fine. Except that is, Internet Explorer 6 (maybe earlier too but I have no test bed). Internet Explorer chooses to display the default Microsoft internal server error page and not the html which is actually returned. If I use a network monitor like Iris I can see that the data is returned perfectly...but Internet Explorer refuses to display it. This problem my apply to other error codes. The only fix I found is to use a fully qualified host redirect for the ErrorDocument.. but then I lose fancy stuff like previous request analysis. Any ideas? You error response size should be more then 512 bytes: http://support.microsoft.com/support/kb/articles/Q294/8/07.ASP Igor Sysoev http://sysoev.ru
Re: separating C from V in MVC
Perrin Harkins writes: You can actually do that pretty comfortably with Template Toolkit. You could use a filter for example, which might look like this: [% FILTER font('my_first_name_font') %] ... some text, possibly with other template directives in it... [% END %] One of the reasons Perl is popular is its idioms. Having to say something in three lines is not as idiomatic as one line. It takes a lot of discipline to use it everywhere. In other words, I don't think the above is more comfortable than: String(['User.first_name'], 'my_first_name_font'); Note also the accessor for User.first_name in Template Toolkit is probably nontrivial. Rob
Re: [2.x] test fails on win32 version 1.99_02
On Mon, 3 Jun 2002, pascal barbedor wrote: on win2k, perl 5.6.1, apache 2.036 i can successfully comile mod_perl-1.99_02 just released with as many flags as desired for instance MP_DEBUG now works but nmake test fails to start apache. with 2.0.36 there is a segfault and with 2.0.37-dev (last cvs) a transferlog directive not understood by the server (which prevents to start) I was having troubles too on Win32 with mod_perl-2 and perl-5.6.1 of late, which seems to be fixed in perl-5.8-tobe. Maybe trying that helps? best regards, randy kobes
Re: [2.x] test fails on win32 version 1.99_02
ok to try with perl 5.8.0 but i have many modules installed with ppm from http://theoryx5.uwinnipeg.ca/ppmpackages and those of activestate perl. I am able to install ppm package to a perl 5.8.0 i compile myself , without activestate ppm ? for instance modules that rely on a binary library like XML::LibXML or XML::Parser, and that don't install on win32 with usual perl makefile.pl etc thanks pascal - Original Message - From: Randy Kobes [EMAIL PROTECTED] To: pascal barbedor [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, June 03, 2002 5:15 PM Subject: Re: [2.x] test fails on win32 version 1.99_02 On Mon, 3 Jun 2002, pascal barbedor wrote: on win2k, perl 5.6.1, apache 2.036 i can successfully comile mod_perl-1.99_02 just released with as many flags as desired for instance MP_DEBUG now works but nmake test fails to start apache. with 2.0.36 there is a segfault and with 2.0.37-dev (last cvs) a transferlog directive not understood by the server (which prevents to start) I was having troubles too on Win32 with mod_perl-2 and perl-5.6.1 of late, which seems to be fixed in perl-5.8-tobe. Maybe trying that helps? best regards, randy kobes
htaccess, rewrite and redirect help please
Title: htaccess, rewrite and redirect help please Hi all, I'm so new to this, please excuse me if i'm off base. I'm trying to write an htaccess script which will essentially say If you're from this web page you get rejected, but all other web page requests go here: This is what i pieced together: - AuthUserFile /dev/null AuthGroupFile /dev/null RewriteEngine On RewriteCond %{HTTP_REFERER} ^http://www.unauthorized_site.com/index.html [NC] RewriteRule /* http://www.my_site.com/access/go_away.html [R,L] Redirect http://www.my_site.com/hello.html - Am i on track? Thanks, Paul -- == http://www.StuckMic.com/america -- The American Code Remembering the attack on America http://www.StuckMic.com -- MIVA Powered Aviation and Air Traffic Control discussion and chat. http://www.WavSounds.com -- Thousands of funny wavs, fully searchable.
Re: Generating dynamic VirtualHost and Location directives and reloading Apache configuration
Mathieu Jondet [EMAIL PROTECTED] wrote: Hi all, I'm actually working on a application for generating dynamic virtual host and locations in these virtual host from a web interface. The purpose of this application is to give a non-administrator the possibility of adding on the fly virtualhost to a webserver without modifying httpd.conf and to add locations to a specific virtualhost. So far I've manage to do the part of generating the httpd.conf file through Perl sections which takes all the necessary data from a MySQL server. The tricky part is to update the server configuration without having to restart the server. I've looked on the web and in the archives of the mailing list and found things about using the PerlInitHandler and sending Apache a SIGUSR1 signal. I don't know how to do this as I'm quite new to the mod_perl programming. I would also want to know if it won't be too slow to check the modifications times of the config in the database at each client request. Do you have any other idea of doing this ? What will be the more efficient way to update my configuration against a database ? Thanks for answers and ideas, I'm working on the design of something similar -- right now I'm doing a config file that will (hopefully) allow configuration of Apache 2 or Apache 1.3 (Apache 2 as front SSL proxy and Apache 1.3 as backend application server) depending on which role it is playing. I still have some studying and playing to do to see if this is possible. If Apache 1.3 is in both roles, I know it is possible. side note Apache 2 with mod_perl should not be an expensive proxy (compared to Apache 1.3/mod_perl or even Apache 2 without mod_perl). It can be configured to have no more than one Perl interpreter, regardless of the number of threads. It might be possible to configure it with zero perl interpreters and only use Perl during the configuration. Of course, Apache 2/mod_perl isn't quite production-quality, yet. /side note Instead of doing expensive checks, the page that is used to manage the configuration information in the database can detect changes and either send the appropriate signals or provide a button the user can use when they are finished making changes to send the signals (I'm also having to make this work in a distributed environment---a.k.a., a web farm). The same script can also do any checking of configuration files (run them through the appropriate Apache with the -c flag). -- James Smith [EMAIL PROTECTED], 979-862-3725 Texas AM CIS Operating Systems Group, Unix
Re: separating C from V in MVC
On Mon, 3 Jun 2002, Rob Nagler wrote: Date: Mon, 3 Jun 2002 08:09:12 -0600 From: Rob Nagler [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: separating C from V in MVC Perrin Harkins writes: You can actually do that pretty comfortably with Template Toolkit. You could use a filter for example, which might look like this: [% FILTER font('my_first_name_font') %] ... some text, possibly with other template directives in it... [% END %] One of the reasons Perl is popular is its idioms. Having to say something in three lines is not as idiomatic as one line. It takes a lot of discipline to use it everywhere. In other words, I don't think the above is more comfortable than: String(['User.first_name'], 'my_first_name_font'); Note also the accessor for User.first_name in Template Toolkit is probably nontrivial. Rob Not to see this discussion devolve into Yet Another Template War, but there's more than one way to do filters in Template Toolkit: [% User.first_name | my_filter %] Add to the handy pipe syntax the number of built-in filters (esp. the html and uri ones), and you get a large amount of convenience because you don't have to pre-format your data before passing it to a template (which seems to more strongly couple to the C to the V). It's just my opinion, baby, I may be right or wrong. -- Robert Johnson ky
Re: htaccess, rewrite and redirect help please
At 17:54 03.06.2002, Paul Williams wrote: Hi all, I'm so new to this, please excuse me if i'm off base. I'm trying to write an htaccess script which will essentially say If you're from this web page you get rejected, but all other web page requests go here: Sorry, but this is specific to Apache, not to mod_perl. Look at Apache mailing lists or newsgroups for answers: http://httpd.apache.org/lists.html#http-users -- Per Einar Ellefsen [EMAIL PROTECTED]
Re: separating C from V in MVC
Rob Nagler wrote: Perrin Harkins writes: You can actually do that pretty comfortably with Template Toolkit. You could use a filter for example, which might look like this: [% FILTER font('my_first_name_font') %] ... some text, possibly with other template directives in it... [% END %] One of the reasons Perl is popular is its idioms. Having to say something in three lines is not as idiomatic as one line. It takes a lot of discipline to use it everywhere. In other words, I don't think the above is more comfortable than: String(['User.first_name'], 'my_first_name_font'); The advantage is that my example can contain other templating code: [% FILTER font('basic_info_font') %] Hello [% User.first_name %]!BR [% IF User.accounts %] You have these accounts:BR [% FOREACH User.accounts %] [% name %]: [% balance %]BR [% END %] [% END %] [% END %] Unless I'm missing something about your example, the FILTER concept seems more powerful. It is perfectly possible to simply add a plugin to TT to make it look like yor example though: [% String(User.first_name, 'my_first_name_font') %] Note also the accessor for User.first_name in Template Toolkit is probably nontrivial. Assuming it's just $User-first_name() and you passed in $User as part of your data to the view, there's no additional work. - Perrin
mod_perl netscape problem
Hi I have the following problem with my mod_perl setup (apache 1.3.24 server + proxied mod_perl server 1.26, more or less standard Mandrake 8.2): Pages that go through the mod_perl server have 'strange' strings at the top and the bottom, when you view them with Netscape 4.x (any OS, it seems). Also, the page does not stop loading. This does not happen with other browsers (Mozilla 1RC2, IE 5, Opera 6). An example can be found at http://www.iyengar-yoga.com/forum/ Does anyone know what cause of this could be? My apologies if this has been asked before, I searched the archives, but didn't find anything. Thanks for your help. Regards, Ivan Herger
RE: [2.x] test fails on win32 version 1.99_02
reetings. ok to try with perl 5.8.0 but i have many modules installed with ppm from http://theoryx5.uwinnipeg.ca/ppmpackages and those of activestate perl. I am able to install ppm package to a perl 5.8.0 i compile myself , without activestate ppm ? for instance modules that rely on a binary library like XML::LibXML or XML::Parser, and that don't install on win32 with usual perl makefile.pl etc I have been trying 5.8RC1 and I tried to compile/install several modules that I have on 5.6.1 - CPAN, not PPM. At least the following do not build and/or test right (not exhaustive, as I got tired after a while): TK # C error Archive::Tar # in getting file handles from zlib PPM # depends on the above MLDBM# de/serilized structures do not compare on tests Devel::TraceLoad # ?? Module::Info # Serious? Win32::API # Serious? C diagnostic libxml-perl # Fails test XML-RSS # contains XML::RSS.3 in man, unpack fails - builds otherwise. Other related modules build e.g.: XML:Parse builds/test Compress::Zlib builds/test (after some pain...) Posted in the hope it may help somebody... Cheers, alf
Re: [2.x] test fails on win32 version 1.99_02
I have been trying 5.8RC1 and I tried to compile/install several modules that I have on 5.6.1 - CPAN, not PPM. At least the following do not build and/or test right (not exhaustive, as I got tired after a while): TK # C error Archive::Tar # in getting file handles from zlib PPM # depends on the above MLDBM# de/serilized structures do not compare on tests Devel::TraceLoad # ?? Module::Info # Serious? Win32::API # Serious? C diagnostic libxml-perl # Fails test XML-RSS # contains XML::RSS.3 in man, unpack fails - builds otherwise. Other related modules build e.g.: XML:Parse builds/test Compress::Zlib builds/test (after some pain...) Posted in the hope it may help somebody... Cheers, alf as mentioned in the 580 announce, every module based on xs have to recompile the xs . so it is hopeless to install a 561 module based on xs in 580 (for example win32::API) running nmake test with 580 (to test modperl-1.99_02) asks for win32::process in INC this is in libperlwin32 and it requires win32::API. then I don't see how to test 1.99_02 with perl 580 ... cheers pascal
Re: AuthzHandler, index.html not being accessed
A note: since cookie is involved, why not to implement all the access/authentication/authurization functions at the access control phase using cookie ? I've got them split out to match the phase in which they'd be invoked. That, and the fact that the access handler will be invoked everywhere, but the authorization handler may be different based on the application being protected. Back to the original problem: it all boils down to the Authz handler. When it's activated via 'require', directory indexes are not generated. Remove the require, and *poof*, you get directory indexes. Peter I've got an interesting problem, related to my development of some Authen/Authz handlers. I have a directory on which I've installed an Access, Authen, and Authz handler: - the Access handler makes sure a cookie exists, and redirects the user to a login page if it doens't. If the cookie does exist, populate $r-connection-user. This works. - Authen handler currently returns OK - it will be used to validate the user as stored in the cookie If I 'require valid-user' in the directory, my authz handler doesn't get invoked, which I expect. However, If I request the directory (ie. /test/) I get a directory listing instead of index.html. If I take out the require, thereby bypassing authen/authz, I get index.html. If I also put in custom 'requires', my authz handler is invoked, and the same thing happens. So, it seems that when OK is returned from an authz handler, the DirectoryIndex is not being read. I've been unsucessful in trying to find a solution. Ideas? -klm. BTW, I understand that what I'm doing does appear to be similar to Apache::AuthCookie, but I have a few different requirements that I need to incorporate
Re: Problem: Internal redirection of ErrorDocument to mod_perl handler
At 15:42 03.06.2002, Igor Sysoev wrote: On Sat, 1 Jun 2002, Richard Clarke wrote: Before I present a detailed description of the problem I thought I'd just bounce of an intro to see if its a common fault. I have found, using apache 1.x latest and mod_perl 1.x latest that if I use internal redirection to a mod_perl handler for ErrorDocument 500 (server_error) then even though I return the perfectly correct data (html headers etc) to the browser, every browser works fine. Except that is, Internet Explorer 6 (maybe earlier too but I have no test bed). Internet Explorer chooses to display the default Microsoft internal server error page and not the html which is actually returned. If I use a network monitor like Iris I can see that the data is returned perfectly...but Internet Explorer refuses to display it. This problem my apply to other error codes. The only fix I found is to use a fully qualified host redirect for the ErrorDocument.. but then I lose fancy stuff like previous request analysis. Any ideas? You error response size should be more then 512 bytes: http://support.microsoft.com/support/kb/articles/Q294/8/07.ASP I just added a note about this in the documentation, under docs/tutorials/browserbugs. I had encountered this error before, and it seems like a surprising enough pitfall to be documented. -- Per Einar Ellefsen [EMAIL PROTECTED]
[DIGEST] mod_perl digest 2002/05/06
-- mod_perl digest May 6, 2002 - June 2, 2002 -- Recent happenings in the mod_perl world... *** Note the updates to the mod_perl versions Features o mod_perl status o module announcements o application announcements o module rfcs o available mod_perlers o mod_perlers needed 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.24 (released March 21, 2002) [3] - development: 1.3.25-dev [4] o mod_perl 2.0 - beta: 1.99_02 (released June 1, 2002) [5] - development: (cvs only) [6] o Apache 2.0 - stable: 2.0.35 (released April 5, 2002) [7] o Perl - stable: 5.6.1 (released April 9, 2001) [8] - development: 5.7.3 [9] module announcements o Apache::ASP 2.35 - provide Perl-based ASP support for Apache [10] o CGI::Application 2.4 - tries to make creation of sophisticated, reusable web-based applications easier [11] application announcements o OpenInteract 1.40 - web application environment [12] module rfcs o Apache::AuthTicketPlus [13] o Apache::DefaultCharset [14] o Apache::DigestAPI [15] available mod_perlers o mod_perl/sys admin/ etc. in Toronto [16] mod_perlers needed o mod_perl/sys admin/html tech support [17] mailing list highlights o New subject tag for mod_perl 2.x postings [18] o Model/View/Controller discussions [19] [20] o RFC concerning completeness of Apache/Perl module list [21] o RFC concerning automatic image generation [22] o RFC for information from all contributers [23] links o The Apache/Perl Integration Project [24] o mod_perl documentation [25] o Apache modules on CPAN [26] o mod_perl homepage [27] o mod_perl news and advocacy [28] o mod_perl list archives - modperl@ [29] [30] - dev@ [31] [32] - docs-dev@ [33] - advocacy@ [34] happy mod_perling... --James [EMAIL PROTECTED] -- [1] http://perl.apache.org/dist/ [2] http://perl.apache.org/from-cvs/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_01.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/devel.tar.gz [10] http://mathforum.org/epigone/modperl/keuspinbay [11] http://mathforum.org/epigone/modperl/khilprixzhun [12] http://mathforum.org/epigone/modperl/homchansni [13] http://mathforum.org/epigone/modperl/kerdswoystimp [14] http://mathforum.org/epigone/modperl/staysnaxstrex [15] http://mathforum.org/epigone/modperl/welindex [16] http://mathforum.org/epigone/modperl/skergreestroa [17] http://mathforum.org/epigone/modperl/twusmahgron [18] http://mathforum.org/epigone/modperl/pleldprungcro [19] http://mathforum.org/epigone/modperl/zeldnamkham [20] http://mathforum.org/epigone/modperl/jilgygland [21] http://mathforum.org/epigone/modperl/zolfrehdral [22] http://mathforum.org/epigone/modperl/sloycronmai [23] http://mathforum.org/epigone/modperl/dingzhoumu [24] http://perl.apache.org/ [25] http://perl.apache.org/#docs [26] http://www.cpan.org/modules/by-module/Apache/ [27] http://www.modperl.com/ [28] http://www.take23.org/ [29] http://mathforum.org/epigone/modperl/ [30] http://marc.theaimsgroup.com/?l=apache-modperlr=1w=2 [31] http://marc.theaimsgroup.com/?l=apache-modperl-devr=1w=2 [32] http://www.mail-archive.com/dev%40perl.apache.org/ [33] http://perl.apache.org/mail/docs-dev/ [34] http://www.mail-archive.com/advocacy@perl.apache.org/
rfc Apache::Dynagzip
Hello everyone, Finally, I'm going to upload the Apache::Dynagzip 0.03 to CPAN by the evening of June 4-th. I'm not sure about the quality of my documentation yet. It's available now at http://devl4.outlook.net/devdoc/Dynagzip/Dynagzip.htmlfor preview. I would appreciate any comments in order to fix something important before the first upload. Thanks in advance, Slava
DBI Bug
hi, sorry my english ;) when i add this line in httpd.conf PerlModule DBI or use DBI(); in startup.conf apache dont start, i receive this error: /usr/local/apache-2.0/bin/apachectl: line 192: 12547 Segmentation fault $HTTPD /usr/local/apache-2.0/bin/apachectl start: httpd could not be started i test it in Apache 2.0/Perl 5.8.0RC1/Modperl 1.99.02/03 Apache 2.0/Perl 5.7.3/Modperl 1.99.02/03 Apache 2.0/Perl 5.6.1/Modperl 1.99.02/03 Apache 2.0-cvs/All Perls/All Modperls :/
Re: DBI Bug
And you are sure that the CGI module is installed on the machine, right? perl -e 'use CGI;' from the command-line will tell you. -Fran Udlei Nattis wrote: hi, sorry my english ;) when i add this line in httpd.conf PerlModule DBI or use DBI(); in startup.conf apache dont start, i receive this error: /usr/local/apache-2.0/bin/apachectl: line 192: 12547 Segmentation fault $HTTPD /usr/local/apache-2.0/bin/apachectl start: httpd could not be started i test it in Apache 2.0/Perl 5.8.0RC1/Modperl 1.99.02/03 Apache 2.0/Perl 5.7.3/Modperl 1.99.02/03 Apache 2.0/Perl 5.6.1/Modperl 1.99.02/03 Apache 2.0-cvs/All Perls/All Modperls :/
Re: DBI Bug
Hi! On Mon, Jun 03, 2002 at 03:40:57PM -0300, Udlei Nattis wrote: PerlModule DBI .. i test it in Apache 2.0/Perl 5.8.0RC1/Modperl 1.99.02/03 Apache 2.0/Perl 5.7.3/Modperl 1.99.02/03 Apache 2.0/Perl 5.6.1/Modperl 1.99.02/03 Apache 2.0-cvs/All Perls/All Modperls I'm not sure if Apache::DBI has already been ported to mod_perl 2.0 You could try to use Apache::compat You DO know that mod_perl 2.0 is still in BETA and that you should use mod_perl 1.27 in a production environment? -- D_OMM + http://domm.zsi.at -+ O_xyderkes | neu: Arbeitsplatz | M_echanen | http://domm.zsi.at/d/d162.html | M_asteuei ++
Re: separating C from V in MVC
I really enjoyed this topic... I hope you guys are planning on actually documenting your ideas. I would love to read and learn more about this topic. -r
Re: separating C from V in MVC
Perrin Harkins writes: The advantage is that my example can contain other templating code: [% FILTER font('basic_info_font') %] Hello [% User.first_name %]!BR [% IF User.accounts %] You have these accounts:BR [% FOREACH User.accounts %] [% name %]: [% balance %]BR [% END %] [% END %] [% END %] Unless I'm missing something about your example, the FILTER concept seems more powerful. [Skirting on the edge of YATW. :-] I think they are equivalent as far as power. I go back to why people use Perl, because it makes the easy jobs easy and the hard jobs possible. All programming languages are Turing Complete, but we don't like programming Turing Machines. Here's your expanded example in widgets: String(Prose('EOF'), 'basic_info_font'); Hello String(['Model.User', 'first_name']);!br If(['Model.AccountList', '-get_result_set_size'], Join([ You have these accounts:br, Table('Model.AccountList', [ 'name', 'balance', ]), ]), ); EOF The Table widget will print a table with headings defined by the Facade (our term for skin). The widgets for name and balance are looked up dynamically. balance will be right adjusted. Unless I missing something, the template example won't align properly in HTML. This is a significant semantic difference between FOREACH and Table. Would you expand on the example so that name and balance are columnar? Rob
Re: AuthzHandler, index.html not being accessed
Ken: back to your original problem. Maybe you should disbale the default index list by comment out Options Indexes in your httpd.conf, so as to isolate the problem: if it is authz related or not at all. Peter A note: since cookie is involved, why not to implement all the access/authentication/authurization functions at the access control phase using cookie ? I've got them split out to match the phase in which they'd be invoked. That, and the fact that the access handler will be invoked everywhere, but the authorization handler may be different based on the application being protected. Back to the original problem: it all boils down to the Authz handler. When it's activated via 'require', directory indexes are not generated. Remove the require, and *poof*, you get directory indexes. Peter I've got an interesting problem, related to my development of some Authen/Authz handlers. I have a directory on which I've installed an Access, Authen, and Authz handler: - the Access handler makes sure a cookie exists, and redirects the user to a login page if it doens't. If the cookie does exist, populate $r-connection-user. This works. - Authen handler currently returns OK - it will be used to validate the user as stored in the cookie If I 'require valid-user' in the directory, my authz handler doesn't get invoked, which I expect. However, If I request the directory (ie. /test/) I get a directory listing instead of index.html. If I take out the require, thereby bypassing authen/authz, I get index.html. If I also put in custom 'requires', my authz handler is invoked, and the same thing happens. So, it seems that when OK is returned from an authz handler, the DirectoryIndex is not being read. I've been unsucessful in trying to find a solution. Ideas? -klm. BTW, I understand that what I'm doing does appear to be similar to Apache::AuthCookie, but I have a few different requirements that I need to incorporate
Re: [2.x] test fails on win32 version 1.99_02
On Monday, 2002-06-03 at 18:32:54 +0200, Alessandro Forghieri wrote: reetings. :-) I have been trying 5.8RC1 and I tried to compile/install several modules that I have on 5.6.1 - CPAN, not PPM. At least the following do not build and/or test right (not exhaustive, as I got tired after a while): TK # C error Archive::Tar # in getting file handles from zlib PPM # depends on the above MLDBM# de/serilized structures do not compare on tests Devel::TraceLoad # ?? Module::Info # Serious? Win32::API # Serious? C diagnostic libxml-perl # Fails test XML-RSS # contains XML::RSS.3 in man, unpack fails - builds otherwise. Posted in the hope it may help somebody... Can you please send a detailed report to the perl5porters list? [EMAIL PROTECTED] and the module authors? Please include the version numbers and all error messages. I know that Nick Ing-Simmons has tested 5.8.0RC1 with Tk, but maybe you used a lower rev version than his. I have tried Tk myself with a patchlevel a few days before RC1 happened, and it was OK. On Linux, not Windows. Thanks a lot, Lupe Christoph -- | [EMAIL PROTECTED] | http://www.lupe-christoph.de/ | | I have challenged the entire ISO-9000 quality assurance team to a | | Bat-Leth contest on the holodeck. They will not concern us again. | | http://public.logica.com/~stepneys/joke/klingon.htm|
Re: separating C from V in MVC
Rob Nagler wrote: [Skirting on the edge of YATW. :-] I certainly don't mean to have a templating war. I'm just trying to figure out what the difference is between these approaches and if there's something I've been missing that I should consider adding to future applications. Here's your expanded example in widgets: String(Prose('EOF'), 'basic_info_font'); Hello String(['Model.User', 'first_name']);!br If(['Model.AccountList', '-get_result_set_size'], Join([ You have these accounts:br, Table('Model.AccountList', [ 'name', 'balance', ]), ]), ); EOF If your String widget can accept other widgets recursively like this, then our examples are equivalent. I thought it was limited to a simple value. Unless I missing something, the template example won't align properly in HTML. This is a significant semantic difference between FOREACH and Table. I just didn't put in any fancy HTML in my example. I could have put in table tags right there, or made a macro if that table gets repeated a lot. Looks to me like they work the same. In TT, I would probably use macros or small templates (possibly defined in this same template file at the top) for little repeating chunks, and filters or plugins for things with more brains, like the String widget that decides whether or not it needs to print FONT tags. - Perrin
Re: AuthzHandler, index.html not being accessed
That's exactly what I did. When the authz handler is installed, I get the directory listing; when it's uninstalled, I get 'Access Denied due to rule'. In neither instance does index.html get displayed. Very strange. I can code around it by turning off indexes and always referencing index.html, but I'd rather not, since this problem might be masking a greater problem. -klm. - Original Message - From: [EMAIL PROTECTED] To: Ken Miller [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, June 03, 2002 1:50 PM Subject: Re: AuthzHandler, index.html not being accessed Ken: back to your original problem. Maybe you should disbale the default index list by comment out Options Indexes in your httpd.conf, so as to isolate the problem: if it is authz related or not at all. Peter A note: since cookie is involved, why not to implement all the access/authentication/authurization functions at the access control phase using cookie ? I've got them split out to match the phase in which they'd be invoked. That, and the fact that the access handler will be invoked everywhere, but the authorization handler may be different based on the application being protected. Back to the original problem: it all boils down to the Authz handler. When it's activated via 'require', directory indexes are not generated. Remove the require, and *poof*, you get directory indexes. Peter I've got an interesting problem, related to my development of some Authen/Authz handlers. I have a directory on which I've installed an Access, Authen, and Authz handler: - the Access handler makes sure a cookie exists, and redirects the user to a login page if it doens't. If the cookie does exist, populate $r-connection-user. This works. - Authen handler currently returns OK - it will be used to validate the user as stored in the cookie If I 'require valid-user' in the directory, my authz handler doesn't get invoked, which I expect. However, If I request the directory (ie. /test/) I get a directory listing instead of index.html. If I take out the require, thereby bypassing authen/authz, I get index.html. If I also put in custom 'requires', my authz handler is invoked, and the same thing happens. So, it seems that when OK is returned from an authz handler, the DirectoryIndex is not being read. I've been unsucessful in trying to find a solution. Ideas? -klm. BTW, I understand that what I'm doing does appear to be similar to Apache::AuthCookie, but I have a few different requirements that I need to incorporate
Re: mod_perl netscape problem
there is a bug in the proxy server for apache_1.3.24. i am not familiar with mandrake, but hopefully they have an upgrade. if not, you will need to rebuild from source rpms and apply this patch. http://apache.valueclick.com/dist/httpd/patches/apply_to_1.3.24/proxy_http1.1_chunking.patch Iyengar Yoga Resources wrote: Hi I have the following problem with my mod_perl setup (apache 1.3.24 server + proxied mod_perl server 1.26, more or less standard Mandrake 8.2): Pages that go through the mod_perl server have 'strange' strings at the top and the bottom, when you view them with Netscape 4.x (any OS, it seems). Also, the page does not stop loading. This does not happen with other browsers (Mozilla 1RC2, IE 5, Opera 6). An example can be found at http://www.iyengar-yoga.com/forum/ Does anyone know what cause of this could be? My apologies if this has been asked before, I searched the archives, but didn't find anything. -- ___cliff [EMAIL PROTECTED]http://www.genwax.com/
Re: mod_perl netscape problem
Hi, -- Iyengar Yoga Resources [EMAIL PROTECTED] wrote: Pages that go through the mod_perl server have 'strange' strings at the top and the bottom, when you view them with Netscape 4.x (any OS, it seems). Also, the page does not stop loading. This does not happen with other browsers (Mozilla 1RC2, IE 5, Opera 6). An example can be found at beside the already described Proxy bug i realized the following bug in Netscape: If you didn't print out the Content-Length header, Netscape 4.x destroys the page, if there are some JavaScripts (at least with document.write) inside: the document.write goes to a nearly random part of the HTML file(!) and often breaks the code. Including Content-Length in the headers fixes this. Ciao Alvar -- // Unterschreiben! http://www.odem.org/informationsfreiheit/ // Internet am Telefon: http://www.teletrust.info/ // Das freieste Medium? http://www.odem.org/insert_coin/ // Blaster: http://www.assoziations-blaster.de/
Re: Apache-server_root_relative(); not found
Yes, I'm running it under mod_perl/1.27 which I compiled as a DSO with apxs. This also gave me errors under 1.25, I just pushed INC to solve it but I would like to use server_root_relative. I have it in a startup script, the one from the eagle book. It goes like: #! /usr/bin/perl BEGIN { use Apache (); use lib Apache-server_root_relative('lib/perl'); } use Apache::Registry (); use Apache::Constants (); use CGI qw(-compile :all); use CGI::Carp (); use DBI (); 1; Which I had it to change to: push(INC, '/Library/www/lib/perl'); because the server_root_relative gave me errors. I read some where that in order to test with startup scripts you need to use the Apache::FakeRequest? Even if so, if I ignore the errors and just restart apache, it wont find 'lib/perl', so I have to push INC manually then do a graceful restart for it to work. I am running OSX 10.1.4/Darwin. Dont think that has anything to do with it though.
Re: rfc Apache::Dynagzip
Hello, -- Slava Bizyayev [EMAIL PROTECTED] wrote: Finally, I'm going to upload the Apache::Dynagzip 0.03 to CPAN by the evening of June 4-th. I'm not sure about the quality of my documentation yet. the documentation looks very complete :-) Do you provide also an interface as replacement for $r-print(Bla foobar)? This might be useful for mod_perl applications which want all the control over the output and no second output handler ... [from the documentation:] This type of compression is applied when the client is recognized as being able to decompress gzip format on the fly. In this version the decision is under the control of whether the client sends the Accept-Encoding: gzip HTTP header, or not. (Please, let me know if you have better idea about that...) The last years I experimented a lot with gzipped output and wrote my own gzipping output function (but without chunked encoding :-) ). I realized a lot of bugs with some different browsers under some environments or situations. I found no remarks according this in your documentation, so perhaps you missed something? (if I missed something, feel free to write ;-) ) So, e.g. I created a website with a big server generated flash movie (with Flash generator, mod_perl, Postgres; yep, Flash sucks!), and Netscape doesn't decompress the output, but claims to understand gzip. AARRGH! Also compressed output does not work on IE, if the request was POSTed (only tested with older version, I gess 4.0, of IE). So here is the part out my output function with the gzip stuff: =item gzip encoding in output gzip compression is enabled when: - browser acceps gzip - or browser is an Bugscape 4.x on X11 or Mac but gzip is DISABLED when: - method is not GET: at least on some versions of IE (4.x), compressed pages didn't work together with POST! - every image/* content type needs no gzip (at least GIF and JPEG ...) - browser is not compatible and Content-Type is not text/html, even if browser said that he understand gzip At least Bugscape 4.x didn't decompress embedded objects like flash movies - if the flag $out-{nogzip} is true, disable gzip ... (AUTHOR: Alvar Freude, [EMAIL PROTECTED], http://alvar.a-blast.org/) =cut # Important: we change output # according to this headers $r-header_out('Vary', 'Accept-Encoding, User-Agent'); # Cache this header line ... my $encoding = $r-header_in(Accept-Encoding); # Lets Start the if monster ... if (!$out-{nogzip} # only without nogzip-flag ($r-method() eq 'GET')# and with GET Method ($browser =~ /compatible/i ? # is it an compatible browser? $content_type !~ /^image/ : # then compress unless images $content_type eq text/html # else only gzip text/html ) # and understand the browser gzip? # Version 1: he said yes (defined($encoding) index($encoding, gzip) = 0 || ($browser =~ m{ # version 2: ^Mozilla/# it is a Mozilla 4.x ... \d+ \. (\d+) [\s\[\]\w\-]+ ( \(X11 | # On X11 Macint.+PPC,\sNav # Or Mac/PPC ) }x $1 $1 == 4 $browser !~ /compatible/i) )) { $r-content_encoding('gzip');# Compress it with GZIP ${ $out-{document} } = Compress::Zlib::memGzip($out-{document}); } # don't forget Content-Length! # it enables keepalive and disables # some Netscape bugs $r-header_out('Content-Length', length(${ $out-{document} })); $r-send_http_header; # Now we can send the headers ... # And the Data, if needed. $r-print(${ $out-{document} }) unless $r-header_only; $r-rflush(); # Flush all, so we can do additional # stuff like mail delivery and all # data is sent out Ciao Alvar -- // Unterschreiben! http://www.odem.org/informationsfreiheit/ // Internet am Telefon: http://www.teletrust.info/ // Das freieste Medium? http://www.odem.org/insert_coin/ // Blaster: http://www.assoziations-blaster.de/
Re: Apache-server_root_relative(); not found
On Mon, 3 Jun 2002, m31 wrote: Yes, I'm running it under mod_perl/1.27 which I compiled as a DSO with apxs. This also gave me errors under 1.25, I just pushed @INC to solve it but I would like to use server_root_relative. I have it in a startup script, the one from the eagle book. It goes like: #! /usr/bin/perl BEGIN { use Apache (); use lib Apache-server_root_relative('lib/perl'); } use Apache::Registry (); use Apache::Constants (); use CGI qw(-compile :all); use CGI::Carp (); use DBI (); 1; Which I had it to change to: push(@INC, '/Library/www/lib/perl'); because the server_root_relative gave me errors. I read some where that in order to test with startup scripts you need to use the Apache::FakeRequest? Even if so, if I ignore the errors and just restart apache, it wont find 'lib/perl', so I have to push @INC manually then do a graceful restart for it to work. I am running OSX 10.1.4/Darwin. Dont think that has anything to do with it though. There are two separate issues here: 1. you try to test perl code which only runs under mod_perl. but according to your report you don't have a problem calling server_root_relative() when you start the server. So this is not a problem, right? 2. your problem is that Apache-server_root_relative('lib/perl') doesn't return what you expect. Is your ServerRoot set to '/Library/www'? __ 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-server_root_relative(); not found
At 02:16 04.06.2002, m31 wrote: I am running OSX 10.1.4/Darwin. Dont think that has anything to do with it though. It might. It has been stated on the dev list that the lib pragma has a problem under Darwin. Could you try: BEGIN { unshift @INC, Apache-server_root_relative('lib/perl'); } ? -- Per Einar Ellefsen [EMAIL PROTECTED]