Re: HTTP header voodoo

2003-09-02 Thread Chris Andrews
On Tue, Sep 02, 2003 at 02:41:39PM +0100, David Cantrell wrote:
> Can someone remind me, what's the header voodoo that tells a browser
> that regardless of what it sent in the GET request, it should offer to
> save the file as $filename?

 Content-Disposition: attachment; filename="$filename"

works for me. 


Chris.



Re: Treating strings like file handles?

2003-07-15 Thread Chris Andrews
On Tue, Jul 15, 2003 at 08:57:20PM +0100, Nicholas Clark wrote:
> 
> Because you were blinded by the orange?
> 
> http://search.cpan.org/orange.html

Behold, interweb sunglasses:

  ExtFilterDefine orangenomore mode=output intype=text/css \
  cmd="/bin/sed s/ff7300/006699/g"

  ProxyRequests On
  
SetOutputFilter orangenomore
...
  


Bwahahaha!



Re: ADSL Hardware

2003-06-20 Thread Chris Andrews
On Fri, Jun 20, 2003 at 02:29:24PM +0100, michael wrote:
> 
> 
> On Fri, 20 Jun 2003 [EMAIL PROTECTED] wrote:
> > > I have the Netgear DG814 which I'm very happy with. Dabs is=
> > > selling them for 399 (inc VAT).
> > My (new) DG814 won't keep a session up, or re-establish a session
> > automatically.  Still chasing NetGear support.  Back on my old
> > SpeedTouch now.
> >
> 
>   I have a DG814,  idle telnet and ssh sessions freeze then time out
> after ~20 minutes.

Using NAT? That's normal. 

Losing the PPP session to the provider, that's different, and not
normal. Even with BT's shonky ADSL service, the PPP should stay up for
weeks.


Chris.



Re: dns woes

2003-06-15 Thread Chris Andrews
On Sun, Jun 15, 2003 at 04:15:08PM +0100, Shevek wrote:
> On Sun, 15 Jun 2003, Simon Wistow wrote:
> 
> > On Sun, Jun 15, 2003 at 09:12:22AM +0100, Alex Hudson said:
> > > Care to elaborate? I'm currently looking at DNS hosting, and Joker are on
> > > the list at the moment :/
> > 
> > They won't let you use arbitary nameservers, rejecting requests from the 
> > web form with the message 
> > 
> > "ERROR[-310] line [15] [ns1-handle:[69541] not found in tld registry]"
> 
> This is normal. You need to register the hostname and IP of all
> nameservers explicitly with the registry. I don't know how Joker deal with
> this, I only use NSI.

There are two Joker systems, one based on CORENIC, and one, um,
not. If you want to delegate an 'old Joker' name to a new nameserver,
you need to know its 'COHO handle'. If you don't know it, just create
another...

If it's a new-ish name, then I believe that they use the Network
Solutions nameserver list, so you'd need to add your new nameserver
there.


Chris.



Re: Net::Whois::RIPE

2003-05-29 Thread Chris Andrews
On Thu, May 29, 2003 at 10:26:54AM +0100, Lusercop wrote:
> On Thu, May 29, 2003 at 10:16:19AM +0100, Mark Morgan wrote:
> > Very much so.  I have to do minimal parsing of whois information as part
> > of my work for OpenSRS, and even for that, I run into maintainance
> > problems.  The biggest cause is that many of the registrars alter their
> > whois formats on a semi-regular basis, presumably to avoid easy parsing of
> > em for transfer information.
> 
> Can't you just ask OpenSRS for the information? that's what we do.

If you're transferring from another registrar, you have to parse
*their* information in order to feed it to OpenSRS. 


Chris.



Re: Net::Whois::RIPE

2003-05-29 Thread Chris Andrews
On Thu, May 29, 2003 at 07:45:27AM +0100, Ian Watkinson wrote:

> I have a list of hosts, that I need to get whois information on, so
> I turned to my trust perl, and tried to get Net::Whois::RIPE
> working.  However, I can get the whois header information, and I can
> get results, but it seems to not work for all hosts.

Net::Whois::RIPE is specifically for the RIPE whois database, which
contains IP address, AS number allocations and the like, rather than
the usual domains.

It actually works really well, which should be expected given that
both it and the database were written by RIPE...

> What I am ideally looking for is something in perl that provides me
> with the sme funcionality as the normal system command whois, as a
> bare minimum.

You'll be lucky. There's a whole bunch of different 'standards' for
the output of whois servers, but there doesn't seem to be a module
that understands them all. 

When I've done this, I've kept a list of relevant whois servers and
strings to match on (I've only been interested in available/
not-available), then use Net::Whois::Raw to actually get the data, and
parse the output by hand.

There's a couple of modules which know about gTLDs and a handful of
ccTLDs, and Net::Domain::ExpireDate seems to know about quite a few
for the expiry date only, but a comprehensive module will be a
maintenance nightmare.


Chris.



Re: The answer to the map and disc problem

2003-05-29 Thread Chris Andrews
On Wed, May 28, 2003 at 02:51:22PM +0100, Jasper McCrea wrote:
> Peter Haworth wrote:
> > 
> > On Tue, 27 May 2003 09:32:37 -0700, Dave Cross wrote:
> > > p.s. There's a great letter in this week's Radio Times. Someone is
> > >  complaining about a recent TV version of some Shakespeare play. Their
> > >  complaint is that it was performed in modern dress but the language
> > >  hadn't been updated so they couldn't understand it!
> > 
> > Maybe they should watch Forbidden Planet, or one of the many variations on
> > Romeo and Juliet that have been made.
> 
> I think you read a different version of Romeo and Juliet than I did at school. 
> 
> What are the various shakespeare -> strange genre adaptations? I can only think 
> of Forbidden Planet offhand.

There's also 'From A Jack To A King' by the same author, with the same
music and cheesy modified Shakespearean dialogue: 'Beware the ids that
march', I ask you. 

I saw a show called 'Fall For Me' at the Fringe -- it's A Midsummer
Night's Dream but with hippies and a rock band and set in 1967. I
suspect there have been plenty of similar shows.

(Ooh -- I  Google loads: here's a review of it:
http://www.britishtheatreguide.info/otherresources/fringe/fringe98-05.htm)


Chris.



Re: webmail

2002-10-31 Thread Chris Andrews


On Thu, 31 Oct 2002, Paul Makepeace wrote:

> On Wed, Oct 30, 2002 at 04:38:12PM -0500, Chris Devers wrote:
> > On Wed, 30 Oct 2002, << everyone >> wrote:
> > > << PHP is crap >>
> 
> I don't think PHP is crap.
> 
> I am also amused and puzzled at the people writing huge tracts on why
> PHP is crap while not at the same time acknowledging there are vastly
> more websites written in PHP doing useful things for lots of people than
> there are in perl -- witness the scrabbling to find even remotely
> interesting success story cases for Perl (what recent ones have there
> been?). I suspect more revenue is generated from PHP sites than Perl
> sites. As a corollary, there are less (by some metric) experienced
> people writing more web software in PHP than in Perl. PHP gets you sooo
> much more with the same amount of effort than with perl. PHP is
> fundamentally quite easy, the learning curve astonishingly flat. Hardly
> the case for perl.

The learning curve to writing *bad* PHP is really flat. The learning curve
to writing good, secure, scalable PHP I would suggest is much steeper and
longer, because the language itself, and also the user community (and so
the support and resources available) is so geared to writing quick-hack
code. Just look at the user comments on the PHP manual.

I'm sure there are people writing good PHP out there - the Horde and IMP
stuff I was quite impressed with - but they are lost in the noise of
people arguing the PHP equivalents of 'use strict is gay' over and over.

> "Worse" is "better".

Indeed. Perhaps there's a lesson there - but I'll stick to my Lisp
Machine, thanks.

Chris.





Re: webmail

2002-10-29 Thread Chris Andrews

[ Curse you `Lusercop', you know I can't resist a PHP-rant... ]

On Tue, 29 Oct 2002, Lusercop wrote:

> On Tue, Oct 29, 2002 at 03:35:22PM +, Paul Makepeace wrote:
> > I'd read this as FUD, frankly, until you can show PHP has suffered
> > vulnerabilities so severe as to require shutting down service "every
> > few weeks".
> > This might seem anal of me but people might actually take what you're
> > saying to heart and then continue to spread disinformation. If a package
> > deserves commentary like that (say MS not fixing reported bugs for after
> > several weeks of being notified), fair enough, if it doesn't, it's worth
> > IMO avoiding hyperbole.
> 
> I read what you're saying, and I'm unlikely to support PHP on my server
> for similar reasons to Roger. Chris Andrews, who reads this list[1], can
> probably explain better, as he has to deal with user support for PHP. In
> essence, however, it seems to be very easy to write PHP in a way that it
> silently eats errors, fails to quote appropriately, and other such things,
> and much harder to write PHP of a quality that will withstand serious
> attempts against it.

Of course, it's very easy to write such code in any language, but PHP's
way of dealing with this is wrong. Instead of attempting to educate the
user community as to how to write secure code, the PHP approach is to
offer 'magic bullets', such as escapeshellcmd(), and to simply say 'you
should use this, it makes everything better'.

There are also a significant amount of convenience features, designed to
reduce the overhead of getting a script up and running, such as injecting
CGI variables as globals - yuck! Sure, this lets you embed little snippets
of code into a web page very easily, but these days it looks to me like an
indication of PHP's roots as SSI-on-steroids.

You can take steps to lock PHP down, even on a shared server, but it's not
the default state after install and there doesn't seem to be a canonical
way of securing a shared PHP installation. Most importantly, if you *do*
succeed in locking it down, your users will just complain that their
scripts don't work. Worse, they will work around the 'security': just look
in the user submitted notes for the 'Safe Mode' feature in the PHP manual
for ways of avoiding it.

Apart from anything else, the reason I don't use PHP on my personal
machines is that I think it's about as good a language as a collision
between all the bad bits of Perl and all of Visual Basic. 


Chris.






Re: ADSL Help

2002-10-07 Thread Chris Andrews



On Mon, 7 Oct 2002, Lusercop wrote:

> On Mon, Oct 07, 2002 at 05:42:32PM +0100, Jon Reades wrote:
> > I wish that Zen let you specify a number of IP addresses -- their handy 
> > 'configurator' is smart enough to ask a few questions about what you 
> > want to do ('Do you just want to play games and surf the Web?') but not 
> > smart enough to let you request 1 < n < 8 IP addresses. I have four that 
> > are completely unused (and I knew in advance that I wouldn't need them).
> 
> In which case, what was the advantage of getting a /29 over a single IP
> address?

Because come the day you want to plug in another machine, you won't have
to deal with the crawling horror that is the NAT implementation on most
ADSL 'routers'?

<>


Chris.





Re: OT - Palms.

2002-05-10 Thread Chris Andrews

On Fri, 10 May 2002, Chris 'Billy' Abbott wrote:

> This is the only one that i've seen which goes in the memory slot:
> 
> http://www.palm.com/products/accessories/expansioncards/bluetooth/
> 
> but it does look pretty shi-knee, if you're a bluetooth fan.

Hmm. I've got one of these. It's OK, in that it works to my T39, but you
can't leave it in there, as it sticks out of the top of the palm by about
a centimetre, so the chances of it snapping off in my pocket are high...

OTOH, war-sitting-on-the-train, anyone?

Chris.






Re: ADSL

2002-03-13 Thread Chris Andrews



On Tue, 12 Mar 2002, Steve Keay wrote:

> Anyone using the Alcatel drivers (modprobe speedtch, etc) should
> immediately change to the Benoit system.  It's easy to do, and is
> *much* better.  Tar files of my setup available upon request, etc.

Yes, benoit's drivers rock. But are you using pppoa3 or pppoa2? I've got
this setup (pppoa3), and it fails in one of two ways: either

* the psu[1] sags a bit ('cos the alcatel foot-pump takes a fair bit of
current) and the box reboots, or 

* the box stays up, but the connection dies - and when I kill pppd to
restart everything in userspace, *then* the box dies... fishy. 

Anyway, tomorrow I get one of these:

http://www.adslguide.org.uk/hardware/reviews/2001/q4/asus_aam6000ev.asp
(£118 from www.solwise.co.uk)

and all will hopefully be well.


Chris


[1] ... a spare sparc 10, actually. the router is a little embedded
pentium board.






Re: Hardware

2002-01-31 Thread Chris Andrews

On Thu, 31 Jan 2002, David Cantrell wrote:

> Don't suppose anyone knows of a UK supplier of these?
> 
> http://www.compgeeks.com/details.asp?invtid=103501

This site has a decent selection of that sort of thing: not sure if they
have the usb+firewire ones though...

http://www.pc500.net


Chris.