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-26
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 >
[22:53]<crgguggu>i don't see ob_start in the latter paste
[22:53]<ffrggnf>kaneuneu: no, a call to the writeToFile function (the one I want as a callback)
[22:53]<tml>Flannel: That's fine. That's not the question I asked. How do you know the ob_start() isn't working properly? What are the symptoms?
[22:54]<ffrggnf>TML: it doesn't call the callback function, ob_start works fine, it buffers. Just never registers the function. Did I say smething confusing somewhere?
[22:54]<tml>Flannel: How do you know it doesn't register the function?
[22:55]<ffrggnf>TML: because it doesn't get called.
[22:55]<tml>Flannel: Ahhh!! But that doesn't mean it doesn't get registered!
[22:55]<ffrggnf>TML: well, I imagine since the function works, *something* gets registered, but that doesn't really help
[22:56]<tml>Flannel: In order to establish why it doesn't get *CALLED*, we have to start looking at how / when **ob_end_flush()** gets called. Which, thus far, you have been protesting "is not the problem"
[22:56]<ffrggnf>and, it's not the constructor issue, since I tried calling it from a member function (setCache) and it still didn't work
[22:57]<ffrggnf>TML: I don't think I ever claimed that the flush wasn't necessarily the problem, just that it DOES buffer
[22:57]<ffrggnf>and it's not an issue with my callback function being malformed
[22:57]<tml>"However, that's not the issue"
[22:57]<ffrggnf>TML: that was regarding 'destruct'
[22:57]<tml>Flannel: I don't see any reason to believe that the callback doesn't get registered. When does ob_end_flush() get called?
[22:58]<ffrggnf>TML: implicitly
[22:58]<tml>Flannel: Becuase, in what you've shown thus far, that's the only time ob_end_flush() gets called
[22:58]<tml>Flannel: ob_end_flush() never gets called implicitly.
[22:59]<tml>You have to call it explicitly. If you don't, you'll hit the end of execution and never flush any output.
[22:59]<ffrggnf>er, but I *do* get output, I just don't get the function
[22:59]<ffrggnf>and, it does get flushed, at least, per the documentation, let me find it
[23:00]<tml>Flannel: So, if you're letting it go until the end of the request, as kaneuneu has pointed out, it's too late to process the data with output buffering.
[23:00]<ffrggnf>oh, excuse me, ob_end_flush may not, but...
[23:00]<ffrggnf>or when the output buffer is flushed to the browser at the end of the request.
[23:00]<ffrggnf>that's part of ob_start
[23:01]<tml>Flannel: Right. At which point, you cannot process data via ob.
[23:01]<ffrggnf>why not?
[23:01]<wdrrvs>Is there something like array_diff_key that checks an array of arrays?
[23:01]<tml>Flannel: Because you can't.
[23:02]<ffrggnf>TML: right, why not. Since that certainly seems to inferr it can be.
[23:02]<crdy->Windows XP was installed 10wks 1day 55mins 12secs ago
[23:02]<crgguggu>wycats, sounds like something you'll have to make yourself... either that or read through tht array functions
[23:02]<crdy->How do I fix so that users fomr my database can have their own page, like ownpage?user=id
[23:02]<wdrrvs>I need to work out the algorithm:
[23:02]<tml>Flannel: Because until PHP5, all the output buffers are destroyed before that happens.
[23:03]<wdrrvs>Check the top level.. if there's a difference, add that to the differences array...
[23:03]<wdrrvs>Check the next level... if there's a difference, add it to the differences array as a sub_array of it's parent...
[23:03]<wdrrvs>etc.
[23:03]<curr>kami-: Design an interface?
[23:04]<ffrggnf>TML: er, that makes no sense. Is this documented *anywhere*? Is there a speratate PHP4-only documentation somewhere?
[23:04]<crdy->uh, what? :)
[23:04]<crdy->I got a table, 'users'
[23:04]<crdy->with a ID-field, it's unique, auto_increment etc.
[23:05]<tml>Flannel: Destroying the output buffers happens before register_shutdown_function, and register_shutdown_function happens before the end of the request.
[23:05]<curr>kami-: So?
[23:05]<ffrggnf>TML: this is *NOT* register shutdown function.
[23:05]<tml>Flannel: I KNOW IT'S NOT.
[23:05]<crdy->kuja: what do you mean by design an interface?
[23:06]<tml>Flannel: <?php your code here; where a register_shutdown_function() would be called; implicit flush; ?>
[23:06]<crdy->can you point me in a direction?
[23:06]<tml>Flannel: register_shutdown_function is brought up because it's the very last entry point available to PHP before implicit flush happens
[23:06]<crdy->to a forum, help page, whatveer
[23:07]<ffrggnf>TML: so, how are you supposed to be able to fiddle with the buffer passed, before it's sent to the browser? like the documentation says
[23:07]<2eeygpenne>hey
[23:07]<2eeygpenne> i want some affiliate ads to circulate on a page, is there a tutorial online for such stuff?
[23:07]<tml>Flannel: By either using PHP5, or fiddle with the buffer explicitly using register_shutdown_function() in >4.0.6.
[23:07]<tml>Flannel: Before 4.0.6, it wasn't possible at all.
[23:08]<ffrggnf>Ah, right. Goddamned mixed documentation. so, like... 3/4s of the description of ob_start is only valid in PHP5?
[23:08]<tml>Flannel: Right.
[23:08]<ffrggnf>I hate PHP
[23:08]<tml>Flannel: I assure you, it hates you as well
[23:09]<2eeygpenne>PHP SUCKS
[23:09]<ffrggnf>TML: so, is there some PHP4 explicit documentation somewhere? Or, how would I go about bodging this
[23:09]<tml>Flannel: call ob_end_flush() explicitly at the end of your script.
[23:09]<ffrggnf>that defeats the purpose of using objects. Gaah.
[23:10]<tml>Not sure how you figure that one.
[23:10]<ffrggnf>because it means I've gotta call crap which *should* be called automatically
[23:10]<krdvfdgq009>I am used to running PHP on my local windows, and using PHP in shared hosting environemtn, so basically no choice to change things. If I want to add something like ionCube do I have to re-install PHP? No, right? What about various modules? For windows it's as simple as uncommenting the line in php.ini :)
[23:11]<curr>There's a purpose to using objects that is related to output buffering? They seem to be totally unrelated subjects :P
[23:11]<tml>Flannel: No, you've gotta "call crap" which WOULD be called automatically if you were using a version of PHP that had object destructors.
[23:11]<ffrggnf>TML: oh, trust me. I fully agree. Ive already bitched at my hosting provider
[23:11]<tml>Flannel: Then stop blaming the language.
[23:11]<ffrggnf>I'm just frustrated because the documentation is completely misleading
[23:12]<wjlllrws>it's not
[23:12]<tml>Flannel: I disagree. Both myself and kaneuneu, at a minimum, understood it perfectly.
[23:12]<ffrggnf>Wolfpaws: ob_start, 3/4ths of it is NOT for php4, even though there's no indication of that
[23:13]<wjlllrws>Flannel: There are version markers, what changed in which version in documentation
[23:13]<tml>Flannel: That's actually not true. I simply agreed with you earlier because it was easier than trying to get you to apply logic to the situation.
[23:13]<ffrggnf>Er, what? Specific documentation for specific versions? Where do I sign up?
[23:13]<eyzau>Flannel: 3/4 of the usernotes? the examples and explaination work perfectly fine for php4
[23:14]<tml>There's ONE PART that it might be argued isn't clear if you don't understand the lifecycle of a PHP request
[23:14]<ffrggnf>zircu: I spoke too soon, apparently TML wasn't being completelyhonest when I made that conjecture.
[23:14]<tml>Flannel: I didn't think YOU were being completely honest when you made that conjecture
[23:14]<z00svnz>is there a way to strip leading 0's off a string value?
[23:14]<ffrggnf>TML: I was being perfectly honest with the data you were giving me.
[23:15]<tml>Flannel: We haven't discussed 3/4ths of that page, so I don't see how you can make that assertion.
[23:15]<tml>We've discussed one sentence.
[23:15]<ffrggnf>R00ster: you can trim it
[23:15]<eyzau>R00ster: php.net/ltrim or do a $v = (int)$strval;
[23:15]<a_>I'm having a problem with this array: it's not recognizing the right value: http://hashphp.org/pastebin?pid=7755
[23:15]<krdvfdgq009>anyone? my question? :)
[23:16]<wjlllrws>Kaitlyn2004: if you're on shared hosting, you should talk to your host.
[23:17]<krdvfdgq009>Wolfpaws: no.. now im on VPS
[23:17]<krdvfdgq009>so i've got complete control
[23:17]<wjlllrws>VPS?
[23:17]<tml>Flannel: The only part of the documentation that it could be argued is a bit misleading is the assertion that output handlers will be called implicitly. That's true, if you understand when implicit flush happens in your version of PHP.
[23:17]<krdvfdgq009>virtual private server
[23:17]<tml>j_: Read your code more closely
[23:18]<a_>that's what I get for not going MVC







