logs archiveIRC Archive / Freenode / #php / 2006 / June / 16 / 1
Wolfpaws
Apocs: #web or #css
Apocs
Wolfpaws: thank you :)
axolx
hey guys. i started using php as cgi through lighttpd, and some of my sites stopped working. i then found out that it's because the variable $_SERVER['PHP_SELF'] is empty. all the other $_SERVER variables are defined. any ideas?
johnm1019
Is there a way to base64_encode the whole get line, then easily de-encode it and have php auto-fill the variables w/o searching through the de-encoded string?
winn2
what is the best way to view php errors? must the debuging program be writen into the custom software? does someone have a good set of functions allready writen so i can take advatage of them?
johnm1019
axolx: im pretty sure server var's can be defined through apache conf
zircu
winn2: perhaps parse_str()
axolx
johnm1019: im using lighttpd
johnm1019
axolx: ok well whatever configuration files exist for that
axolx: if it doesn't take any config arguments you can probably pass something through the command line when you call it
axolx: otherwise i think php_ini can set something pseudo similar to _SERVER var's
         

mhillyer
Anyone know where the max_allowed_packet value for a php script is stored?
philip
axolx: cgi.fix_pathinfo = 1 in php.ini
mandric
so if i'm using latin1 as my db encoding, what should my web page encoding be, windows-1252 or iso-8859-1?
Monkey_b
tomorrow i have an apptitude test for a senior php developer position for a pretty big .com, I think I'm in over my head this time :P
philip
axolx: or read http://www.lighttpd.net/documentation/fastcgi.html or search google for additional info
axolx
philip: thanks. that did it
faither
is it possible to retrieve someone's mac address?
winn2
one of our programers is having an issue, a user can log into his sytem, and a session veriable is created. Then if he closes and reopens the window(becuse there is no logout button) and tries to login as someone else, it just sits there and hangs. Now i am no programer but would like to give him a few ideas. Should the session variable be reset, or ended once he is done using it?
faither
mac address - is it possible to retrieve?
winn2
does that make sense?
adam_
father - not through php
faither
asp?
adam_
i dont think so - it is more of a networking issue. I think that only the directly connection machines can see the MAC address. but I may be wrong
faither
weird because i was banned from a forum for no reason and no matter what ip i try to post from, it won't let me
plus my cookies are cleared
weird stuff
adam_
humm, maybe it has banned your ISPs proxy. that is the best i can suggest.
faither
will anyone here allow themselves to get chipped?
thanks adam
richardlynch
I'll eat potato chips. Does that count?
faither
nope
it doesnt
will u take a chip in your right shoulder
Wolfpaws
!+u
php-bot
Surely you mean 'you', not 'u'? The letter 'u' is not a personal pronoun. Talking like this in ##php may get you silenced. For details, /msg php-bot aolbonics
         

faither
i'm telling you people will be getting chipped by 2010
zircu
Wolfpaws: storm-bot doesn't accept commands via a /query window?
Wolfpaws
zircu: no storm-bot... php-bot
richardlynch
Oooh, php-bot got resurrected? Cool.
faither: I am sure that by 2010, many people will get "chipped" whatever that means... So?
Wolfpaws
zircu: But if you're thinking about my bot? Yes, yes it does... It acts like php-bot... Well... There is still a glitch that I need to flatten out
faither
richard
www.verichipcorp.com
Wolfpaws
!+enter
faither
the chip is coming
php-bot
Don't use the enter key as punctuation. Think in complete thoughts, then type.
faither
16 digit number
there will be subway hackers with scanners LOL!
richardlynch
I ain't gettin no damn ID chip in my body, thank you very much.
Wolfpaws
(Action) dislikes idiots
faither
that's what they all say at first
adam_
indeed
Jymmm
The ONLY electronics goin in my body is a pace maker.
richardlynch
You can put one in my dog (if I had one) but not me.
zircu
or a cat
Jymmm
or bird
Wolfpaws
or hamster
Jymmm
no, hamsters most carry a photo id
faither
also the north american union is coming
by 2010
www.spp.gov
check it out
richardlynch
I think it's a fine idea for a pet. And I can even see uses for, say, mentally incompetent, convicted criminals (perhaps for reduction in sentence) etc. Where's the PHP?
YaroslavVB
anyone knows how I can execute a shell script from inside php?
zircu
YaroslavVB: php.net/exec
richardlynch
YaroslavVB: http://php.net/exec
faither
ok guys
thanks for the chat
remember the chip
terminator is coming!!
zircu
i think someone watches to many movies
faither
ya ok
orfeu
hello
how can i install a beta program in pear ?
faither
google scott silverman
Jymmm
!+pear
php-bot
[PEAR] PHP Extension and Application Repository, a framework and distribution system for reusable PHP components. ##PHP does not support PEAR, please see http://pear.php.net/support.php.
faither
or you tube him
later
zircu
hopefully much later
Wolfpaws
He was ""<-- this close
richardlynch
whew.
Wolfpaws
For a mute, that is, not anything else :3
richardlynch
Sorry I asked -- just got back, and thought it was something interesting or at least relevant.
Wolfpaws
richardlynch: neither :)
NBrepresent
hi, in a cpanel hosting environment, how do i put files 'outside the document root' ? how do I refer to them if they're outside my public_html folder?
richardlynch
Well, yeah, NOW I know.
Wolfpaws
richardlynch: rofl
richardlynch
NBrepresent: If they are in some folder that is not "public_html" or whatever cpanel gives you, then they are "outside". You can use include_path to refer to them.
roue
hola.
richardlynch
When I walked in, he was just asking if anybody was gonna get chipped, and I thought he was trash-talking PHP somehow.
legolas558
is eval("\$$uvar='$uval';"); equal to $$uvar=(string)$uval; ?
Jymmm
little does he know that we've already chipped him
roue
I'm running into a segmentation fault when I try to ldap_start_tls to a server that has an SSL cert from IPSCA.com . I suspect my server (Redhat AS4) doesn't recognize the certificate authority. Anyone know how to tell php to ignore that it doesn't recognize the CA or to add the CA to my box?
richardlynch
leolas558: No. The '$uval' should be (string) $uval for them them to be the same. And don't use eval anyway.
!tell legolas558 about eval
YaroslavVB
I'm complete newb at php -- exec executes the command, but how do I display the output of the command on the page?
zircu
YaroslavVB: it depends on the php.net/exec tool you use
||cw
YaroslavVB: passthru, or read the man page for exec and system
richardlynch
YaroslavVB: exec($command, $output, $error); echo implode('', $output); if ($error) die("OS Error: $error");
legolas558
richardlynch: i am trying to substitute the eval expression with $$uvar=(string)$uval; I guess I am safe
NBrepresent
you mean set_include_path? i'm looking at that, but i don't understand what that has to do with 'outside the docroot'.
richardlynch
YaroslavVB: Course, if you had my custom perror extension, you could look up that error code: http://l-i-e.com/perror/
zircu
php.net/exec should point you to serveral different options on executing shell commands
YaroslavVB
zircu: is there a default exec for php distributions?
richardlynch
NBrepresent: When you do an "include" PHP looks in all the directories listed in include_path. If your directory outside doc_root is in that list, PHP looks there.
Jymmm
OH gawd... you work with 8 different graphics applications and start entering the command for one into that other. LOL
zircu
richardlynch: perror? hmm
richardlynch
zircu: Yeah, I got tired of opening a shell to do it. :-)
zircu
richardlynch: you get that in pecl yet?
NBrepresent
richardlynch: doesn't it just look wherever you tell it to? like include 'includes/whatever.php'; ?
richardlynch
I need Windows testers for http://l-i-e.com/perror if anybody's interested...
Jymmm
richardlynch this isn't #betatesters
richardlynch
zircu: I'm hoping to convince Rasmus to just put it into exec.c... I think. I have never used PECL.
Jymmm: Sorry.
YaroslavVB
is there any online guide how I can use PHP to take text from a user, feed it to an external program, and then print the output?
Kartagis
later all
richardlynch
Jymmm: Is there really a #betatesters channel somewhere?... I'm not finding it in this X-Chat channel search window.
Jymmm
richardlynch fiik
richardlynch
YaroslavVB: Errr. Taking text from a user to feed to exec() is a Bad Idea in general... Unless you REALLY TRUST them and they know what they are doing, in which case you'd be better off just giving them a shell account.
YaroslavVB: Require Reading: http://phpsec.org http://php.net/exec (which does the part you are asking)
YaroslavVB
ok, I got the exec part, I guess I'm looking for an example that takes contents of TextArea, and feeds it into program's "standard input"
richardlynch
$textarea_data = $_POST['textarea_data']; http://php.net/escapeshellarg may help.
Jymmm
!+xss
php-bot
[XSS - Cross site scripting] NEVER accept user input without some type of filtering . See: http://en.wikipedia.org/wiki/XSS and http://www.technicalinfo.net/papers/CSS.html
richardlynch
YaroslavVB: You REALLY need to be super careful about shell-injection attacks, which is why we're feeding you all these URLs. You could spend a lot of time studying them and still leave yourself wide open to a Bad Guy.
Julian|Work
Jymmmmmmmm
XSS is great.
YaroslavVB
well I don't think I need to worry about that since my ISP takes care of CPU/memory limiting
Jymmm
Julian|Work: what's happening?
(Action) lol @ YaroslavVB
richardlynch
YaroslavVB: shell-injection and CPU/memory limiting have very little to do with each other...
mkrufky
this is an off-topic question, but i know someone in here knows the answer --- i need to kick someone in my channel (he is flooding us) but chanserv lacks a "kick" command... what is the command? (please dont kick me)
BigE
mkrufky: /kick
Jymmm
(Action) snickers
mkrufky
you would think....
BigE
mkrufky: Type /help kick and your client should show you how to use it
mkrufky
hehe ok
(Action) feels like a jerk
brb
Jymmm
mkrufky not a jerk, a goober yes, but not a jerk =)
richardlynch
mkrufky: You should be able to do /stats p and find a freenode staffer... If I'm recalling the docs I read yesterday correctly.
mkrufky
i got it now
the problem was that i was trying to send the command to chanserv
thanks a lot
BigE
Heh. Welcome.
Jymmm
We in ##php reserve the term "jerk" for BigE when he's having PMS.
Wolfpaws
mkrufky: Why are you're doing PHP IRC 'bot?
Jymmm
Yes that's PMS... PHP Mean Streak!
BigE
pwned.
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 next »