INSTALL.simple.mod_ssl
I'm trying to install from source apache + mod_perl + mod_ssl. I couldn't make it following the steps of INSTALL.simple.mod_ssl I also tried with the online guide unsuccessfully. Anyway here is how I did it step by step: cd mod_ssl* ./configure --with-apache=../apache_1.3.28 cd .. cd apache_* ./configure cd .. cd mod_perl* perl Makefile.PL APACHE_SRC=../apache_1.3.28/src NO_HTTPD=1 \ USE_APACI=1 PREP_HTTPD=1 EVERYTHING=1 make cd .. cd apache_* ./configure --prefix=/usr/local/apache \ --activate-module=src/modules/perl/libperl.a \ --activate-module=src/modules/ssl/libssl.a \ --enable-module=rewrite make make install
Re: binary cgi mess ( repost )
Francesc Guasch [EMAIL PROTECTED] wrote: I have a mod_perl server and I need to add a cgi application outside mod_perl, nagios. I followed the guide and when I try to use the cgis, the binary files are displayed instead of executed. Frank Maas wrote: Comparing your post and that of others, I see that you use Authentication through mod_perl. What happens if you completely disable Authentification? Do you still experience the same nice try Frank. I didn't think about it. I added basic auth from a passwd file. I made sure the password was different so I was using the new config. I'm afraid it didn't help, what a pity. -- frankie
Re: binary cgi mess ( repost )
Nikolaus Rath wrote: Francesc Guasch [EMAIL PROTECTED] wrote: Location /nagios/cgi-bin Options ExecCGI /Location Alias /nagios/ /usr/share/nagios/ Directory /usr/share/nagios/ AllowOverride AuthConfig Options None I suspect that the Options directive in the directory section overwrites the one in the location directive. It doesn't matter that the Location is more specific because it is evaluated earlier in the request loop. Nice try, I added Options ExecCGI in both Directories, but it does the same. I make sure it isn't cached using wget for reading the page. -- frankie
Re: binary cgi mess ( repost )
Abdul-wahid Paterson wrote: Hi, Thank you again for answering me, Abdul-wahid. This is the config I have for nagios on one of my servers. I also have mod_perl working so there should be no problem with the two together. (My directory paths are different to yours but the principle is the same) I tried the same configuration options as you, and it keeps doing it bad. Maybe it isn't mod_perl related and I should ask in an apache list. -- frankie
binary cgi mess ( repost )
I posted this, I received a couple of answers but the problem is still unsolved. I have a mod_perl server and I need to add a cgi application outside mod_perl, nagios. I followed the guide and when I try to use the cgis, the binary files are displayed instead of executed. I tried the same in another apache server without Mason and it worked well. So I think something of my config must be messing it. I made sure the mason handler wasn't in the middle. I added a debugging line in the very beginning of it. I added this to the config file, suggested by Abdul-Wahid AddHandler cgi-script .cgi Then he the binary wasn't displayed in the browser, but downloaded. ( A save dialog was showed ). Here is the config for apache: AddType application/x-httpd-cgi .cgi ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi/ Location /nagios/cgi-bin Options ExecCGI /Location Directory /usr/lib/nagios/cgi/ AllowOverride AuthConfig Options ExecCGI order deny,allow deny from all allow from ip_removed /Directory Alias /nagios/ /usr/share/nagios/ Directory /usr/share/nagios/ AllowOverride AuthConfig Options None order deny,allow deny from all allow from ip_removed /Directory use Apache::AuthDBI; any hints ? Thank you for your time. -- frankie
binary cgi mess
I have a mod_perl server and I need to add a cgi application outside mod_perl, nagios. I followed the guide and when I try to use the cgis, the binary files are downloaded instead of executed. I tried the same in another apache server without Mason and it worked well. So I think something of my config must be messing it. I made sure the mason handler wasn't in the middle. I added a debugging line in the very beginning of it. Here is the nagios config for apache: AddType application/x-httpd-cgi .cgi ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi/ Location /nagios/cgi-bin Options ExecCGI /Location Directory /usr/lib/nagios/cgi/ AllowOverride AuthConfig Options ExecCGI order deny,allow deny from all allow from ip_removed /Directory Alias /nagios/ /usr/share/nagios/ Directory /usr/share/nagios/ AllowOverride AuthConfig Options None order deny,allow deny from all allow from ip_removed /Directory use Apache::AuthDBI; any hints ? Thank you for your time. -- frankie
Re: binary cgi mess
Abdul-wahid Paterson wrote: Hi, Shouldn't it be AddHandler cgi-script .cgi Well, thank you for trying. I replaced the line: AddType application/x-httpd-cgi .cgi for the one you told me, now the binary file isn't displayed in the browser, but it prompts me to download it. So it isn't executed in the server. I also tried to have both lines with the same results. On Thu, 2003-03-13 at 10:53, Francesc Guasch wrote: I have a mod_perl server and I need to add a cgi application outside mod_perl, nagios. I followed the guide and when I try to use the cgis, the binary files are downloaded instead of executed. -- frankie
Basic Auth logout
this has been asked before, and I've found in the archives there is no way I could have a logout page for the Basic Auth in apache. Is there nothing I can do ? This is required only for the development team, so we need to let mozilla or IE forget about the username and password. This is a site built with HTML::Mason. So I tried %init $m-clear_buffer(); $m-abort(401); /%init with no luck at all And would this be possible with mod_perl2 ? -- frankie
Re: Load balancers
John Siracusa wrote: We've been struggling with load balancers for a while now. My requirements are pretty simple. I have a handful of plain and mod_perl apache servers, So...suggestions? How are other people handling load balancing? I have tested pen. It's easy to set up and works fine so far. The server has only 70k hits/day. I don't know how will it work under heavy load. The purpose was to keep working if one server was down. Pen is a load balancer for simple TCP-based protocols such as HTTP or SMTP. It allows several servers to appear as one to the outside. It automatically detects servers that are down and distributes clients among the available servers. This gives high availability and scalable performance. http://siag.nu/pen/
Obfusacating the source
I know it's not the way to go, but anyway I must do it. I need some tool that gets all the perl modules and mason components, of an application we made, and obfucaste it a little. The idea is get something just a little difficult to read, so the customer engineers have a hard time if they try to read the source.
Re: Obfusacating the source
John Saylor wrote: Hi ( 02.11.19 19:48 +0100 ) Francesc Guasch: The idea is get something just a little difficult to read, so the customer engineers have a hard time if they try to read the source. Call all variables 1 char names Replace all comments with 'comment here' That looks like what my boss wants me to do. But I think it's one of those things that looks easy to do, and you can have most of it done in very little time. But make it completely could be overkill. Just like a templating module. ;)
Apache-Scoreboad parse error when compiling
I have a RH8.0 with apache-1.3.27 and mod_perl-1.27. I'm trying to install Apache::VMonitor, but I can't make Apache::Scoreboard-0.10. These are the errors I've seen. In file included from DummyScoreboard.xs:14: /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/Apache/include/modules/perl/mod_perl.h:261: parse error before '*' token /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/Apache/include/modules/perl/mod_perl.h:261: warning: data definition has no type or storage class I did use this module long time ago withou problems. And I've searched google and the mailing list archives unsuccessfully. What can be wrong here ? I also have: perl-5.8.0-55 and gcc-3.2-7. -- frankie
Re: Apache-Scoreboad parse error when compiling
Ged Haywood wrote: On Tue, 12 Nov 2002, Francesc Guasch wrote: install Apache::VMonitor, but I can't make Apache::Scoreboard-0.10. In file included from DummyScoreboard.xs:14: /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/Apache/include/modules/perl/mod_perl.h:261: parse error before '*' token Well I'd love to see the command which caused these errors, but it looks like either a bug in gcc-3.2-7 or maybe somehow a file is damaged. But both seem very unlikely explanations to me. Thank you for trying, Ged. Have you built mod_perl with gcc-3.2 before? Well, mod_perl works find in this server. I built it myself. This is RH8.0, and it comes with apache2 and mod_perl-1.99 Was your Perl built with gcc-3.2? I installed the perl binary from RH8.0 If not you probably need to do that first, but I don't think it will help with this particular problem. I'm gonna build it, but I don't think it'll work FWIW I've attached my mod_perl.h (from mod_perl-1.27 sources); as you can see in my file the line which your compiler is complaining about seems to be just another typedef like the others in that part of the I tried with different mod_perl versions, the one that came with RH7.3 and I made the rpm hacking thingie with mod_perl-1.27 from CPAN. I checked the lines that failes and are simple typedefs Did you build your compiler? nope. I'll try perl-5.8 from source first. mod_perl works fine in this RH8.0, I only can't compile Apache::Scoreboard.
apache dies silently at start with perl-5.6.1 rpm
I'm testing the latest perl rpms from redhat updates: perl-5.6.1-26.72.3 mod_perl-1.26-2 I'm using HTML::Mason. When I start apache it just dies silently without complaining and I got nothing in the logs. I even tried to remove the former perl and modules. I rpmed -e a lot of things. Then I removed the perl5 dirs and I installed perl and modules. That didn't worked. When I asked in the Mason list I was told it was a modperl issue. How can I debug what's happening ? I've also noticed the cpan binaries aren't seeing well the modules installed. When I do cpan install Bundle::CPAN it starts downloading the perl-5.6.1 sources. I made sure there are no other perl file binaries nor cpan from other installations. What can I do ? -- frankie
Re: apache dies silently at start with perl-5.6.1 rpm
Nicolai Schlenzig (DXD) escribió: Are you using the mason-handler supplied with Mason? Or did you extend it already? I have my own You could try to make a very minimized mason-handler and see what that The minimal handler.pl still won't work. I can launch apache if I remove the perlrequire. Also it could be worth looking into installing only HTML::Mason and not the Bundle. Maybe a few I have not installed the bundle. It looks like perl-5.6.1 rpms won't work with HTML::Mason. I'm going to compile my own perl. I think if I do: sh ./Configure -de -Dprefix=/usr will overwrite the rpm perl. I'm testing the latest perl rpms from redhat updates: perl-5.6.1-26.72.3 mod_perl-1.26-2 I'm using HTML::Mason. When I start apache it just dies silently without complaining and I got nothing in the logs. -- frankie
Re: apache dies silently at start with perl-5.6.1 rpm
Kurt Hansen escribió: Did you see this message from the Mason list? If so, did this solution not work for you? I installed an old Data::Dumper: Data-Dumper-2.101 Right now I have a compiled perl-5.6.1 and these apache-1.3.22-2 rpm. Now I can start apache with the mason handler, but as soon as I add some DBI module in the handler.pl, it doesn't work: { package HTML::Mason::Commands; use DBI; } -- frankie
the object still does not exists in Apache::Session
This is an old issue. I recall having patched Apache:Session so it evals when restoring objects from the Data Store. When the database of sessions is cleaned the server dies with Object does not exist in the data store I just installed a server and I had to patch it myself again. Am I the only one who has this problem ? Is there something I'm missing ? Anyway here is the code I changed to Session.pm #If a session ID was passed in, this is an old hash. #If not, it is a fresh one. if (defined $session_id) { $self-{status} = ($self-{status} ^ NEW); eval { $self-restore; }; if ($@ =~ /Object does not exists/) { $session_id = undef; } } if (!defined $session_id){ $self-{status} |= NEW; $self-{data}-{_session_id} = generate_id(); $self-save; } -- - frankie -
rewrite rules in Perl sections
Hi. I found and old thread about having rewrite rules inside Perl sections in httpd.conf. In these mails it looks like there is not an easy way to do this. Is that still true ? I've tried different guesses unsuccessfully: $RewriteRule="^/(img/.*) http://other.server/$1"; $RewriteRule{"^/(img/.*)" } ="http://other.server/$1"; push @RewriteRule("^/(img/.*) http://other.server/$1"); any hints ? -- - frankie -
Re: RedHat 7.0 and mod-perl
Jamie Krasnoo wrote: Is anyone using mod-perl with apache-1.3.14 on RedHat 7.0? Any complaints? Me, core dumps. I recompiled perl_5.005_03 ,apache_1.3.12, mod_perl-1.24 and now it works: $ perl -v This is perl, version 5.005_03 $ telnet localhost 80 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. HEAD / HTTP1/0 HTTP/1.1 200 OK Date: Tue, 09 Jan 2001 10:18:21 GMT Server: Apache/1.3.12 (Unix) mod_perl/1.24 -- - frankie -
Re: How to use specified NIC
Jonas Nordström wrote: I have an application where incoming requests are handled by a gateway that translates the requests and sends them on to the intranet, receives the response, changes the links and sends the answer to the client. When I do the Intranet request (using LWP::UserAgent), I want to specify which network interface to use, so that the call isn't transfereed to the internet domain. Is this possible using som mod-perl magic? I you're worried about where your network packets go I think this is not a modperl issue. You have already configured your routes so I don't see where is your problem here. -- - frankie - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
empty or incomplete page returned
I'm building a web application using mod_perl. Sometimes when I do tests using a slow connection I get empty pages returned. This doesn't happen from the local net. The server used for the test isn't tuned and it has low cpu and ram. Could this be the reason of that bad behaviour ? Returning the content-length field to the browser would solve this ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fast DB access
"Differentiated Software Solutions Pvt. Ltd" wrote: Hi, We have an application where we will have to service as high as 50 queries a second. We've discovered that most database just cannot keep pace. The only option we know is to service queries out of flat files. There is a DBD module : DBD::Ram. If you got enough memory or there is not many data it could be what you need. I also have seen recently a post about a new DBD module for CSV files, in addition of DBD::CSV, try http://search.cpan.org -- - frankie -
Re: template kit.....
Denton River wrote: Ofcourse i can use different pieces of software,, But that was not my point I *want* to have the session management in the same kit becouse it´s convinient. I have used Apache::Session with HTML::Mason and it's plain easy. You only have to worry about tieing the %session to a database. There is an example in handler.pl that comes with Mason. I'd say there is no builtin session management in Mason but you optionally can add three lines of code to support it. (or remove comments) -- - frankie -
Re: What is *.xs file?
James G Smith wrote: I would start with `man h2xs' (only a start), and get _Programming Perl_, which talks about it some, as does _The Perl Cookbook_, I believe. Then Advanced Perl programming talks about it also. -- - frankie -
Re: @INC and Win32
Gundars Kulups wrote: Hi! I've upgraded to Apache 1.3.12, perl 5.6.0 and mod_perl 1.23 (Randy's binary distribution) and now it doesn't work. I've found related topic in mailing list archive: I don't know why, in a site of mine I have to manually add directories to @INC in httpd.conf. Hope this helps. -- - frankie -
Re: @INC and Win32
Gundars Kulups wrote: At 12:15 PM 5/30/00, Francesc Guasch wrote: Gundars Kulups wrote: Hi! I've upgraded to Apache 1.3.12, perl 5.6.0 and mod_perl 1.23 (Randy's binary distribution) and now it doesn't work. I've found related topic in mailing list archive: I don't know why, in a site of mine I have to manually add directories to @INC in httpd.conf. Hope this helps. I've tried it, but it doesn't work neither. I am using following config line: PerlSetEnv PERL5LIB "c:/Perl/5.6.0/lib;c:/Perl/site/5.6.0/lib" If I put it before LoadModule Apache complains about unknown directive PerlSetEnv and if I put it after LoadModule, mod_perl doesn't load... this is what I have: LoadModule perl_module modules/ApacheModulePerl perl push @INC,qw( c:/perl/site/5.00503/lib c:/perl/5.00503/lib c:/perl/5.00503/lib/MSWin32-x86 c:/perl/5.00503/lib c:/perl/site/5.00503/lib/MSWin32-x86 c:/perl/site/5.00503/lib ); /perl PerlWarn On PerlRequire c:/Apache/mason/handler.pl -- - frankie -
New Module (was Re: RFC: Apache::Request::Forms (or something similar))
I have my own module for doing this job, sorry I missed many posts of this thread but here is what I do: - The target is automatically : add , update, select data from a table reading data typed by the user. - I didn't want to use the Apache api, so it even can be used out of apache, so I called it : Persistence::DBI thought I don't like this name much. In This example I work with HTML::Mason, but as I said before it can be used from whatever thingie, even out of the web. I'm using currently this in production sites and it saves me a lot of work. EXAMPLE OF CODE: It's a little harder than this but you'll get the idea: ##customer.html###3 %init # Make the object my $customer=Persistence::DBI-open( table = 'customers', field_id = 'idCustomer' field_data = \%ARGS ); if (defined $_delete) { $customer-delete; } /%init ## The html form is this way: form input type="text" name="name" value="% $customer-name %" input type="text" name="phone" value="% $customer-phone %" input type="submit" name="_save" value="save" % if (defined $customer-idCustomer) { input type="hidden" name="idCustomer" value="% $customer-idCustomer %" input type="submit" name="_delete" value="delete" % } /form It works this way: - if you supply the value of the id field it does a select - if you supply all the fields but the id, it does an insert - if you supply id and fields it does an update Before calling the object you can check the values supplied by the user to verify the values are correct. If you modify values of the object it updates the data. I'll accept name changes and I'll send the module to whoever wants it. I checked it with MySQL and SQL server. The module come with pods and it installs fine like any other module.It needs the field_id be auto increment. -- - frankie -
Re: Session management moudle suggestions?
Stephen Zander wrote: I've avoided session management like the plague until now (intranets let you get away with that sort of thing :)) but rolling out web-based LDAP is forcing session management upon me. Other than Apache::Session what are my choices? How well do any of these play with templating (Embperl, Mason et al)? I'm a very happy user of Apache::Session::DBI that works very well with HTML::Mason -- - frankie -
Re: Apache::Session question
Gundars Kulups wrote: Hi! I am sorry to ask this bit off question, but still. Has anyone used Apache::Session on Solaris (Sparc, not intel)? We implemented system on Linux (intel) and tried to port it to Solaris, but session doesn't work - can not create session files. Store manager used is FileStore and SysV locker. Could that be a reason for problems? If so what kind of store and locker should be used on sparc Solaris? After the use Apache::Session you maybe have to type something like this. $Apache::Session::SysVSemaphoreLocker::nsems=16; This has been talked here before, so maybe if this doesn't work you can find hints anywhere in the list archives. -- - frankie -
Re: Apache::ASP rules [was: Sorry men]
Ime Smits wrote: Bottomline: Apache::ASP made me really happy because now don't have to develop for IIS anymore and I can stick to my Linux environment. I can I'm also being told every once in a while by management about why we aren't using IIS, you know, when they receive marketing information. I have a list of lack of features in mind but I'll like to hear horror stories and so from somone who really used it. -- - frankie -
Re: [OT] Lotus Domino as Web server ?
Jean-Denis Girard wrote: Hi dear modperlers, We have a client here willing to use Domino to serve his Web site. I started considering Domino a while ago. My conclusion was to flee from it. I haven't used it and these were the opinions of real programmers that used it. I'll try to recall things they told me ; - It uses a lot of CPU and RAM, if you think mod_perl eats RAM, you've never used domino. I've seen this happening in intranet with around 1000 users. They had to install alphas with NT. - It does not farming. If you install domino you'll end up having a lot of domains, one for every section of your web, each one in a server. Your users will go crazy searching dead links and asking you what server holds now the pages they were using. Because you'll start moving databases to a new server as soon as the older started die of resources. - Amazing lack of features, the API to the web server maybe exists but no developer I talked to knew nothing about sending headers, internal redirects and so. I was comparing to mod_perl, and HTML::Mason, the dhandler and autohander stuff was very important for me and I wanted something like this. I didn't find it. - It does not SQL, building an application for the web with domino takes a big effort of analising, programming and maintaining. A thing that would be very easy with a SQL database can be very hard or impossible to do with domino. I was told is hard to feed such a database from 3rd party data. And if you must add more data again to domino is harder again. - It's impossible to separate content from formatting. - You don't embed a language in HTML, you ask domino about inserting html inside your code. My conclusion was it's no good for web programming. I went to a super human software lotus show and it was very disapointing, a lot of vapourware. I thought it must be very bad when they admitted nested tables didn't work at all in domino 4.x, and started working at 5.0. In addition I must say mod_perl has a lot of features never dreamed by people that use Domino or IIS+ASP. I have asked to other programmers friends of mine who use these platforms, no one uses mod_perl and they think their tools are far better than mine and easier to use. I quit advocacing mod_perl. For every feature they lack, they have work arounds or don't use it. -- - frankie -
Re: [new module] proposal Apache::DebugHeaders
Stas Bekman wrote: Did you know that CPAN tolerates even the packages with no Makefile.PL? I don't try to disencourage you to write Makefile.PL (feel free to "steal" one from your favorite module), but if you really cannot build yours release it as it is. It still might save one of us days of work, which in return might give you something that you need. A very easy way of create Makefile.PL and module files and directories is typing this: h2xs -X -n My::Object -- - frankie -
Re: Session
raptor wrote: hi, Is there Session module that has capability more like ASP::Session rather than Apache::Session.(I mean hanlidng the cookies too, Joshua is it easy to extract Session functionality from ASP as a standalone module :")). OR what mostly the MASON people use to handle Sessions. put this inside your handler.pl my %session; my $cookie_rec = $r-header_in('Cookie'); my ($cookie) = $cookie_rec=~/SESSION_ID=(\w+)/; tie %session, 'Apache::Session::DBI', $cookie, {DataSource = 'dbi:mysql:sessions', UserName = 'the username', Password = 'the password' }; $r-header_out("Set-Cookie" = "SESSION_ID=".$session{_session_id}. "; expires=".HTTP::Date::time2str(time+180*24*60*60) ) if ( !$cookie or $cookie ne $session{_session_id}); my $result=$ah-handle_request($r); untie %HTML::Mason::Commands::session if $SESSION; return $result; Just cutted and pasted from mine, I removed some code not important for the example. Take it easy. -- ^-^,-. mailto:[EMAIL PROTECTED] o o )http://www.etsetb.upc.es/~frankie Y (_ (__(OOOo
Developing with CVS
I'm trying to build a CVS environment for a team working with mod_perl. I tried: - Every developer has a http.conf file and a cvs copy of the sources. Then I try to run httpd daemon as the user. I modified the conf so the owner of the process if the developer and changed the directories of pid , log , lock ... to a directory inside the user space. $ /usr/local/apache/bin/httpd -f /home/frankie/src/apache/conf/httpd.conf My problem is that when It connects to the Apache::Session complains this way : Permission denied at /usr/lib/perl5/site_perl/5.005/Apache/Session/SysVSemaphoreLocker.pm line 63. This connection takes place from the HTML::Mason handler.pl here: tie %session, 'Apache::Session::DBI', $cookie, {DataSource = 'dbi:mysql:sessions', UserName = 'apache', Password = '' }; What am I missing ? -- ^-^,-. mailto:[EMAIL PROTECTED] o o )http://www.etsetb.upc.es/~frankie Y (_ (___(
Re: DBI::mysql - Dynaloader.pm errors!!!?
jarek wrote: Hi! I donno what's going on I have newly upgradet my mod_perl , I have just succesfully installed new perl modules with CPAN eshell, and tried to find Dynaloader.pm but with no result. It looks like you have THE DBD::mysql installation problem. This is documented in mysql. Check your docs or http://www.tcx.se -- ^-^,-. mailto:[EMAIL PROTECTED] o o )http://www.etsetb.upc.es/~frankie Y (_ (__(OOOo
Re: hostname sanitation in PerlTransHandler or anywhere else
Dan Rench wrote: PS: I'd still like to hear from anyone who is running mod_perl on Solaris 2.5.1 with Perl 5.005_03 -- I don't want to stick with 5.004 forever. If only you could upgrade to solaris 2.6. I have it running: SunOS 5.6 This is perl, version 5.005_03 built for sun4-solaris apache-1.3.9 mod_perl-1.21 -- ^-^,-. mailto:[EMAIL PROTECTED] o o )http://www.etsetb.upc.es/~frankie Y (_ (__(OOOo