Re: [PHP] Finding if a number is in the range

2001-05-18 Thread MaD dUCK

also sprach Zak Greant (on Thu, 17 May 2001 11:50:35PM -0600):
> Do you really need a chainsaw to cut a piece of cake? ;)

hehe. depends.
and come on, i simultaneously have a point and am joking...

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
fermentation fault.
coors dumped.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Finding if a number is in the range

2001-05-18 Thread MaD dUCK

also sprach Joseph Blythe (on Fri, 18 May 2001 02:29:40PM +0930):
> I give these ideas a go unfortunately the ranges are not contiguous, 
> they are all over the place.

so you make new ranges to fill spaces and associate a bool with
each... or you check them linearly...

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
"for art to exist,
 for any sort of aesthetic activity or perception to exist,
 a certain physiological precondition is indispensable: intoxication." 
-- friedrich nietzsche

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Finding if a number is in the range

2001-05-17 Thread MaD dUCK

also sprach Zak Greant (on Thu, 17 May 2001 09:35:18PM -0600):
> Or just use a simple chain of if statements :)

yeah, but that's so O(n) !
i can do in O(lg n)
or, given n CREW processors, in O(1) time!

yes, i have just finished my computational theory and computer
algorithms honors exam.

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
si vis pacem, para bellum

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Finding if a number is in the range

2001-05-17 Thread MaD dUCK

also sprach Joseph Blythe (on Fri, 18 May 2001 11:12:23AM +0930):
> How do I find if a number is in a range example:

assuming that the ranges are continuous, make an array of the first
number for each range and then implement a custom binary search for
O(lg n) performance.

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
"i wish there was a knob on the tv to turn up the intelligence.
 there's a knob called 'brightness', but it doesn't seem to work."
  -- gallagher

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Why is this not working

2001-05-17 Thread MaD dUCK

also sprach YoBro (on Fri, 18 May 2001 10:45:12AM +1200):
> If I try su nobody it asks for nobody's password. If i enter no
> password a I get Authentication denied.

you aren't root.

can you give me an output of 'ls -l '

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
printer not ready.
could be a fatal error.
have a pen handy?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Why is this not working

2001-05-17 Thread MaD dUCK

also sprach YoBro (on Fri, 18 May 2001 10:34:34AM +1200):
> If i do that using telnet it asks for nobody's password.

do it as root. su is 'switch user' and nobody has no password.
he's trying to get you to execute the command htpasswd just like
apache would execute it when you call passthru in php.

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
all i ask of life is a constant and
exaggerated sense of my own importance.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] way to protect .php file

2001-05-16 Thread MaD dUCK

also sprach Maxim Maletsky (on Thu, 17 May 2001 02:25:47PM +0900):
> no no and no.

oh sure you can. identify the group that apache runs as, then chown
the directories 0750 and files 0640 after chgrp'ing them all to the
same apache group, and you're set. i have my apache run as user
apache and group webdev and permissions at 0570/0460 respectively,
which allows apache to read and everyone in webdev to write. however,
noone else has permissions.

nevertheless, public keys for databases... please?

and then on another note, why do you have users on a webserver who
aren't developers???

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
there's someone in my head but its not me.
-- pink floyd, the dark side of the moon, 1972

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Uptime script?

2001-05-16 Thread MaD dUCK

also sprach Ron Pitts (on Wed, 16 May 2001 10:18:06PM -0400):
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> This does not work. This list is like the mafia: Once in, never out. 
> That sucks. The list managers are morons.

will you chill please? of course it works. you are at fault. do you
want me to unsubscribed you? hint: use the right email address, or
send email to php-general-unsubscribe+rpitts=rochester.rr.com.

dude, this is a clear case of user interface error...

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
two manic depressives named mastick
had marital problems, quite drastic.
her mood swings were mild,
but his were quite wild.
the two were not homoscedastic. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Uptime script?

2001-05-16 Thread MaD dUCK

also sprach Ryan Christensen (on Wed, 16 May 2001 06:47:08PM -0700):
> No.. as I said in my original post, this is on Linux.. so I was actually
> wondering how it would be a risk in Linux.. not win..

sorry, i haven't really followed the thread.
well, *iff* your system is properly configured *and* you take good
care of it, then uptime is not an indication of vulnerability.
however, it may well be an indication of how old your kernel is.

if all you want to do is show that your server is stable, then go
ahead and state it's running on linux. seriously, i don't think you
need to prove it. in fact, it seems kind of silly to do so - it's
commonly known and eventually, even the biggest dorks will get tired
of service pack 7b service release 2 patch level 3 second attempt.
excuse me, but the entire windoze 2000/xp joke is about the dumbest
thing that anyone could have ever done to the community. it's
ridiculous in fact.

however, i have something against those users that try hard for the
sake of whatever to have large uptimes. if a new kernel comes out, you
give it two weeks to find out about bugs, and if it's good, you slam
it on. my machines never have uptimes longer than a month, but that's
because i willingly take them down because i care for them. i have
never experienced any of my *BSD or Linux machines crash. sure, i have
done the equivalent of deleting the registry (rm -rf /etc) or have
accidentally disconnected running harddrives, but all UNIX would tell
me is to *please* fix it *while* continuing to run and service users
as usual.

don't compete for high uptimes. take care of your systems and keep
them current. and if you are running windoze in a serious environment,
the ask yourself why the output field in uptime.exe is only 8 bits in
size :->. i found this out as part of a trace debug when someone
pointed this out on bugtraq i think and i didn't believe it.

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
redistribution of this email via the
micros~1 network is prohibited.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Uptime script?

2001-05-16 Thread MaD dUCK

also sprach Ryan Christensen (on Wed, 16 May 2001 06:35:32PM -0700):
> Take a machine down, knowing it's uptime?  (I.e., it's easier to
> hack a box that's been up for 5 months.. as opposed to one that
> hasn't been??)

um, why?
please don't answer if you use windoze for then the answer is obvious.
no intention to flame or whatever, just reading bugtraq...

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
"this week dragged past me so slowly;
 the days fell on their knees..."
-- david bowie

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] OT question..

2001-05-09 Thread MaD dUCK

also sprach Christian Reiniger (on Wed, 09 May 2001 06:44:17AM +0200):
> Again sorry to the people offended, but I still have the opinion that the 
> quote has by and large positive effects. I've now included a note into 
> the sig to clear out the misunderstandings that could easily happen.
> 
> EOT, ok?

except now you are opening up yourself for attack from all the
traditionalists, who believe that signatures are supposed to be *no
longer* than 4 lines...

i still suggest refraining from use of the quote for mailing lists...

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
"a rock pile ceases to be a rock pile
 the moment a single man contemplates it,
 bearing within him the image of a cathedral."
   -- antoine de saint-exupery

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] OT question..

2001-05-08 Thread MaD dUCK

also sprach Billy Harvey (on Tue, 08 May 2001 09:11:15PM -0400):
> Is someone quoting Adolf Hitler grounds for imprisonment in Germany
> now?

of course not.

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
humpty was pushed.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] IIS instead of PWS!!! what else can i do..

2001-05-06 Thread MaD dUCK

also sprach Thomas Edison Jr. (on Sat, 05 May 2001 11:52:34PM -0700):
> i think i'm almost at the verge of giving up...somehow
> the PWS in my system is ruined forever...i'd done
> everything..and i mean *EVERYTHING*...but PHP just
> doesn't seem to be working with my PWS. In fact, even
> my ASP scripts are not working anymore on PWS. I've
> uninstalled & reinstalled PWS twice already. it's just
> *&*%^. anyways, i think i'm gonna be trying out the
> IIS option. Is IIS ok to work with PHP4? any problems?
> and is there anywhere on the Internet that i can get
> IIS 4 from?

if i were you, and i am serious about this, then i'd install apache on
your windoze system. it was the best move i ever made back then when i
was still using windoze.

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
above all, we should not wish to divest
our existence of its rich ambiguity.
  -- nietzsche

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sorry, what is "PWS"

2001-05-05 Thread MaD dUCK

also sprach [EMAIL PROTECTED] (on Sat, 05 May 2001 11:23:42PM +0200):
> What is "PWS"? I wanna know what I´m reading about ;-)

micro$oft's joke they call "Personal Web Server" - comes installed by
default on win98 by now, doesn't it. Because *everyone* needs a
Personal Web Server.

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
-- 
"mirrors should reflect a little before throwing back images."
   -- jean cocteau

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Protecting programs

2001-05-03 Thread MaD dUCK

also sprach Richard Kurth (on Thu, 03 May 2001 04:31:42PM -0700):
> Is there any way to protect a php program. Like you can other software
> were you can limit the amount of time they can use it. something like a
> compiled c program that the php program would have to look of a cod
> otherwise it will not work. Or am I just dreaming

uhm. open source. you can protect it against the dumbest, but other
than that... make some vital features of it dependend on a server that
operates only when it receives a unique serial (md5sum) in the
request, which you can check againsta a database of expiration
dates...

obfuscation/encryption may also work, but that's crackable. or you
provide a vital part as executable that you system() from the
script...

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
"in the country of the blind,
 the one-eyed man is not king.
 he is taken to be a hallucinating lunatic."
 -marshall mcluhan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Starting PHP script with crontab

2001-05-03 Thread MaD dUCK

also sprach Noah Spitzer-Williams (on Thu, 03 May 2001 03:34:02PM -0400):
> > > with lynx (lynx http://www.domain.nl/test.php) as a commandline within

did you use 'lynx -dump '???

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
"may your future be limited only by your dreams."
  -- christa mcauliffe

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] "highest" file

2001-03-02 Thread MaD dUCK

hey,

given a directory structure like

$DOCUMENT_ROOT/2001/03/02 (where 02 is a file in dir 03/

which obviously represents a date, i would like to implement a page
such as latest.php, which will go to $DOCUMENT_ROOT, list all the
directories, sort them numerically, choose the largest, chdir, repeat,
chdir, and obtain the name of the file that is associated with the
"highest" number.

this is related to an announcement page, where a central page
display.php handles the date directory tree. sometimes, there are
releases on consecutive days, but it may happen that an announcement
is a couple of days back, in which case i want latest.php to find it
automatically and dynamically.

any hints?

martin

[greetings from the heart of the sun]# echo madduck@!#:1:s@\@@@.net
-- 
"when I was a boy I was told
 that anybody could become president.
 now i'm beginning to believe it."
-- clarence darrow

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] hiding .php

2001-02-26 Thread MaD dUCK

also sprach Fredrik Arild Takle (on Mon, 26 Feb 2001 10:34:11PM +0100):
> did you get answers to your problem?

not from the list. but i found two solutions, both of which require
modification of httpd.conf, and both of which are ergo
apache-specific:

http://www.zend.com/tips/tips.php?id=145&single=1
http://www.zend.com/tips/tips.php?id=147&single=1

i will be using the first one because it provides greater flexibility.

martin

[greetings from the heart of the sun]# echo madduck@!#:1:s@\@@@.net
-- 
windows nt crashed.
i am the blue screen of death.
no one hears your screams.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] hiding .php

2001-02-26 Thread MaD dUCK

hi,
i would like to set up a script "forum" such that you can call a url

http://www.server.com/forum/general

and it will php-parse forum and pass /general as PATH_INFO. it's easy
to get done as http://www.server.com/forum.php/general, but i would
like to disclose the script name for reasons of obscurity.

in fact, i would really like every request to be fed through something
like /index.php, where the actual relative URI of the site is passed
as PATH_INFO. so something of the form

http://www.server.com/url/to/a/page

would call /index.php with PATH_INFO=/url/to/a/page, and index.php
could take care of whatever needs to be done to display that
information. this can easily be done with a 404.php script, but i'd
much rather do it transparently without this sort of abuse of the 404
feature.

thanks,
martin

[greetings from the heart of the sun]# echo madduck@!#:1:s@\@@@.net
-- 
"and no one sings me lullabies,
 and no one makes me close my eyes,
 and so i throw the windows wide,
 and call to you across the sky"
   -- pink floyd, 1971

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]