IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1982.48 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-07-19
Pages: < 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Next >
[04:55]<sggsgy>linagee: As opposed to when? :)
[04:55]<mzzcl>uiruewrkljfsad: Try using foreach ($arr as $k=>$v) { ..your code here.. $arr[$k] = $v; }
[04:55]<fyrrrnn>sensei: it's still going
[04:55]<fyrrrnn>sensei: > 5 seconds
[04:55]<uyzunwzcprpsrm>hey thanks a lot MarkL
[04:55]<mzzcl>uiruewrkljfsad: That will replace the array value with your new $v
[04:55]<fyvrrn>how do you configure sessions to expire after X seconds of inactivity?
[04:55]<sggsgy>linagee: .ca is usually the fastest for me
[04:55]<yvzn2rf>sensei: me too
[04:56]<jurwjrr>what's the best idea to use multi-lang, define() or array() or gettext?
[04:56]<sggsgy>itrebal: But we shouldn't say that hm.. now more people will use it, thus slowing it down :/
[04:56]<sggsgy>:)
[04:56]<yvzn2rf>sensei: true..
[04:56]<fyrrrnn>Jameno123: ok. code is at http://pastebin.ca/91935 it's supposed to talk to gpsd. all you have to do is open a socket and type "W" and listen until \n
[04:57]<fyrrrnn>Jameno123: it comes up with [-] Timeout. I can telnet to this port at the shell prompt and it works perfectly.
[04:57]<jrdggjwq1>php 4 or 5?
[04:57]<fyrrrnn>5
[04:58]<fusxuyrr>use php34
[04:58]<mzgmzya>is it just me, or is Akismet too picky?
[04:58]<fusxuyrr>*php3
[04:58]<jrdggjwq1>linagee, have you tried to use stream_socket_clean()?
[04:58]<sggsgy>Is there a poll() for php ?
[04:58]<jrdggjwq1>err client()*
[04:58]<fyrrrnn>stream_socket_clean?
[04:59]<fyrrrnn>client?
[04:59]<jrdggjwq1>stream_socket_client
[04:59]<mzgmzya>damn, my comment was "nice!" ... wth
[04:59]<jrdggjwq1>$fd = stream_socket_client("tcp://ip:port",...);
[04:59]<fyrrrnn>hrm...
[04:59]<jrdggjwq1>then just use it like a file ;)
[04:59]<fyrrrnn>heheh
[04:59]<fyrrrnn>thanks. i hope it works. :)
[04:59]<fyrrrnn>Jameno123: then i will be able to take in GPS data. woot
[05:00]<kzsnz>This sucks. I signed up for the Zend Webinar for php developers for tomorrow at 6 pm my time
[05:00]<kzsnz>i get an email telling me it's actually a teleconfrence
[05:00]<jrdggjwq1>linagee, makes it a bit easier for ya.
[05:00]<kzsnz>and i gotta call some toll free number
[05:00]<kzsnz>that charges like, 99 cents a minute
[05:00]<kzsnz>not really "toll free"
[05:00]<fyvrrn>do extensions need to be chmod'd 644 or 755?
[05:01]<sggsgy>hehe ouch
[05:01]<yvzn2rf>litage: totally 1777
[05:01]<sggsgy>heh
[05:02]<fyvrrn>itrebal: i'm guessing you're being sarcastic
[05:02]<yvzn2rf>litage: yea
[05:02]<yvzn2rf>apache needs to be able to read them
[05:03]<fyvrrn>does anything need to be able to execute them?
[05:03]<gyacjfn>http://rafb.net/paste/results/Wc9jMF33.html is there a PHP alternative to this, beacause it looks kind of ugly when page changes, using client side redirect...
[05:03]<fyrrrnn>Jameno123: hrm. it gets stuck on while (!feof($fp)) { echo fgets($fp, 1024); }
[05:03]<fyrrrnn>Jameno123: i think it's just looping forever without ever echoing
[05:03]<jrdggjwq1>its waiting for data ;)
[05:04]<mzzcl>litage: 755 should be fine
[05:04]<fyrrrnn>Jameno123: there should at least be one line. can i give it just one line test and end at \n?
[05:04]<jrdggjwq1>its probably hanging at the fgets()
[05:04]<jrdggjwq1>not getting the \n
[05:04]<fyrrrnn>haha
[05:04]<fyrrrnn>i took it out of the while
[05:04]<fyrrrnn>that's right.
[05:04]<fyrrrnn>even if it's echoing a million times, it doesn't go to browser until it's flushed. ;)
[05:05]<jrdggjwq1>right
[05:05]<fyvrrn>MarkL: would 444 be okay?
[05:05]<sggsgy>The responding socket may be keepalive, does php close its socket after writing to it ?
[05:05]<fyrrrnn>someone should change that example sniplet on php.net. :)
[05:05]<kzsnz>link?
[05:05]<fyrrrnn>zaemis: ahhh.
[05:05]<jrdggjwq1>linagee: its flawed anyway
[05:05]<fyrrrnn>Kaser: http://us2.php.net/manual/en/function.stream-socket-client.php
[05:05]<fyrrrnn>example 1
[05:05]<jrdggjwq1>using feof() in a loop, can cause unpredictable results ;)
[05:06]<gyacjfn>http://rafb.net/paste/results/Wc9jMF33.html is there a PHP alternative to this, beacause it looks kind of ugly when page changes, using client side redirect...
[05:06]<fyrrrnn>Jameno123: hrm? name one. i am curious
[05:06]<sggsgy>Jameno123: Why's that ? It's perfectly alright in most other languages
[05:06]<fyrrrnn>sensei: as long as you flush your data or let the user know you're alive somehow. :)
[05:06]<jrdggjwq1>pass feof() FALSE as its argument ;) and watch what happens.
[05:06]<sggsgy>It loops?
[05:06]<mzzcl>litage: Try it, but i'd have thought you'd need +x too
[05:07]<jrdggjwq1>;) as it should
[05:07]<sggsgy>Yeah?
[05:07]<jrdggjwq1>i said the example was flawed
[05:07]<fyrrrnn>Jameno123: ok, this is going to be cool when it's working. :)
[05:07]<jrdggjwq1>ie: if the socket disconnects
[05:07]<jrdggjwq1>you loop forever ;)
[05:07]<fyrrrnn>Jameno123: php probably not being the best language to write it in, but it's updated once per second. not that demanding.
[05:07]<gyacjfn>http://rafb.net/paste/results/Wc9jMF33.html is there a PHP alternative to this, beacause it looks kind of ugly when page changes, using client side redirect...
[05:08]<fyrrrnn>Jameno123: eww. would i get that on a 127.0.0.1 connection?
[05:08]<sggsgy>Jameno123: If PHP:s implementation of sockets are even remotely normal, it'd eof itself regardless of termination type
[05:08]<sggsgy>Sucky..
[05:08]<mzzcl>litage: Actually I have them 755 on one server and 644 on another ..so *shrug* ;)
[05:08]<jrdggjwq1>while ($fd && !feof($fd)) {
[05:08]<fyrrrnn>hmm
[05:08]<jrdggjwq1>if fd is false (errored), it will exit the loop
[05:08]<gyacjfn>/./././././././././
[05:08]<fyrrrnn>Jameno123: submit the changes to see if the file descriptor is valid and to flush on each loop. :o)
[05:09]<fyvrrn>MarkL: checking 0444 in a minute..
[05:09]<jrdggjwq1>linagee: big warning about it on the feof page ;) go read.
[05:09]<fyrrrnn>heheh
[05:09]<gyacjfn>http://rafb.net/paste/results/Wc9jMF33.html is there a PHP alternative to this, beacause it looks kind of ugly when page changes, using client side redirect...
[05:10]<mzzcl>nickole: You could use a header("Location: .. if there's been no output
[05:10]<gyacjfn>there has been as you can see
[05:10]<fyrrrnn>Jameno123: is there a maximum amounf of time a script can run before it's killed? i want it to keep going







