« first day (1454 days earlier)      last day (3500 days later) » 

12:01 AM
tbh a brute force attack isn't that unrealistic if you have (up to) a few days and it matters that much to you, it's pretty easily scriptable and there are no enforced back-off mechanisms or anything
 
True and if you have a fancypants machine with AES-NI and code that can take advantage of it...
 
My life changed.
 
I just drink straight from the carton :D
 
yeh, what's that weird round see-through thing he's putting the juice into?
 
i think it's a life form that doesn't consume whatever you put inside.
 
12:13 AM
@DaveRandom You realize you have been drinking out of one the entire fucking weekend right? Maybe the juice just confuses you or the size of the thing :D
 
Ohhh it's one of those things that beer comes in
 
Ah right, didn't recognise the container with just orange juice in it :)
 
Yes one of those things that always take so goddamn long to fill for some stupid reason in your country :P
 
Yeh that was like the slowest tap on earth
 
It's a good thing all of that physics doesn't apply when you're taking a piss :P
 
12:17 AM
:D
 
We'd all be standing upside down for a better stream, with all the problems that would bring if you miss.
 
I always enjoy seeing someone drinking while pissing, I like to imagine that if they didn't run out of beer they'd keep pissing forever
2
 
By that time they've clearly lost their sense of smell.
 
 
1 hour later…
1:24 AM
^ snaps of current master
/me => bed
 
nite @DaveRandom
 
2:14 AM
Coming soon, iPhone 1000
 
 
1 hour later…
3:27 AM
Guys, is there any haproxy superhero around?
0
Q: Freezing haproxy traffic with maxconn 0 and keepalive connections

zerkmsSince haproxy v1.5.0 it was possible to temporarily stop reverse-proxying traffic to frontends using set maxconn frontend <frontend_name> 0 command. I've noticed that if haproxy is configured to maintain keepalive connections between hapxory and a client then said connections will continue b...

 
@zerkms Isn't Keep-Alive made in a way that it won't be bothered with session shutdowns?
I thought that was how the feature is designed.
 
@Ja͢ck it is designed indeed
but if we don't terminate sessions gracefully we cannot guarantee that we won't terminate them in the middle of the request/response
 
I see
All I can do is upvote your question then :)
 
for correct apache/nginx graceful reload I temporarily disable keep-alive and enable it again after reload
in this case I just cannot wait for some few clients to expire while others are frozen )
 
3:54 AM
@zerkms you might have better luck with that one on serverfault
 
indeed. please help me to move it there
need 4 more votes :-)
 
Voted
 
4:07 AM
@Ja͢ck what is even funnier - is that haproxy does not have (? at least I couldn't find) any limitations on number of keep-alive requests as, for example, apache has
 
Because it's awesome?
 
it means that theoretically we could send a request within keepalive timeout interval and maintain a connection infinitely long
with apache I could at least tell that "I can guarantee there will be no keep-alive connections in N * timeout seconds interval"
with haproxy if you wish so - prepare to wait for +Inf long :-S
 
\o/
I don't use haproxy anymore
Btw, FastCGI-Client is pretty cool! :D
 
I had chance to use it this morning actually )))
when could not understand why nginx-php5-fpm don't work
 
Yeah, I was using it to test my PR but my iMac doesn't have nginx running :)
 
4:18 AM
@Ja͢ck install vagrant finally
 
Is that similar to Docker?
 
nope, it's a VMs manager+
just automates using virtualbox/vmware/etc VMs management and provisioning
 
Ah right :)
 
with that you could make your contributors' life easier - just put Vagrantfile where you setup the comprehensive dev environment
What sometimes stop me from contributing is that it would require to install millions of dependencies and spend half a day to get environment where I could run what I've just contributed
 
Setting up php-src development environments aren't hard, though.
Until yesterday I didn't need to test fastcgi in particular heh
 
4:52 AM
@AndreaFaulds FWIW the Scalar Type Hinting With Casts RFC allowed "12.0" for ints. @NikiC @ircmaxell
 
 
1 hour later…
6:03 AM
moin
 
6:19 AM
@bwoebi ugh :/
@JoeWatkins hai
@JoeWatkins bwoebi is having a lot of difficulties with that bug
8 hours ago, by bwoebi
@FlorianMargaine bah, finding a polynominal solution to the traveling salesman problem is certainly easier than tracking down that bug. I have no clue where to begin debugging.
 
I'll have a look today sometime
 
dunno if that's what he wants
 
he does
 
he's probably busy solving the traveling salesman problem first.
hmm, seems like a closed stream that's closed again? sounds odd
 
probably, we jump all over the place ... you have a go jack, easy reproduce ;)
USE_ZEND_ALLOC=0 and valgrind it ...
 
6:32 AM
sure, why not :)
 
I would look but already got 30 emails to reply to before I do anything ...
 
posted on October 09, 2014 by kbironneau

/* by sadri */

 
@FlorianMargaine Does xml-protocols build against php-src:master?
 
no
5.6 tops
 
oh
okay
 
6:36 AM
hi developers
some days ago , I saw i web site that has a url such this , example.com/post:456
 
that's horrible ... continue
 
hi. I have a reference site where currency rates are being shown. Probably its using some api or curl values to get current exchange rate. Can i get from which site is it getting the values.
 
@Sajal oanda
 
but now when i wanted to do such thing in php for this character : , apche says that's forbidden
 
"hi developers" is Ballmer back?
 
6:39 AM
@Ja͢ck what ?
 
@FlorianMargaine what? , I meant everyone
 
@FlorianMargaine yes, together with the windows desktop :D
1 min ago, by Ja͢ck
@Sajal oanda
 
Oanda is probably a place where you can get currency rates.
 
@Ja͢ck ok now i get it.
 
@FlorianMargaine Hmm, tried to reproduce on Macbook ... it's just stuck at connection (stdin) from 127.0.0.1 but no crash
 
6:43 AM
@bwoebi ^
 
but also no output from that point onwards.
it keeps accepting connections ...
 
if you valgrind you might see the memory error that is probably causing the fault anyway ?
 
possible, trying that now
 
hi everybody, i would like to ask a question
i am using wordpress and i am developing a plugin and i am creating shot codes that can be isnerted in the wordpress posts
in my short code i wrote php using mysql_connect function to connect to database and retrieve in a loop my data and is working great, but i want to get rid of mysql function nd use WordPress way but when i use $wpdb is not working anymore, but with simple php is working, any ideas?
 
Put a minimal example of your code in pastebin/pastie
and how does it not work anymore, any errors etc?
 
6:49 AM
no errors at all, i put the link to the question because i asked it
 
@JoeWatkins hmm, nope .. maybe an strace will tell me more
 
0
Q: $wpdb in the plugin, admin pages working but not the shortcodes

ionluchiani am developing a plugin, i have queries for the admin for the back office and they are working but when i copy them and paste into a function to create a short-code the query is not working anymore. i have a working code here like this: function test(){ include ($_SERVER["DOCUMENT_ROOT"]."/...

 
@Ja͢ck yeah, good, try that ...
 
the same code in admin poages is working but in shortcode is not, absolutely the same , because it stoped working and i test in admin pages and is working but no idea why in shortcode is not working
 
6:53 AM
@Ja͢ck wait! I don't reproduce anymore
he committed that last night github.com/krakjoe/phpdbg/commit/…
 
@RonniSkansing can u plea have a look at the question that i post here, maybe i am really missign something?
 
that's the fix I guess
 
@ionluchian have errors/warnings enables? Have you tried to debug it, even in a die/var_dump fashion?
 
Gentlemens, I have a bunch of outstanding PRs, would anyone care to review and/or merge? 64-bit format codes for pack - RFC approved / Improved GMP random funcs - self contained feature / there's a couple more, but less important
 
6:57 AM
up votes would be nice :)
 
@RonniSkansing var dump is an empty array, when i on the errors i get this only nothing else "Warning: mysql_error(): 21 is not a valid MySQL-Link resource in C:\OpenServer\domains\localhost\wp-includes\wp-db.php on line 1220" but the same code is i make this way mysql_connect(...) is working...
 
@Leigh you have no karma ?
have you tested the rfc patch against master ?
 
hi all
 
@ionluchian so you also dumped the $tablename and checked it has the content you expected?
 
@JoeWatkins I actually asked to not have php-src karma to start with, not confident enough, and wanted to force peer review
 
7:00 AM
@RonniSkansing when i echo $wpdb is displaying correct, when i echo #tablename is displaying correct even the query is displaying correct i check everything because i was thinking something was not correct, i would say that somehow i guess it can not connect to the database
 
@Ja͢ck ignore what I said. Still reproducing.
 
And no, didn't test vs master, can do that now
 
you're not confident enough ... dude, a while ago I wiped PHP5.6 from the face of the earth ...
 
@FlorianMargaine I get this output from dtruss; weird ... // cc: @JoeWatkins
 
I like to drink :p
 
@RonniSkansing the same code i put in amdin page and is working great and i paste in my shortcode is not working....
 
close(6)                                = -1 EBADF (Bad file descriptor)
 
@ionluchian how did you "put in admin page" via a hook/filter?
 
a couple of them... might be related
 
does it spawn of child processes? no, right?
 
7:04 AM
@RonniSkansing i create a page in the menu, and after in a function i put my code and i can see that my loop is working, after i create a function and add_shortcode to be able to use in the posts, and inside the shortcode is not working, i can do the same with normal php but not wordpress way and then will work but i want to use wordpress way
 
@Ja͢ck you got my whole strace log
 
@RonniSkansing now i have to different function that holds the same code, one function is for the admin in the back office another function just have this extra raw add_shortcode
 
and I don't see any fork
 
@Ja͢ck no fork
 
@Ja͢ck what did you reproduce? the socket closing?
 
7:06 AM
wait...
bind(6, {sa_family=AF_INET, sin_port=htons(4000), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EADDRINUSE (Address already in use)
close(6)                                = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2945, ...}) = 0
write(2, "[Thu Oct 09 09:00:03.0422 2014]:"..., 82) = 82
read(0, "", 500)                        = 0
shutdown(6, SHUT_RDWR)                  = -1 EBADF (Bad file descriptor)
close(6)                                = -1 EBADF (Bad file descriptor)
 
@bwoebi yeah ...
 
why does it try to bind again?
 
It wants to re-establish connection
 
@ionluchian have you looked at something like this link stackoverflow.com/questions/11134746/…
 
I just run dtruss sapi/phpdbg/phpdbg -l 4000 and then connect from the other terminal; but no dice it seems
 
7:07 AM
oh, it binds twice
 
need some advice, i have a md5 integer in my php script, the integer is the id of a mysql record, is it a fast way to get the corresponding record id instead of fetching all the table ids one by one and compare their md5 value with the hash?
 
Morning. yo @JoeWatkins @Julo0sSac @Ja͢ck
 
hi
 
moin
 
7:08 AM
@Julo0sS no, there isn't.
 
@Ja͢ck :'(
 
@Julo0sS you could store the hash in a field of your database...
 
if you want to search by md5 value, use md5 hash as the primary key or index at least.
 
@RonniSkansing i checked the link, in this way is working that was what i did first time, but when i try to use $wpdb wordpress way is not working and that problems arrive...
 
@ionluchian do you have any code that opens a mysql_* connection but does not close it?
or etc?
 
7:11 AM
@RonniSkansing no, have just this global $wpdb; after my query $_IL_RESULT_TRAN_LIST = $wpdb->get_results( "SELECT * FROM $_IL_TABLE_NAME"); and after the loop foreach nothing else
 
@Ja͢ck k thx
 
So it is a clean install, you added a new folder for your plugin/theme, added a shortcode hook with the code you shown me?
Is that the current state?
 
@FlorianMargaine when does that first close() syscall happen?
 
@Ja͢ck but, have to be careful because the md5 is not always the same with php versions... so if updated, the values written in my db are no more valid
 
it is not?
 
7:13 AM
the output of md5 has nothing to do with php versions.
 
@Ja͢ck i had problems dealing with it, i dont remember if it was from php versions or from php<->mysql but md5 wasnt the same
 
you're confused about something else.
 
@Ja͢ck i think 'md5' exists within mysql too right?
 
yes, it exists within mysql too
 
@Julo0sS here is an example 3v4l.org/o9mp0
 
7:15 AM
@bwoebi pastie.margaine.com/577e310b-1140-41b3-a174-98644590fbfe when I strace, the socket is connected
so it's waiting for something
 
@Ja͢ck so, if i remember, (years ago), php "md5('test')" and mysql "md5('test')" is not the same, is it?
 
then I close my app
 
@RonniSkansing ty
 
You are welcome =]
 
@Julo0sS highly unlikely.
 
7:16 AM
and the rest is what happens. what's after the BACKTRACE is just logging to the console
and it definitely tries to close twice...
then tries to rebind
 
Damn, I can't even get phpdbg -l to work at all :(
 
but it's a server, it shouldn't have to do that
 
What is the best way to point 2 domains to the same server? :)
 
DNS?
 
Changing the DNS-record?
 
7:17 AM
Yes
 
@bwoebi why does it rego through phpdbg_open_socket after closing the client socket?
it's not the server socket, it shouldn't have to...
 
@FlorianMargaine I noticed that too… I'm looking.
 
@RhyAunor Is that you, Park Min Young? Didn't know you had become a php dev :)
@bwoebi are you able to reproduce any of this on mbp?
 
@Ja͢ck not yet tried. Was doing that on a debian machine.
@FlorianMargaine I know.
 
7:22 AM
yeah sorry, I'll let you debug
gotta go to work anyway
 
Yay, Darwin related bug for me then :)
 
@JoeWatkins so yea, RFC patch fails against master, but I know what's wrong, how do I handle this in the PR a single commit to be omitted vs non-master branches?
 
I'll be working on some drupal contrib... it's open source work, which is cool, but it's also a lot more boring than working on phpdbg or php-src...
 
@Leigh I actually don't know, I would summon Tyrael
 
And ask for karma so I can just fix it myself? :P
 
7:26 AM
@Leigh the pr should work for the lowest branch you want to support.
 
there we go, I'm at work
 
it does
 
@Leigh I'd do another PR for master
 
@Leigh how big is the patch to make it work for master?
 
small
 
7:27 AM
just commit on your repo and ask for cherry-pick?
 
@RonniSkansing lol thx but... that link does not really help :P x)
 
@Ja͢ck Imagine: xyz.com is working on #server1# which is working perfect.
Imagine qsf.co.uk is working on #server2# but this website is deprecated.
Now: qsf.co.uk should immedialty redirect to : xyz.com What is the best way to do that?
I don't need the website on qsf.co.uk anymore.
Only the domain to go to xyz.com
 
@FlorianMargaine afaik we still merge from 5.6 to master ... so it's more about conflict resolution in the final merge.
 
oh right
 
@Leigh ask tyrael ... i can probably help you by the time i get home.
if there are enough tests, though, i can probably figure it out myself.
 
7:30 AM
I'll jump on IRC when I get to work - gist.github.com/lt/f51601cf43bba0353e15 thats the patch
 
Please someone introduce me a good book about MySql. (I have many problems in queries!). I use MySql in PHP.
 
@user3002233 look at "ext/mysql" in the right sidebar
 
@Leigh I'll have a look-see .. 5.6 onwards is substantially easier than >= 5.4 patches heh
 
good meurning
 
@bwoebi if I understand correctly, you voluntarily delete then restarts the server when a client leaves?
 
7:34 AM
@FlorianMargaine yep, actually wondering why @JoeWatkins did that. Would make more sense to me to just reuse connection
 
@FlorianMargaine But it's not a book!
 
@user3002233 you don't need a book for 2 lines
@bwoebi yeah... just leave it open...
@JoeWatkins why do you complicate things?!
:P
 
@Julo0sS oh =/ thought it would be clear that md5(foo) is the same on all versions.
 
Hey guys morning
 
@Leigh oh, could you squash the branch for pr 812?
 
7:41 AM
@Ja͢ck git merge --squash ? :)
 
git rebase -i HEAD~4
 
you can squash as you merge, was my point
 
oh right .. but then it becomes my commit isn't it.
 
hmm, dunno, but yes I can squash it
 
yeah, a merge --squash will stop before commit.
 
7:44 AM
good mornings
 
Moanings
 
@RonniSkansing yep, &thx for that, but the idea now is to compare php md5 & mysql md5, which, i think, are not the same... actually, as i wont have >1000 records in my table, even fetching all rows won't take many time, so that is not a problem finally
 
mornings
 
Currently I am working on a software that is a Web App using MVC but the thing is my colleagues before me, have implemented the following. In order for the controller not to be fat they created a Service classes for each application module. This service classes are responsible for everything the CRUD, report generation etc. This means that we have like 2000-3000 lines of code 60-70 methods in a single class, and those classes are initialized every time a request is made to the module.
I told my colleague that this is not proper and we have to make it more modular by splitting the queries in data mapper objects and the rest of the business logic in Domain Objects, but he argues that the problem with that is I am gonna spend a lot of time refactoring and there is not gonna be any better result. What do you think, In my opinion it is much better to have logic split because there are dependencies between the modules (for example one uses another for getting some information)
 
7:52 AM
@FlorianMargaine Hmm, surely the 5.6 version can't be that much different from master, right? :)
 
@Julo0sS
mysql> SELECT md5('itsTheSame');
+----------------------------------+
| md5('itsTheSame') |
+----------------------------------+
| d6249838eb4f6714f97e04789003d488 |
+----------------------------------+
php > echo md5('itsTheSame');
d6249838eb4f6714f97e04789003d488
it is always the same
 
@Ja͢ck actually...
 
@FlorianMargaine because I like too ...
 
@RonniSkansing so probably i was wrong on this :/ thx :)
 
it's not really the same tbh. The architecture of the change is the same, but most lines in the code are different
 
7:54 AM
np =] @Julo0sS
 
morning new peepz
 
@FlorianMargaine why not implement ArrayAccess?
 
@ziGi if he continues down that road... the code will not be usable.
 
@salathe because half of the methods would be throw Exception('not implemented')
 
@iroegbu I know be he got really pissed that I am trying to optimize it and make it more modular
additionally
 
7:56 AM
say tomorrow the boss says "I don't like this JSON thingy, change to XML, I understand that". You'll have to almost build from scratch.
 
and it's not really in line with what most of other internal php objects do
 
@FlorianMargaine really, half?
 
abstract public boolean offsetExists ( mixed $offset )
abstract public mixed offsetGet ( mixed $offset )
abstract public void offsetSet ( mixed $offset , mixed $value )
abstract public void offsetUnset ( mixed $offse
yes, half
only offsetExists and offsetGet make sense
 
Ahh I forgot it's only a wee interface :)
 
@iroegbu he tells me that the best optimization done at the moment is that when he initializes those classes they are being kept in a multiton and can be accessed globally from other service classes without having to initialize them again
 
7:58 AM
have an exit strategy... you don't want to maintain that code.
 
and that the classes have only 1% referencing eachother
@iroegbu no, no, actually I have to make it maintainable, this is my thesis to show what kind of pitfalls can be avoided and how
to make a growing project more scalable
but he is arguing with me
but you do agree
 
8:20 AM
43 messages moved to bin
And back on topic :-)
 
yes ...
code and stuff ...
 
yep
 
@JoeWatkins you still haven't explained why you destroy the server socket and rebind it when a client closes the connection in phpdbg :P
 
@tereško can I ask you some questions in regards to the Service, Domain Object and Data Mapper Model representation?
 
what happens if you close gracefully ?
 
8:22 AM
what do you mean gracefully?
 
I mean you type quit
that's meant to happen if you do something that causes a disgraceful shutdown to occur because it means the engine and or server might be unstable, so we need to start again ...
 
hmm ok... I'll see when I get back on my pc
@bwoebi fwiw ^
 
not saying it's the best way but expected in some circumstances, if anyone can find a better way, I'd be totally up for that ...
 
it seems to happen on client tcp timeout though, should that count as disgraceful shutdown?
not even sure it's timeout...
I'll have to try
 
Morning guys
 
8:28 AM
morning
 
It isn't quite morning to most of you right?
 
well it's pretty difficult to detect, I don't remember the code, but it would make sense if it were, the problem is that the engine can be stopped mid execution, so that if you assume all is well anytime there is a connection you might be entering a vm that is leaking, because the last entry did not get a chance to finish executing and so cleanup ... but I don't remember the code, but just saying think carefully about what you consider to be stable in a debugger ;)
I'll join you guys tonight or tomorrow, I am coming, eventually ...
 
Have a nice day or evening rather
 
I'm trying to use functions in namespaces with no class... is it possible to put this namespace in a separate file and what filename do I use to make composer recognize it?
 
you can't autoload functions
yet
 
8:32 AM
thanks
 
@iroegbu unfortunately, if you really want to do it now , you would have to mimick namespace with a static class
 
posted on October 09, 2014 by kbironneau

/* by Tiziano */

 
i am trying to npm install angualr and npm start.
i am in ~/dev/node. i did npm install angular, it showed this http://pastie.org/9633395 and then in ~/dev/node/node_modules/angular/$ npm start, but it doesnot start any server.
it apears like this:
`kreetiuser@kreetiuser-desktop:~/dev/node/node_modules/angular$ npm start`
`kreetiuser@kreetiuser-desktop:~/dev/node/node_modules/angular$ `
 
that's mighty sad...
 
@argentum47 wrong room
 
8:38 AM
ya, i know, but since i wasn't geeting a reply an hour ago.. np
 
Could anyone help me format this to strict standards?
$file_ext=explode('.',$filename);
$file_ext=end($file_ext);
$file_ext=strtolower(end(explode('.',$filename)));
I get that variables should only be passed by reference but I honestly am not sure how to do it otherwise, the issue appears on the 3rd line of the code I pasted.
I thought of doing the same to the 3rd line as I did to the 1st by ending on a second definition but I need to end it inside the strtolower so I can't redefine it in a 4th line
Would I be right if I did:
$file_ext=explode('.',$filename);
$file_ext=strtolower(end($file_ext);
 
new 24" monitor...
so.. much.. space..
 
I got 2x23
I think fab's got a bunch ...
 
this one was paid by work
 
3*24"
 
8:49 AM
I'll probably get another one myself in a couple months... gotta let the salary in my account first...
3*24"?!
 
Aye
 
yeah one of them is vertical, looks nice actually ...
 
I removed the vert one. Couldn't get on with it.
 
aww ... I loved that idea ... for reading code ...
 
it's rare when I only have one window of code...
 
8:51 AM
I often have code open for reference ....
or a documentation window if not code ... but rarely that, because C ...
 
I got them all setup on a triple monitor stand too. Soooo much nicer than generic single monitor stands.
This is cool.
 
well why not just have a massive television ?
 
@Fabien too bad about the paltry speakers :)
 
I'm not really getting that, I get having three screens at different positions ...
 
That's strange..I got rid of the strict standards issue but when uploading the incorrect file type I get no error whatsoever though it doesn't mail the attachment that's not right..
 
8:56 AM
2x27" for me.
 
@LeviMorrison for reals? :)
 
Used to have 2x30" but the 27" screens are newer and are overall better.
 
My desk has enough space for just one 27" heh
 
@Ja͢ck At work. At home I have 1x23"
Let's just say 1x23" is the pits compared ^^
 
8:57 AM
I want to put a massive TV above my triple monitors and a sofa behind my chair for gaming. that's my goal.
No space for it ATM.
 
Hey, I could use a bit of guidance in creating a new Reflection class; anyone here up for the task of helping me?
 
the colors of this screen are not so good. I almost don't see the gray around the messages in chat
 
I woke up from sleeping and it's 3:00am, so I may as well code.
 
@FlorianMargaine your pr has been merged :)
 
@Ja͢ck yay!
 
8:59 AM
@Jack
@Leigh has two waiting too ..
@LeviMorrison on and off I'm here ... house rules, ask and if we can answer ....
why new Reflection class first of all ? you mean extension or what ?
 

« first day (1454 days earlier)      last day (3500 days later) »