« first day (1382 days earlier)      last day (3566 days later) » 

user895378
12:19 AM
@zeeks yes, that's correct
 
user895378
@Danack very cool. I'm not crazy about packagist, so stuff like that is always interesting.
 
12:35 AM
Guys, any hint why the single header('HTTP/1.1 200 OK'); line in a php file may cause ab to freeze for 5 seconds every request?
I see, seems like it's dns
 
try with -k
ah, k
 
oh, and -k solves it as well
weird
 
that's what killed all the zf benchmarks 2 years ago :P
no clue why it does that, it's just stupid
 
But still strange that a single line header('HTTP/1.1 200 OK'); causes that
with curl headers are identical
 
what if you set a content length?
 
12:41 AM
Then it's fast
wait, after I run it once it's always fast
uhm
apc!?!?!!?!?
Well, nope Content-Length: 0 changes nothing
 
user895378
ab is a terrible benchmarking tool. You should use siege or weighttp. I prefer the latter.
 
user895378
Also, what's the exact command you're passing to ab?
 
arg
this is what I get for using a partially built graph algo...
 
1:00 AM
I have a little question. In php application we store data in mysql database. but in other desktop application in another language such as C#, C++ use which database? do they use third party database like mysql?
 
@oyshee "we store data in mysql database" --- we don't
 
@oyshee usually an embedded DB
 
we store it in any storage we like
@Ocramius btw, httperf works fine. So looks like ab glitch
 
@zerkms yeah, ab bes borked
 
user895378
15 mins ago, by rdlowrey
ab is a terrible benchmarking tool. You should use siege or weighttp. I prefer the latter.
 
user895378
1:04 AM
No one should be using ab in 2014.
 
Yet the book PHP and MySQL Web Development opts to use POSIX. — JohnMerlino 1 hour ago
 
user895378
I don't care what you use as long as it's not ab.
 
@rdlowrey oh, missed your replicas, sorry
 
user895378
oh it's okay :)
 
user895378
Hey are either @Danack or @DaveRandom around?
 
1:08 AM
/me starts to really love behat
 
user895378
@DaveRandom + @Danack I have a broken Addr repo problem because its composer.json file has regressed to the incorrect rdlowrey/alert version. Submitting a PR shortly. Would appreciate a merge on that because I can't install via composer without that.
 
@Ocramius isn't it just a xUnit with fancy assertions style?
 
@zerkms it's actually AMAZING
the language allows me to plug in people and have tests written by folks that have NO IDEA about coding
but know exactly what they want
 
and do they really write tests?
 
yes
a lot of them
 
1:15 AM
oh, I thought it's just a marketing around bdd
 
no, it's cool :D
and readable
and when I have a failure, it takes a screenshot and saves it together with the output \o/
 
user895378
@Danack I added an async error handling example (super easy, you'll feel silly for asking when you see how simple it is) to the repo's examples/ dir. Just be aware that it won't run until my PR from a few minutes ago is merged to Addr.
 
Anyone here ever used MonoDevelop on a Mac?
 
user895378
Also, @Danack, per-request options should now work how you requested. Any keys specified in the optional array at request time will override the same client-wide option only for the life of that specific request (includes redirects, etc):
 
user895378
$response = $client->request($uri, $options = [
    Client::OP_BUFFER_BODY => false,
    Client::OP_VERBOSITY => Client::VERBOSE_SEND,
    ... etc ...
]);
 
user895378
1:25 AM
Once I get the old integration tests reinstated I'll merge the dev branch back into master. Hopefully that will happen tomorrow and we'll only be a day or two plus documentation away from a new minor release tag.
 
1:44 AM
what happened with that guy that was looking for a javascript framework ? is his question deleted?
 
 
2 hours later…
3:33 AM
@rdlowrey still there?
 
3:52 AM
anybody here?
is someone heres know laravel?
 
user895378
4:08 AM
@Jack bout to go to sleep, what's up?
 
morning.
 
@rdlowrey ohi!
i was wondering which rfc applies to wildcard certs
just wanted to double check my wildcard matching code; whether it should be stricter or not .. unless you had already checked that of course
 
user895378
I don't know off the top. Lemme check bookmarks.
 
watching the town hall now, just came back from Malaysia :)
 
user895378
Cool. I believe RFC6125 6.4.3 is what you're looking for: tools.ietf.org/html/rfc6125#section-6.4.3
 
4:17 AM
alright, awesome :)
see you later then
 
user895378
Thanks, off to bed! Have a good one!
 
=D
 
5:09 AM
stackoverflow.com/questions/17351494/promises-pattern-in-node-js-libraries-to-us‌​e
 
@BenjaminGruenbaum personally i would keep it for the sake of the detailed answer, though.
 
It's pretty wrong now though... I'm the first to recognize Bergi's contribution to the promises tag he's great really.. But it's outdated and the question itself is pretty outdated.
Imagine a detailed answer to "Which is the best PHP framework, CodeIgniter or ZendFramework 1??"
 
unfortunately i don't have deep insight into the current state of asynch methodologies in js.
but it seems like the question has helped at least a couple of people with that similar question.
 
Which is why this sort of answer is probably harmful :)
 
yeah, if you put it like that heh
is there any other question that's more updated, though?
not advocating that these kind of questions are necessarily something to promote
but if the source of such information is curated, so may actually be the best place :)
 
5:20 AM
Hmm.. For comparing jQuery promises? I've written on how much they suck once or twice
 
did anything change after 2.0 though?
surely some noise must have been noticed by the jQuery team :)
then again, it may not be their primary concern as a general purpose lib
 
No, they say it breaks too much and they don't want to introduce a breaking change. Here stackoverflow.com/questions/23744612/…
 
Hey everyone!
 
@BenjaminGruenbaum I think that, for them, it makes the most sense .. which is why using a more dedicated library may be the better choice :)
anyway, i've voted!
 
Any one here having experience using Xdebug with Sublime text?
 
5:28 AM
Ty
 
5:48 AM
@rdlowrey, remember you gave me links to your cookie abstractions? I kinda found one questionable part there: the fromString() method - it's horrible =)
@kamran, yeah, I have. It didn't work for me.
 
6:27 AM
morning
 
mornin'
 
6:45 AM
Mornin
 
Morning
 
no9
good morning
 
hi @all
Can anyone help me as to how keep track of app downloads (IOS)?? B'coz Itunes doesn't seem to have an api
 
no9
a very basic question ... how do I get random color between range of #0000FF and #000FFF
 
@no9 mt_rand(0xff, 0xfff)?
unless you want the lower end to be open ended, in which case you should raise the lower limit to 0x100.
 
no9
6:53 AM
let me try
 
anyone here????
 
no9
@Jack i have a range (start end). Then a while loop where i need random between this range until a certain color is matched
 
@no9 sorry, don't know what you mean
 
> Unfortunately I am not a php programmer nor do I have sql knowledge so it would be appreciated if responses were kept as simple as possible or explained in detail so that I am able to understand.
 
@Gordon So either as simple as possible, or as detailed as possible?
 
no9
7:00 AM
@jack $startColorHex ='#000FFF'; $endColorHex ='#0000FF'; then $randomcolorHex = '#' . strtoupper(dechex(rand($startColorDec,$endColorDec)));
woudnt this work?
 
@SecondRikudo Whenever I read sth like this I mentally replace "php programmer" with "dentist" and "sql" with "medical".
 
no9
@jack getting the dec values i would use hexdec
 
Seriously, imagine a "dentist" with a client sitting on his chair using dental.overflow to continue. No one would go to him. But everyone thinks they should be coding.
 
$name = (empty($_POST["name"]) || (lowercase($_POST["name"]) == ".zip")) ? $_POST["name"] : time();
What fails in this line?
I have a var_dump before, and a var_dump after, and the after doesn't execute
$_POST["name"] == "Undressed"
 
7:11 AM
what's "lowercase" ?
 
Yup, you're right
Then why the hell didn't it display that error to me?!
 
Use error_reporting(~0) , Luc
 
then check display_errors too
 
@SecondRikudo Why would someone's name be "Undressed"? Is that a stage name? ;-)
 
7:21 AM
Okay
Fixed the problem
Now the only question is, how the hell did it work so far with a syntax error in it? :\
 
Pure willpower?
 
@SecondRikudo you just saw it wasn't working at all.
 
@AlmaDo But it did work. For months, before today.
 
@SecondRikudo what's "it did work" if you asked about error in it?
 
@AlmaDo It did work as in the file I was trying to upload and process was uploaded and processed perfectly, without errors and without complaining.
 
7:26 AM
There. Is. No. Magic.
Either it was using another file with code or error wasn't there or that function was never executed
 
@SecondRikudo Because name was always empty before?
 
@Jack No, it wasn't, because otherwise I would have seen only timestamps in the directory names of the uploaded
 
@SecondRikudo Then, perhaps you had a function called lowercase() before?
 
@Jack Unlikely
 
Then either you failed at version control or you were editing code in your sleep.
 
7:32 AM
So, @SecondRikudo is owning "Dreamcoder" title for now (:
 
7:47 AM
Morning
 
morning @Fabien
 
Good morning, chaps and chapettes
 
morning
 
@rdlowrey Just checked the RFC and regarding HTTP we're doing the right thing, but section 6.4.3 is more conservative ... not sure which one we ought to be following :)
 
morinings
@Jack (assuming you are talking about php-src) which specific element of 6.4.3 are you concerned about?
 
8:05 AM
@DaveRandom all except #2 :)
 
I thought we only matched against the left-most identifier anyway?
 
the HTTP section makes no particular mention of that.
 
lol
 
hooked one of my coworkers on reading/listening-to Dresden Files books
 
8:08 AM
@DaveRandom And a quick glance at my code would suggest that it doesn't just match against the left-most.
 
@Fabien Wankel, yeah!
 
@Jack I would consider that a security flaw, personally
 
@DaveRandom Yeah, and I would be happy to fix that ... but #3 becomes the next concern heh
 
Drilling a square hole, wow xD
 
As in, how far should I go to make sure labels are valid A-label, U-label, etc.
 
8:11 AM
@Jack In reality no trusted CA will issue a cert with complex wildcard pattern like that. We currently do not support IDN so I wouldn't worry about that for now, that's part of a wider issue that we can't really do anything about.
I looked into it heavily and adding support for it is non-trivial
Really it requires ICU to be a required component
 
Yeah, I've heard you mutter the Punycode hell before.
 
You guys buy certs for your personal domains?
 
Sure
 
@Fabien You can get free certs from a trusted CA, you just can't get wildcard certs for free
 
Is it weird that I've never bought a cert nor do I know how to set my server up for HTTPS? :P
 
8:12 AM
Does anyone here know much about the DOMdocument class and UTF-8? I'm having hell with it!!
 
@Dan Don't ask to ask, just ask.
 
What's a wlldcard cert do differently?
 
@Dan what kind of hell are we talking about here?
 
@SecondRikudo You should learn, it's not that hard and doesn't have to cost you anything
@Fabien Works for more than one specific name
 
@DaveRandom Have a good guide?
 
8:14 AM
@SecondRikudo which web server?
 
@DaveRandom Nginx
 
@DaveRandom name being domain or name being either domain name or subdomain+domain name
 
Let me see if I can find something
 
@Jack over 8hrs of searching online to find out why my encoding is stuffed. I've got UTF-8 going into DOMdoc'. All I'm doing is adding attributes to certain elements and returning the html with saveHTML()
 
8:14 AM
moning
 
I've tried all this stuff $dom->loadHTML( '<?xml encoding="UTF-8">' . $content ); to force encoding
 
@PeeHaa mnn
@Dan Firstly, please show us what you have now
Second, are you sure that the target site itself is UTF8?
 
Code which work on MAMP, and doesn't work on the live server. That's the strangest bit to me.
 
@Fabien Name being a FQDN, be that a root domain or a sub domain. bar.foo.com and foo.com can both be FQDNs for specific hosts
 
@Dan Have you tried this?
 
8:16 AM
I'm using these flags, which are PHP 5.4+ I believe, and the server is on 5.5: LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD | LIBXML_NOWARNING
 
A wildcard cert will match foo.com and *.foo.com is the usual way to do it
 
Ah right, makes sense... clue is in the name I guess.
 
Which will match bar.foo.com but not baz.bar.foo.com
 
@Jack Yes, but when the flags are passed as arguments, they strip out the head and this doesn't seem to work. I'd have to double check to be sure, so I'll do it now.
 
@Dan Who's they?
 
8:17 AM
Otherwise, I get head and body tags in the middle of my content. I'm only put a fragment through this, not a whole page.
LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD | LIBXML_NOWARNING
That meta tag you sent goes in the head, right?
So with no head element (LIBXML_HTML_NOIMPLIED), how would it work?
 
@Dan That's not an encoding problem
 
git lg is like, the best thing ever
 
First thing, I'll try what you've suggested.
 
When you do loadHTML(), it is implicitly converted to a full HTML document
if the root element is not a <html>, it is wrapped
 
@DaveRandom Yes, and these strip out the doctype and the HTML "shell" LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD
 
8:21 AM
@DaveRandom Which totally sucks and is stupid because libxml can prevent that happening
@Dan PHP didn't implement those :(
 
Apparently it does in 5.4+
 
Ok, so <meta http-equiv="content-type" content="text/html; charset=UTF-8"> looks good so far, in terms of encoding.
But now I have `<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body>` before my content
 
@DaveRandom OMG OMG OMG OMG OMG OMG I just came
 
I've tried to strip it using stuff like this: `//remove <!DOCTYPE
//$dom->removeChild( $dom->firstChild ); `
 
@Dan what is it that makes you think the encoding is stuffed?
Can you show example input/output?
(I'm not saying you are wrong, just trying to understand the issue properly here)
I was under the impressing the libxml default encoding is UTF-8, I could be wrong though
 
8:25 AM
Here's some mixed language chars;
¢Â · ₡ · ₢ · ₣ · ₤ · ₥ · ₦ · ₧ · ₨ · ₩ · ₪ · ₫ · ₭ · ₮ · ₯ · ₹ ฉันà¸à¸´à¸™à¸à¸£à¸°à¸ˆà¸à¹„ด้ à¹à¸•à¹ˆà¸¡à¸±à¸™à¹„ม่ทำให้ฉันเจ็บÂ
Quotes don't work, and nbsp; render some weird "A" thing.
 
Can you pastebin your actual sample input please?
 
And with the meta tag: ¥ · £ · € · $ · ¢ · ₡ · ₢ · ₣ · ₤ · ₥ · ₦ · ₧ · ₨ · ₩ · ₪ · ₫ · ₭ · ₮ · ₯ · ₹ ฉันกินกระจกได้ แต่มันไม่ทำให้ฉันเจ็บ
 
Oh OK
 
meh
 
So it works with the meta tag telling the DOMdoc to use UTF-8 but now I have DOCTYPE declarations in the middle of the page.
 
8:28 AM
@Dan So would this be you expected output? 3v4l.org/epfeW
Or do you want the literals instead of the entities?
 
@DaveRandom interesting how hhvm first fixed the missing constants but then didn't change the signature accordingly ;-)
 
I don't know, in the source code I get ¥ · £ · € · $ · ¢ · ₡ · ₢ · ₣ · ₤ · ₥ · ₦ · ₧ · ₨ · ₩ · ₪ · ₫ · ₭ · ₮ · ₯ · ₹ ฉันกินกระจกได้ แต่มันไม่ทำให้ฉันเจ็บ when I bypass DOMdoc
 
What day are we celebrating today? Looks like new year tree lights today, room 11
 
@DaveRandom I have some reason to believe that libxml uses iso8859-1 by default unless it encounters a <meta> tag that says otherwise.
 
@Jack I think I've read this too. Doesn't DOMdoc use ISO by default?
 
8:32 AM
i dunno what that is
 
Has anybody even heard of this e-commerce?
 
no
 
Near the end of the function I tried to test for a character set like this:

`$dom_return = $dom->saveHTML();

var_dump( mb_detect_encoding( $dom_return ) );`
I get: string(5) "ASCII"
 
@Dan Hmm, try passing in a list of possible encodings as the second parameter.
 
Like this?
$char_list = array(
'UTF-8', 'ASCII',
'ISO-8859-1', 'ISO-8859-2', 'ISO-8859-3', 'ISO-8859-4', 'ISO-8859-5',
'ISO-8859-6', 'ISO-8859-7', 'ISO-8859-8', 'ISO-8859-9', 'ISO-8859-10',
'ISO-8859-13', 'ISO-8859-14', 'ISO-8859-15', 'ISO-8859-16',
'Windows-1251', 'Windows-1252', 'Windows-1254',
);

var_dump( mb_detect_encoding( $dom_return, $char_list ) );
That returns 'UTF-8'
 
8:42 AM
 
\o/
 
8:59 AM
I think I've managed to get it working, but it's a bit lame.
Stripped out the HTML shell at the end before return;
$dom_return = str_replace( '<html><head>', '', $dom_return );
$dom_return = str_replace( '<meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body>', '', $dom_return );
$dom_return = str_replace( '</body></html>', '', $dom_return );
And the errors have to be suppressed, but only on the live server, which is weird.
$dom->loadHTML( '<meta http-equiv="content-type" content="text/html; charset=UTF-8">' . $content, LIBXML_HTML_NODEFDTD | LIBXML_NOWARNING );
Otherwise I get this error and nothing is output:

Warning: DOMDocument::loadHTML() expects parameter 2 to be long, string given in .....
 
what's the live php version?
 
Should be the same, 5.5
I'm running 5.5.3 on MAMP
 
@Leri I'm Suhosin
 
Just says "5.5" on the hosting admin panel
 
@AlulaErrorpone your online persona seems to be insecure :)
 
9:04 AM
I've been on this name/avi for about 6 months :P
 
ehm...
 
Is @webfarto coming to phpnw?
 
@webarto hehehehe
 
:D
 
9:05 AM
@AlulaErrorpone fine, stable'ish then ;p
 
3rd*, 4th & 5th October
Manchester, UK
Davechester, eih
 
@Dan on the one with error "expects parameter 2 to be a long", do you have libxml installed?
 
@RonniSkansing I don't know, is it an extension (hides in shame)
 
@webarto You can only buy conference AND tutorial tickets at the same time
£295
:-(
 
Ouch!
What was the "normal" price?
 
9:09 AM
I paid £99 when the tickets came out I think, then they went up to £130
For just the conference day
They're almost out, so they're only selling if you come to the tutorial day too
 
@RonniSkansing Ah, version 2.6.26 according to phpinfo(), so yes I suppose so.
 
@Dan try var_dump(extension_loaded('libxml'));
and var_dump(LIBXML_HTML_NODEFDTD, LIBXML_NOWARNING);
 
@RonniSkansing First dump return TRUE for both servers
 
cool, what about the next one?
 
The second returns int(4) int(64) for MAMP and string(20) "LIBXML_HTML_NODEFDTD"
int(64) for the server
 
@Dan, seems the LIBXML_HTML_NODEFDTD does not hold a value, so it casted it to a uppercase string. The LIBXML_HTML_NODEFDTD | LIBXML_NOWARNING never reaches the valid 64. On the server with faults, could you try out $dom->loadHTML( '<meta http-equiv="content-type" content="text/html; charset=UTF-8">' . $content, LIBXML_NOWARNING ); BTW. do you have error reporting and such enabled?
 
Installinh php 5.3 before mysql is installed I am erroring.. configure: error: Unable to find your mysql installation
 
@Fabien try installing mysql first ;)
 
@BradlySpicer mysql will be installed on a different instance
 
No, error reporting is off on the production server. The website isn't live so I could turn it on and take a peek. I'm using the "no warning" flag already;

$dom->loadHTML( '<meta http-equiv="content-type" content="text/html; charset=UTF-8">' . $content, LIBXML_HTML_NODEFDTD | LIBXML_NOWARNING );
 
9:21 AM
fucking REST
 
@Dan when a constant is not present
php > var_dump( AMAZING_CONST | 'wow');
PHP Notice:  Use of undefined constant AMAZING_CONST - assumed 'AMAZING_CONST' in php shell code on line 1
string(13) "wowZING_CONST"
 
now it's not only the class and method names that I have to figure out
I also have to figure out the names for URL segments
 
@RonniSkansing I partly understand this. What does it mean in relation to my code?
 
It means that if the second arg expects lets say 4 or 64
 
@tereško I'm doing REST as well, as of yesterday. Only just got digest authentication working correctly.
I'm using Silex to handle the request / response, what are you using?
 
9:25 AM
@RonniSkansing So is my loadHTML() code wrong?
 
@Dan, do not think so, just make sure to not pass a string in the second arg
 
@RonniSkansing I wonder why it's complaining then, because I'm passing constants, right?
 
@Jimbo define "correctly"
as for "what am I using": mostly Fracture components
 
@tereško "Working" :P but also doing exactly what the RFC describes
 
there is RFC ?!?
or did you implement oAuth?
 
9:29 AM
3.2.1
Well, for WWW-Authenticate
 
oh, you are using Basic
 
No no, digest
I'm using $_SERVER['PHP_AUTH_DIGEST'])
 
/me is using an adoption of this approach
 
@tereško Looks like a single use token stored in a cookie
Changes on each request?
 
well, it's not using cookies, but yes - token is valid only for a single request, and in each response you get a new token
 
9:32 AM
I'm doing that for websockets
Hmmm...
> It is critical that the series identifier be reused for each token in a series. If the series identifier were instead simply another one time use random number, the system could not differentiate between a series/token pair that had been stolen and one that, for example, had simply expired and been erased from the database.
I'm not doing that though
 
@ircmaxell I'd love to hear your opinion on facebook.github.io/react/docs/flux-overview.html
 
@Jimbo this ensures that, if your "credentials" get compromised, all of the people who have been using tokens from a specific series, get logged out
 
Hey everybody. I accidentally merged master into feature branch, now my feature-branch history looks exactly like master, is there a way I can fix this?
 
@tereško I see, because then you just lock out based on the series identifier that remains constant
 
@Ivan0x32 you're asking how to revert a merge?
git reset --hard commit_sha
Make sure to get the right parent from git log
 
9:37 AM
commit_sha is the sha of merge commit? Is it normal that I don't see any commits that were in this feature branch?
 
@Jimbo It also lets me to have multiple devices for the same user logged in , and lets me notify the user, if one of his identities has been compromised
 
@Ivan0x32 sha of parent commit in the branch before the merge.
@tereško facebook.github.io/react/docs/flux-overview.html you might be interested in this too.
So far I'm not a fan, but I don't have a strong opinion about stuff before I build something with it.
 
I will take a look at it, when I have more time
@webarto am I only one who actually finds it disgusting ?
 
I've had two branches dev which had A in it and feature_1 which had exactly A + B. I merged dev into feature_1 and now they both have just A inside of them, no sign of B. History shows exactly the same commits - the ones that were in dev.
 
@tereško I get it, very nice! Cheers for the link
 
9:44 AM
So I don't have any base commit to revert to.
 
@Ivan0x32 did you rebase instead of merge?
 
@AlulaErrorpone Good to know. :Ь
 
I've used egit, it merged I think.
I checked out dev and clicked merge on the feature branch
 
@Ivan0x32 If there is no merge commit it sounds more like a rebase was done because it sounds like history was rewritten
 
Meaning my commits were just erased?
Although weirdly enough those changes are there, but last commit is definitely dev one, not from feature branch. I guess I'll just investigate further.
 

« first day (1382 days earlier)      last day (3566 days later) »