logs archiveIRC Archive / Freenode / #php / 2006 / June / 10 / 1
bemson
anyone know anything about sockets.use_system_read?
diogo86
Buchannon, usually the session cookie expires at the end of the session. you might change setting a new expiration time. beyond this sessions are supposed to expire at the sever in 30 minutes (although I guess it doesn't happen at all)
Buchannon
richardlynch: ahhh it is registering www.domain.com and domain.com as two seperate sites
menthol616
One more question i need a wait function, it doesnt look like i have m_uwait in my version of php
richardlynch
Buchannon: I think you want to put ".domain.com" into your Cookie parameters... http://php.net/session_set_cookie_parameters The "." in front matters.
menthol616: http://php.net/usleep
Buchannon
richardlynch: I dont have any cookie parameters even set yet - it was doing it automatically - is that an option I'd change in my php configuration ?
Toxygene
richardlynch: Yup, did that. I added a memory_get_usage() right before and after the call to xml_parse(). That's how I finally figured this out.
blanky
hey guys in PHP how do you see if a string is within a string, for example, if I have "blah bob joe truck", and I want to know if that string includes "bob", how would I do that
diogo86
blanky, php.net/strpos
         

blanky
diogo86, thanks sir
Buchannon
richardlynch: is this the line I'm looking for on php.conf? //domain for which cookie is valid, session.cookie_domain = .domain.com ?
enygma
php.ini
richardlynch
Buchannon: You can change that there, or just call the function in your PHP code...
Buchannon
richardlynch: ahh - that worked. everything is good now - sorry for all the questions and junk, thanks so much
richardlynch
Buchannon: TIP: For session/cookie stuff, ALWAYS start off with the browser prompting for each cookie. keep your sanity.
RommeDeSerieux
i have a problem with logging out of an HTTP AUTH session: http://pastebin.com/770833
diogo86
RommeDeSerieux, do you get any error message or it just does not work?
Buchannon
richardlynch: so in my index.php file I can have a line that says "$session.cookie_domain = .blabla.com" ??
RommeDeSerieux
whenever i log out, my program enters an infinite loop, and keeps asking for login/password
richardlynch
Buchannon: No, but you can call the session_set_cookie_params function.
Same thing, different spelling.
diogo86
RommeDeSerieux, try if( ... == logout ) first and then the else if comparing the password
johnm1019
is it possible to set a timeout for the file_get_contents function?
Pollita
Yes
And by "set a timeout for the function" I presume you mean "set a timeout for the http:// wrapper"
richardlynch
johnm1019: You use ini_set on the fopen timeout setting thingie.
RommeDeSerieux
diogo86: no way, still keeps asking
Pollita
; Default timeout for socket based streams (seconds)
default_socket_timeout = 60
johnm1019
Pollita, yes -- how do i do that? the php.net/file_get_contents isn't revealing much -- and are you and richard talking about the same thing?
Buchannon
richardlynch: ah so just call "session.cookie_domain .blabla.com" before session_start()
richardlynch
Buchannon: Yes.
         

Pollita
Yes, we are.
Buchannon
richardlynch: sweet, that makes sense I guess for subdomains and such -
Wolfpaws
Ricer... Sounds familliar... Pollita: Isn't that a 'bot? A broken bot?
Buchannon
richardlynch: yay - thanks again /bow
Pollita
Wolf: Yes, yes it is.
Wolfpaws: I'll give *your* bot some slack. but not one who's *** on channels: #fvwm #idlerpg @#init #passkey #botpark #nluug @##init #tfp
Wolfpaws
Pollita: My bot is bit less agressive... Still needs a bit of redoing, tho...
blanky
hey guys im in a bit of a problem here, and I don't do much php so even though this might be a really simple problem, I don't know what to do. The thing is I have html code which I want to output only if a certain condition is met, so this is what I have (two lines long) http://pastebin.com/770850
but it doesn't seem to work, because since the html isn't within the conditional statement (is it?), it always evaluates/executes the html
Chillax
add brackets
blanky
bracketes?
ah okay
i tried that, hold on
Chillax
curly braces. whatever
diogo86
blanky, try <? if( ... ){ ?> htmlhtmlthml <? } ?>
Chillax
yes
that
blanky
yeah I tried that, let me try once again, thanks guys
Wolfpaws
ew.
!+short tags
stormbot
Short tags are <? or <%, and should never be used. They are scheduled for removal from PHP6, and are configuration dependant. Use <?php, period.
diogo86
Wolfpaws, he did.
richardlynch
blanky: http://pastebin.com/770853
blanky
heh
Wolfpaws
diogo86: But you didn't
blanky
richardlynch, will try, thanks
diogo86
Wolfpaws, i wil.
blanky
thanks, worked
rcanr
news://teknikev.hopto.org
Wolfpaws
!+g7
stormbot
Guideline #7) No spam, bots, scripts, trolls, job postings (no job posting / asking for jobs on ##php. You might want to check out: ##php.jobs http://www.geekfinder.com, http://www.monster.com, http://www.rentacoder.com or http://www.getacoder.com, or php.net/links, "Developers and Job Opportunities"), advertisements or onjoin/away/back messages.
eric
why is short tags in php if nobody should ever use it?
richardlynch
eric: It was very handy, until the XML guys stole it. :-)
Wolfpaws
thing "portability"
eric
i grew to love <?= in my template files
Wolfpaws
*think
richardlynch
<?= in particular is quite nice.
BigE
eric: It won't be soon. PHP 6 will remove it completely.
eric
yes i know
richardlynch
I will miss <?= :-(
I don't care about <? versus <?php, mind you.
Chillax
good riddence
eric
ive learned quite a bit of what not to do from the php mailing list from richard ;)
BigE
I won't miss scripts breaking on my system because they use short tags.
richardlynch
I don't install other people's scripts on my system very much... :-)
And if they need something innocuous changed, I've got .htaccess for that. But if they can't run with E_NOTICE on, it's bad script, so won't use it. Different strokes for different folks.
johnm1019
whats the best way to check if a given instance of php has support for function X or y?
eric
function_exists ?
richardlynch
http://php.net/function_exists for most functions.
BigE
johnm1019
sounds good
thanks
BigE
jeebus my head hurts. :\
only 30 more minutes.
richardlynch
32 minutes. :-)
Chillax
till what?
richardlynch
Friday, 5 pm. :-)
BigE
Eh, 27 by my clcok, but I was rounding anyway.
Chillax
ah, i have several more hours
sad day
endra
I need.. some help with writing a letter to someone important, anyone have a few minutes :-/
Chillax
but that is life when you dont get in to the office until around noon
richardlynch
Actually, me too... And then I just go to be sound engineer at second job.
Chillax
writing a letter to me?
RommeDeSerieux
lol
richardlynch
Ah, yeah. Came in at 1:30 pm today.
endra
hehe nah
Chillax
got here at noon, watched some world cup matches on my computer for a while
endra
but seriously, if anyone has a few minutes I just need some help with a few words
L1nX
sound engineering?
Chillax
will leave as soon as im last man standing, which on fridays shouldnt take too long
diogo86
endra, i'd help you if at least I knew english =P
Chillax
endra: how long is your letter?
endra
like 1 page but I just need to get some words right
its to an ambassador, quite important
Chillax
which words do you need help with?
endra
the ones that I dont remember
richardlynch
L1nX: Yes. http://uncommonground.com is my second day job... :-)
Chillax
hehe well clearly, how about...what are you trying to convey that you can't find the words for
richardlynch
endra:Chillax: How about just pastebin-ing it?...
L1nX
what equip. do u have there?
johnm1019
is there any other way to force a timeout of the file_get_contents -- this needs to work on servers (which includes ours) that have ini_set disabled
Chillax
maybe some thesaurus work is in order endra
johnm1019
otherwise i could just ini_set the fopen wrappers
endra
"[I have been cooperative], but one can [only be so cooperative]"
richardlynch
L1nX: http://uncommonground.com/sound.htm -- The monitors and the Rane amp have been replaced with Yorkville, and we swapped the two amps FOH/monitor 2 weeks ago. Still need to update that page.
endra
I just need the 'I can be cooperative to an extent"
type of sentence :-/
richardlynch
We use PHP in the sound booth, so we're on-topic :-)
Wolfpaws
L1nX: Care to speak english?
richardlynch
endra: Just stop at cooperative. It doesn't imply complete and total submission. :-)
endra
but repeating aint good is it
Wolfpaws
nope
FearMoth
is there a function to split lines of text entered in a textarea into an array?
L1nX
Wolfpaws: may bad... sorry.. I am used to typing AOL speak :P
Wolfpaws
L1nX: not here.
Pollita
L1nX: Nothing to be proud of.
Chillax
aol...the downfall of our youth
s/youth/language
BigE
FearMoth: nl2br() might be what you need... http://php.net/nl2br
richardlynch
Text messaging didn't exactly help... :-)
BigE
er wait
L1nX
yes... well its because of Counter-Strike and Texting
BigE
into an array... then it would be exlpode() :P
(Action) smacks himself
Chillax
i text in proper english (save the capitalization and punctuation)
FearMoth
BigE: is textbox newlines in the form of \n or \r\n ?
richardlynch
I don't even know how to make my blackberry send or receive text -- don't even know what the email? phone? would be to send one to me.
BigE
FearMoth: Depends on the users OS :)
Could be \r \rn or \n
richardlynch
FearMoth: It is dependent on the user OS: $input = str_replace("\r\n", "\n", $input); $input = str_replace("\r", "\n", $input); //now it's Unix \n only.
Wolfpaws
!+nl
stormbot
Newlines are hidden (not normally visible) control characters that distinguish the end-of-a-line of text and are different for each platform as follows: [Windows = \r\n] [*nix & OSX = \n] [Classic Mac = \r] And can be seen as: [LF (linefeed) = \n, 10d, 0x0A, 0001010b] [CR (carriage return) = \r, 13d, 0x0D, 0001101b]
BigE
Er, cut that down to one line... str_replace() takes arrays.
richardlynch
Oh yeah. I keep forgetting they added that... :-)
BigE
$input = str_replace(array("\r\n", "\r"), "\n", $input);
richardlynch
But the order is important. Is it documented to do it in a specific cascadding order?...
FearMoth
thank you
« 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 next »