Sign in or Join FriendFeed
FriendFeed is the easiest way to share online. Learn more »
Any PHP developers (as in hacks on PHP internals, not writes software using PHP) want a contract job to fix/enhance PHP? #php
Nominate SmugMug for The Crunchies! (You can do this once per day) http://crunchies2009.techcrunch.com/vote...
@NTScyborg I'm on 2.9-rare. :)
@dshafik We support all three methods to get stuff to SmugMug - multipart POST, raw POST, and HTTP PUT. raw POST is hogging RAM. :(
@ramsey That's a good first step, but I did that in PHP's internals, and it still bloats RAM way more than it should.
@rasmus Trying to figure out how to get it to behave more like PUT (very small RAM footprint, reading php://input stream). Not there yet.
@_carumba I can try, but this is a total hack job, so might not be worth much other than horror factor. ;)
@rasmus But that still takes up 2X RAM for a brief period before it goes back down to 1X, so not ideal.
@rasmus Positive this hackery will break something, but so far so good. Cross that bridge once I've solved it and run through tests.
@rasmus I know you have to support legacy stuff, but "anything better to do with it" = php://input, not http_raw_post_data, imho
@rasmus setting post_data NULL after being done with it freed up another copy (1 vs 3 now), so much better.
@rasmus Found and nuked that, but still 2X as large as PUT and multipart POST.
r @erichatch New twitter RT function doesn't let me add commentary, which is a bummer. :(
I'm like a surgeon with a chainsaw inside of PHP, but I have RAM usage down to 1X. Question is, can I do better? :) #php
HTTP_RAW_POST_DATA (which I don't want, since I prefer php://input) accounts for 1X confirmed. Presumably php://input is 1X. Where's rest?
PHP puzzler: Why does a raw POST (not multipart) cause PHP to use 3X the RAM of the POST? PUT and multi-part POST are fine. @rasmus ? #php
Hmm, think I found it. Looks like SAPI_POST_READER_FUNC() in php_content_types.c is intentionally making 2nd copy of POST data. :( #php
Hmm, so what's the verdict? Retweet using new built-in, or using "RT: @" syntax?
They're 2 different things - use both - Jesse Stay
@rasmus I don't mind either way, just wanted to make sure you were aware of the gotcha. :)
RT @rasmus: @DonMacAskill Fixed in svn http://svn.php.net/viewvc... - so awesome!! Thanks rasmus!
@rasmus POST Content-Length of 66762 bytes exceeds the limit of 0 bytes :(
@rasmus Possible side effect is that too-large values (2G, say) will cause it go negative, effectively making that setting be disabled.
@rasmus Thanks!!
@hobodave What version of Apache are you using?
@allspaw -rw-r--r-- 1 root root 5368709120 Nov 17 14:00 /tmp/5GB
@rasmus And if I set post_max_size and upload_max_size to -1: POST Content-Length of 66762 bytes exceeds the limit of -1 bytes
@andrewwatson I think that was true of Apache < 2, but I'm running Apache 2.2.3
Other ways to read this feed:Feed readerFacebook