Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread pkeidesis
Phil Dobbin wrote:

On 6/2/03 14:30, Morbus Iff [EMAIL PROTECTED] wrote:



Please download and test the perl 5.8.0 distribution available from:
http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg


I get a text transfer of the binary when trying to d/l this in Mozilla, IE
and Omni Web instead of the disk image. This is the first time this has
happened for a long time and I can't remember how to fix it. Anybody?


wget http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg



Curiouser and curiouser...

I tried `curl http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg'

And got the same binary text d/l (and had to crash `terminal' to stop it :-(



from my cygwin version (should be the same on OS X) --

C:\htdocs\eidesis\cgi-bincurl --help
curl 7.9.8 (i686-pc-cygwin) libcurl 7.9.8 (OpenSSL 0.9.6g)
Usage: curl [options...] url
Options: (H) means HTTP/HTTPS only, (F) means FTP only
 -a/--appendAppend to target file when uploading (F)
 -A/--user-agent string User-Agent to send to server (H)
 -b/--cookie name=string/file Cookie string or file to read cookies 
from (H)
 -B/--use-ascii Use ASCII/text transfer
 -c/--cookie-jar file Write all cookies to this file after operation (H)
 -C/--continue-at offset Specify absolute resume offset
 -d/--data data   HTTP POST data (H)
--data-ascii data   HTTP POST ASCII data (H)
--data-binary data  HTTP POST binary data (H)
--disable-epsv  Prevents curl from using EPSV (F)
 -D/--dump-header file Write the headers to this file
--egd-file file EGD socket path for random data (SSL)
 -e/--referer   Referer page (H)
 -E/--cert cert[:passwd] Specifies your certificate file and password 
(HTTPS)
--cert-type type Specifies certificate file type (DER/PEM/ENG) 
(HTTPS)
--key key Specifies private key file (HTTPS)
--key-type type Specifies private key  file type (DER/PEM/ENG) 
(HTTPS)
--pass  pass  Specifies passphrase for the private key (HTTPS)
--engine eng  Specifies the crypto engine to use (HTTPS)
--cacert file CA certifciate to verify peer against (SSL)
--capath directory CA directory (made using c_rehash) to verify
peer against (SSL, NOT Windows)
--ciphers list What SSL ciphers to use (SSL)
--connect-timeout seconds Maximum time allowed for connection
 -f/--fail  Fail silently (no output at all) on errors (H)
 -F/--form name=content Specify HTTP POST data (H)
 -g/--globoff   Disable URL sequences and ranges using {} and []
 -G/--get   Send the -d data with a HTTP GET (H)
 -h/--help  This help text
 -H/--header line Custom header to pass to server. (H)
 -i/--include   Include the HTTP-header in the output (H)
 -I/--head  Fetch document info only (HTTP HEAD/FTP SIZE)
 -j/--junk-session-cookies Ignore session cookies read from file (H)
--interface interface Specify the interface to be used
--krb4 level  Enable krb4 with specified security level (F)
 -K/--configSpecify which config file to read
 -l/--list-only List only names of an FTP directory (F)
 -L/--location  Follow Location: hints (H)
 -m/--max-time seconds Maximum time allowed for the transfer
 -M/--manualDisplay huge help text
 -n/--netrc Must read .netrc for user name and password
--netrc-optional  Use either .netrc or URL; overrides -n
 -N/--no-buffer Disables the buffering of the output stream
 -o/--output file Write output to file instead of stdout
 -O/--remote-name   Write output to a file named as the remote file
 -p/--proxytunnel   Perform non-HTTP services through a HTTP proxy
 -P/--ftpport address Use PORT with address instead of PASV when 
ftping (F)
 -q When used as the first parameter disables .curlrc
 -Q/--quote cmd   Send QUOTE command to FTP before file transfer (F)
 -r/--range range Retrieve a byte range from a HTTP/1.1 or FTP server
 -R/--remote-time   Set the remote file's time on the local output
 -s/--silentSilent mode. Don't output anything
 -S/--show-errorShow error. With -s, make curl show errors when 
they occur
--stderr file Where to redirect stderr. - means stdout.
 -t/--telnet-option OPT=val Set telnet option
--trace file  Dump a network/debug trace to the given file
--trace-ascii file  Like --trace but without the hex output
 -T/--upload-file file Transfer/upload file to remote site
--url URL Another way to specify URL to work with
 -u/--user user[:password] Specify user and password to use
Overrides -n and --netrc-optional
 -U/--proxy-user user[:password] Specify Proxy authentication
 -v/--verbose   Makes the operation more talkative
 -V/--version   Outputs version number then quits
 -w/--write-out [format] What to output after completion
 -x/--proxy host[:port]  Use proxy. (Default port is 1080)
--random-file file File to use for reading random data from (SSL)
 -X/--request command Specific request command to use
 -y/--speed-timeTime 

Re: a folder of file system questions

2003-02-05 Thread pkeidesis
Rich Morin wrote:

Peculiarly, although stat works on the data and resource forks,
it seems to give the file's total number of blocks, when asked
about the forks:

Size
  Data fork  18884 (20.0 KB)
  Resource fork  0 (20.0 KB)
  Total  18884 (20.0 KB)



I know very little about it from the Unix point of view, but from the 
Mac point of view -- not all files have resource forks worth a tinker's 
damn. If rsrc is zero, well, then it is zero. pure ascii files are like 
that.

otoh, things like icons are mostly all rsrc.



Re: Search for a string

2003-02-04 Thread pkeidesis
Jeremy Schwartz wrote:

Where can I get my hands on split-logfile. Based on the info at the link
below, it seems to be exactly what I am looking for.


for these kind of things is what google is for...

http://apache.hpi.uni-potsdam.de/document/sources/apache_1.3.17-html/__src_support_split-logfile.html


hope this helps.

That said, I find Dennis Stout's comment amusing...


Sheesh.


Wil ya'll just help a man with a perl problem instead of battering him with
other ways to do it?

Sometimes people like ot pose a challenge to themselves and see if it can be
done.

Instead of being counterproductive and refering peopel to other things, help
the man!

I wish I could but at the moment, I'm trying to get some sleep..

Good Night,
Dennis Stout


he found enough time to criticize [EMAIL PROTECTED]'s perfectly well 
meant and well-given excellent suggestions, but could not find time to 
offer his own because he was sleepy.

I have on occassion asked for help and not received, or asked for a 
and be told to do b, but that is ok. That is the nature of the list. 
All suggestions are welcome, and sometimes alternatives do turn out to 
be better than the original solution that is sought.

Additionally, Jeremy, you might find perlmonks to be a very helpful 
place when help with perl scripting is specifically required.

good luck with your log file analysis.

pk/




From: pkeidesis [EMAIL PROTECTED]
Date: Mon, 03 Feb 2003 16:39:08 -0600
To: [EMAIL PROTECTED]
Cc: Jeremy Schwartz [EMAIL PROTECTED],  Andy Lester [EMAIL PROTECTED],
[EMAIL PROTECTED]
Subject: Re: Search for a string

also, check out split-logfile at
http://httpd.apache.org/docs/programs/other.html









Re: Help installing DBD:mysql on Mac OS X 10.2

2003-02-04 Thread pkeidesis
Big City Baby wrote:

Hi! I'm trying to install the perl module DBD:mysql on Mac OS X 10.2. 
MySQL is installed at /Library/MySQL.

When I run perl Makefile.PL, i get this error message:

--- Can't exec mysql_config: No such file or directory at Makefile.PL 
line 169.

others more knowledgeable might have more detailed answers; my guess is 
that it is saying exactly what is happening... you have installed MySQL 
under /Library/MySQL (that is a strange place, usually it gets installed 
under /usr/local/bin or something like that), and /Library/MySQL is not 
in the path, so the Makefile has no clue what mysql_config is...

save yourself a bunch of grief and install MySQL where most everyone 
else does... otherwise, add your install directory to the path.



Re: Help installing DBD:mysql on Mac OS X 10.2

2003-02-04 Thread pkeidesis
Sherm Pendley wrote:

On Tuesday, February 4, 2003, at 02:41 PM, pkeidesis wrote:


save yourself a bunch of grief and install MySQL where most everyone 
else does...


That's a bit dramatic, don't you think? Having to add to one's path is 
hardly a bunch of grief. It's just a minor nuisance. :-)

well, yes... it does sound dramatic now, but hey!

otoh, my guess is that that not installing things in their customary 
places would (might likely) cause a bunch of grief later on... other 
tools might expect things to be in certain places, and would need to be 
tweaked to look in other places.

OS 9 was different... there was no concept of paths to the (end user 
anyway). you clicked on things and they worked... for that matter, you 
could only click on things.

OS X is a lot more picky about things being where it wants them to be. I 
have heard of many applications that stop working or start doing voodoo 
if moved from their default locations.

I would consider it a fairly reasonable modus operandi to work with 
customary locations instead of creating my own directory world order.

yet, point taken. thanks Sherm.



Re: Help installing DBD:mysql on Mac OS X 10.2

2003-02-04 Thread pkeidesis
Just fyi, Marc Liyanage's binary installer was really the one out there, 
and has now been adopted by MySQL AB itself as _the_ official MySQL 
binary for OS X. Wrt unix software, you might be generally better off 
installing things from source yourself -- configure, make, install, etc. 
Not only will you get a better understanding of how unix works (my 
apologies if you already know this), but you will also get a chance to 
configure the software to meet your needs. plus, if you install 
something else in the future that depends upon this software (for 
example, you might want to install something that depends upon MySQL to 
configure itself) then it would require the source tree and your 
configure settings for the original software.

it is not really difficult (except for Perl itself, maybe ;-) ) provided 
you scout around for some good instructions before you set out.

I think, if you want, you can simply delete the MySQL directory under 
/Library, and install the binary from Mysql.com... it will go into a 
more customary location. I installed from source compiling my own with 
instructions from Marc's website (entropy.ch), and then installed DBI, 
DBD::mysql without any problem.

good luck

Big City Baby wrote:
Sadly enough, I didn't pick /Library/MySQL as the install directory. It 
was chosen for me by Aaron Faby's Complete MySQL binary installer. 
Prior to that install, I used Tenon Intersystems's iTools on another 
server and it installed it in a completely different place, something 
like /Library/WebServer/tenon/MySQL. Just thought I'd share.

Why don't they make a Perl modules in a box installer?


On Tuesday, February 4, 2003, at 03:19 PM, pkeidesis wrote:

otoh, my guess is that that not installing things in their customary 
places would (might likely) cause a bunch of grief later on... other 
tools might expect things to be in certain places, and would need to 
be tweaked to look in other places.

OS 9 was different... there was no concept of paths to the (end user 
anyway). you clicked on things and they worked... for that matter, you 
could only click on things.

OS X is a lot more picky about things being where it wants them to be. 
I have heard of many applications that stop working or start doing 
voodoo if moved from their default locations.








Re: Help installing DBD:mysql on Mac OS X 10.2

2003-02-04 Thread pkeidesis
Sherm Pendley wrote:

On Tuesday, February 4, 2003, at 03:32 PM, pkeidesis wrote:


depends upon this software (for example, you might want to install 
something that depends upon MySQL to configure itself) then it would 
require the source tree and your configure settings for the original 
software.


Not at all - that's precisely what the mysql_config utility is for, and 
the reason that the DBD::mysql install needs to find it. You run it, and 
it prints the configure settings that were used to compile that copy of 
MySQL.

I've *never*, in five+ years of building, installing and maintaining 
MySQL and various related tools on a variety of UNIX systems, found a 
tool that needed the MySQL source tree to compile properly.


ok, I am wrong. When it comes to MySQL. But not every tool has the 
mysql_config utility.

But seriously, Sherm, would you or would you not consider it generally 
good advice to install software in its customary place lest it come back 
and bite the user in the butt later? At a general level? And directed to 
someone who comes to unix from a MacOS background?

if you consider that bad advice, tell me why and I will shut up.

Otherwise you are casting us into void before we have a chance to become 
old C programmers.

;-)






Re: Search for a string

2003-02-03 Thread pkeidesis
[EMAIL PROTECTED] wrote:


On Mon, 03 Feb 2003 13:09:47 -0500, Jeremy Schwartz [EMAIL PROTECTED] wrote:



Not trying to reinvent the wheel.

I am using Analog for the analysis.

I am trying to split the server combined log into individual vhost logs. I
can then run each through Analog to produce individual reports.




Don't reinvent the wheel.  There are a number of fine log analysis
utilities, such as analog.

xoa



Out of curiousity is there a reason why you are not handling this at the Apache level?  Each vhost can have its own set of logs at the start that then would not need to be pulled apart.  Is this a possible scenario for you going forward? (granted it doesn't help now).  It would seem that your task would be better handled with shell script possibly since you already have the command line for creating the file(s) from the main log, so then just wrap that command in a foreach that takes your directory names as input. 

Something along the lines of:

#!/bin/sh

for dir in `ls -1 /webroot/`; do
  cat /var/log/httpd/access_log | grep $dir 
/var/log/httpd/access_log_$dir
done

I am no shell hacker and the above is untested, but you get the idea.  In general Perl would not be a good choice for performing something so simple that already has a command line solution available. 

If you were going to do it in Perl, rather than looking for each vhost in the log file, you would be better off unpacking or splitting, etc. the log line and storing that line to an array that is associated with the particular vhost in the log line and then printing each vhost's array to a file, or you would have to open a filehandle for each vhost at the beginning of the script and then just print the line to whichever filehandle is associated with a particular vhost.  Stepping through every line of the log file foreach of the vhosts in Perl would probably be a really bad way to handle things.

I would still suggest letting Apache do the splitting by not storing one main log with all vhost content, it is much easier to put the logs back together to get a complete picture than it is to disect them after the fact.

http://danconia.org


Most excellent advice. Jeremy, the above is really the best advice you
can get on this topic.

Here's the docs for log files for vhosts

http://httpd.apache.org/docs/logs.html#virtualhosts

also, check out split-logfile at
http://httpd.apache.org/docs/programs/other.html