I decided to use File::Tail.
It has several different parameters and it allows me to keep using a debugging mode I have which lets me test new patterns by reading in the whole file if I want to.
(And reversing the IP's blocked if it is screwed up.)
Luckily I never make mistakes :(
I like to...
Just the Apache error and access logs. No need to scan anything but the latest entries as they come off.
Your idea seems like a good one, I will try it.
I thought I might get a better answer by asking here :)
I have a small program that scans Apache log files for certain "evil" patterns and then blocks those IP addresses from server (not just Apache).
But as these log files grow and grow, the CPU percentage keeps going up.
When I restart Apache after clearing log files, problem goes away, until size...
I am trying to bring LaTeX::Encode into a port of OpenBSD.
But OpenBSD has a version of TAP::Harness in base, version 3.23, which has the method _construct
But there is also a package TAP::Parser that has TAP::Harness, version 0.54, which does not have the _construct method.
The test suite for...
1. provide a fixed width for the select box
I can't do that one, since some of the critical information shows up at the very end.
Seeing:
blahblah
blahblah
blahblah
instead of:
blahblah1
blahblah2
blahblah3
Hmm, but I might be able to do a < style="" > on the fly since I will have the actual...
I have made this work now.
But I don't like the way that the width of the subsection fields jumps after selecting the category.
I want to stabilize this width, but not allow anything but 'All' in the subsection field unless a category is selected first.
I do not want to visually pre-populate...
Yes, that's a better idea. The JavaScript is very simple. A value chosen in one select limits second select to possible values in the other one.
There are three (or more or less) groups of two coordinated selects.
Makes selecting the second value very user friendly
Ugh,
yes JavaScript is a requirement.
I hadn't thought of that.
I will look at those modules. Didn't even know about them.
I could possibly even use those for another script I have that hangs up on a site that requires JavaScript
I want to write tests for my application that views (with searches), inserts and updates a PostgreSQL database. I need to test the web side to see if inserts and updates chain up and down through the tables. I also need to test the database side to see if those changes actually reflect web side...
The one of the other threads was perfect advice.
I have got the first function down to a small array and it works fine.
function setupEventsC(evnt) {
var opts = document.getElementById("someForm").class_selected.options;
var subclass_selected =...
I am generating two select lists from perl.
One shows a class drop down list.
The second one shows a subclass drop down list.
To make life easier, this makes only subclasses that are in a class show up after selecting a class.
Works good. I just rewrote the perl subroutine that generates this...
OK.
Basically, this app runs on a remote server with web access.
It is mod_perl, perl dbi to PostgreSQL which also has stored procedures.
I am trying to improve readability and maintainability.
I have eliminated a lot of silly loops and tests, moving that stuff, after improvement, from the...
I already have the available commands ordered in the most likely order they are to be called.
I will change to this:
if ($command~~@available_commands) {
$dbh->{AutoCommit} = 0;
my $sub = \&{"$command"};
&$sub( $r, $dbh, $q, $database, $program, $lang );
$dbh->commit()...
I am trying to accomplish two things, speed and readability.
I have moved from an if elsif list of options to this:
# earlier:
my @available_commands # In modules
= qw(ViewRecords
InsertRecordGroupForm
UpdateRecordForm
InsertRecordGroup
UpdateRecord...
Thanks, that looks good.
I picked up the book Perl Best Practices, which has inspired me to rewrite a lot of the junk that was in my code.
There were a lot of inefficient SQL tests I had that I have now simplified without loops or extra variables.
This change is to make the test for valid...
I am having a problem with the following puzzle.
The first version works fine, the second fails.
Is there a way to successfully make the if version work?
unless ( $command eq "ViewRecords"
|| "InsertRecordGroupForm"
|| "UpdateRecordForm"
|| "InsertRecordGroup"
||...
I looked at the web page's source.
This one looks like a real chore to pull out the sections with regex's.
Do not worry about getting it into a file until you get it to work. print "$blah"; will let you debug without having to peek inside your new file.
This page is "unique" in a sense, since...
Yes, you have to roll your own but Apache::Request does the same type of work that CGI.pm does but much faster and adds many options not available in CGI.pm.
Not hard at all.
You can run regular CGI with mod_perl, but after you learn how use mod_perl, you never want to again.
Mod_perl...
I wanted to reply back to make known how I solved this IPN situation.
I had no trouble at all with the mod_perl. Everything went as it should, but PayPal states that the params must be returned in the same order.
That isn't true.
They also say that &cmd=_notify-validate must be added to the...
Seems to be working ok. I need to go find one of those good sets of duplicates to make sure. Of course, doing this brought to notice a small previous error in one of my modules for this matching.
So easy to skip a character and so easy to miss the bug!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.