« first day (1089 days earlier)      last day (4087 days later) » 

00:02
@m59 managed to get around that, what a huge mess
and yes, anything is better than that
posted on October 08, 2013 by till

At EasyBib, we're heavy users of composer and AWS OpsWorks. Since we recently moved a lot of our applications to a continuous deployment model, the benefits of speeding up the deployment process (~4-5 minutes) became more obvious. Composer install Whenever we run composer install, there are a lot of rount-trips between the server, our satis and Github (or Amazon S3). One of my first ideas

00:52
echoing out images in php, help?
Can anyone recommend a PHP framework to me that has a routing structure similar to emberjs?

App.Router.map(function() {
this.resource('posts', { path: '/posts' }, function() {
this.route('new');
});
});
this what I have so far
    if ( isset($item['image'] ) ) {
    $src = $item['image'];
   echo "<img src='$src' >";
    			}
user895378
@DaveRandom Well after talking to @NikiC yesterday I figured it would be better to just PR the new functionality that doesn't have BC implications and limit the RFC to secure-by-default peer verification.
user895378
I can always summarize all the SSL/TLS additions as an addendum to the RFC.
user895378
01:00
@DaveRandom I was thinking I'd submit a PR against your renegotiation rate limiting code with some minor changes and relevant .phpt tests and then you could submit a PR to php-src for that? Anyway, we'll figure it out.
@rdlowrey I'm submitting a PR for that darned disk_free test
user895378
@Jack yay!
Hacked test for Travis' pleasure.
user895378
@LeviMorrison I personally dislike multiple scrollbars. I think it's very unattractive. But this is an entirely subjective question, so my opinion is worth exactly zero.
Oh well, it's all about quality here ^^
Random quote for today
> Encephalitis lethargica is an atypical form of encephalitis which caused an epidemic from 1918 to 1930. Those who survived sank into a semi-conscious state that lasted for decades.
That's scary shit!
user895378
01:21
Woah!
02:01
Ok.. So I posted a post on the code review site, and I was hoping some in here would be interested in reviewing my class... It is located here: codereview.stackexchange.com/questions/32441/…
user895378
02:42
@DaveRandom I've pushed the changes that I'd like to see for the client renegotiation DoS functionality to the new reneg_limit branch on my php-src fork. Example usage can be seen in this gist.
user895378
The only thing you have to do is specify the optional "handshake_limit_rate" context option with an integer >=0. Clients that are closed because they violated the renegotiation rate limiting policy have their stream meta data updated to reflect that fact (in case you wish to take action against a particular client that keeps trying to DoS you by blocking its IP).
user895378
This is another backward compatible change that can be added without waiting for 5.6 if people wish to do so. Let me know if you have any issues with my modifications.
Shouldn't that be "max_handshake_rate" or "handshake_rate_limit"? :)
Which of these two snippets is right:
$productFactory = new ProductFactory($productStore);
$product = $productFactory->createFromSku($sku);


$productFactory = new ProductFactory();
$product = $productFactory->createFromArray($productStore->getBySku($sku));
or C none of the above
user895378
@Jack I just reused @DaveRandom's terminology :) I thought it was kind of awkward as well -- I like "max_handshake_rate" better. I'm going to make that change real quick and do a git push -f
02:53
@Orangepill The first one looks cleaner, but it seems that the product factory only has a dependency on ->getBySku()?
What other creation methods are there?
@rdlowrey =D
@Jack Probably will be byID and I might have a way to get collections (array of product matching term or list of ids) ....
Basically the question is Should the DAO know about the factory or should the factory know about the DAO
Perhaps the better method is to use Data Mapper pattern @Orangepill :)
user895378
@DaveRandom Slightly updated renegotiation changes here: github.com/rdlowrey/php-src/commit/…
@Jack Correct me if I'm wrong but data mapper is for persisting... not lookup.
@Orangepill Not at all.
I mean, it's used for both :)
03:00
@Jack Then that is exactly what I'm trying to implement.
@Jack so mapper usage would look something like this:
$mapper = new ProductMapper();
$product = $mapper->getProductBySku($sku);
$product->changeShit();
$mapper->save($product);
Ya
Alternatively, you can do $product = new Product(); $product->sku = 123; $mapper->find($product);
That reduces the coupling with Product inside the mapper.
Either way is fine, though.
@rdlowrey Hmm, php code itself can't do reneg?
I was just looking at the test case and you're using openssl s_client for testing, just wondering ...
user895378
@Jack I didn't try tonight because I'm lazy ... was going to see if stream_socket_enable_crypto would let me renegotiate tomorrow.
user895378
That's the only way it might work, but I'm not sure whether or not it actually will.
user895378
Renegotiating directly with openssl s_client was the easiest way to test up front (and removed the possibility of errors in my potential client test script).
Fair enough :)
user895378
03:08
Now that I'm 100% sure it works correctly I can try to do the same in PHP land.
I'll take a look and add a PR if it works :)
user895378
By all means! Something like this may do it:
user895378
stream_socket_enable_crypto($stream, TRUE);
stream_socket_enable_crypto($stream, FALSE);
stream_socket_enable_crypto($stream, TRUE);
Possibly :)
user895378
The renegotiation DoS protection is the only other BC PR I'd like to submit then either tomorrow or the next day I'll announce the RFC proposing slight BC breaks to enable secure-by-default peer verification for 5.6.
user895378
03:13
I was thinking I'd go ahead and also provide a big .md file explaining all the recent SSL/TLS improvements with examples as well just to keep everyone in internals land up-to-date on what's happening with that.
Would I be able to maintain BC by compiling --with-insecure-defaults flag on ?
user895378
No. And there would be no reason to. You could manually pass a "verify_peer" => FALSE context option. But the whole point of the RFC is that if we bundle a CA file with the distribution none of your existing code would know the difference. It would "just work" except now it would be secure.
I, for one, would like the --emulate-php-xyz option =D
user895378
If you want to write insecure code then pass the "verify_peer" => false to your call. But it's horribly negligent on the part of PHP to default to insecure settings.
@rdlowrey Perhaps you haven't gotten wiki yet because the NSA is stopping them :)
03:17
I was joking... anyone that would consider compiling with that flag should close there IDE and pursue a career in the fast food industry
user895378
@Jack Oh no, I have wiki karma now :)
user895378
@Orangepill lol
Notice: Undefined variable: r in run-tests.php on line 1242 ... wud
user895378
? Wow, never seen that before.
TEST_PHP_EXECUTABLE=auto ./sapi/cli/php run-tests.php ext/openssl/tests/renegotiation_limit_001.phpt
Maybe do some cleaning first, hold on.
user895378
03:20
Oh, I always just run tests like this:
user895378
./run-tests.php -p bin/php ext/openssl/tests
Hmm, that looks simpler :)
Joe
Joe
hello hello
so i just discovered something much worse than fatal errors
user895378
./configure --funnel-all-encrypted-data-to-nsa
I should have probably recompiled from scratch after checking out your branch .. still a strange error.
./configure --funnel-all-data-to-nsa-except-cute-kittens
Except or especially, not sure which.
Joe
Joe
03:23
@Jack why is getting a domain name such a pain in the ass?
It is?
user895378
Why?!?!? Even NSA shills appreciate cute kittens. I think. Actually, they might be cyborgs sent back from the future to rid the internet of cute kitten photography.
=O
NSA: You leave my kittens alone, ya hear?!
user895378
NSA: We know you're reading this. Hands off the kittens!
Joe
Joe
@Jack absolutely everything that is decent is taken and when you visit the site you either end up on godaddys "for sale" page or nothing loads
03:26
@Joe Cool huh? It's worse with .io domains.
Oh well.
The guys in the basement would be laughing of course.
@rdlowrey After a clean compile, it works again :)
Joe
Joe
hahahaha
damn im frustrated now. this calls for the parody site i wanted to make
@rdlowrey Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream
At: enable / disable / enable *
Apparently when you disable crypto, it's not really gone.
Unless it's a bug, which wouldn't surprise me.
Hmm okay, the negotiation to switch ssl off failed.
Joe
Joe
03:43
@Jack what do you call a team of programmers? like some jargon name
code monkeys
Joe
Joe
haha that wouldnt work
Joe
Joe
@Jack your message disappeared :D
03:49
Meh
Joe
Joe
@Orangepill s comment too
no baaadd domaaaiinn
user895378
@Jack I was actually afraid of that. I'd have to look into maybe correcting that but I'm not sure it would be worth the effort.
The domain name I referenced is available
@rdlowrey The manual page says that it should work, though.
That would be a tough one to explain to the wife though
user895378
03:51
@Jack I've encountered that before and just figured I was doing something wrong but it never seemed quite right.
There's an example that deliberately switches it on to submit user and password and then switches it off again.
Joe
Joe
u spelt it wrong though @Orangepill
But the latter fails ... even without your branch btw.
user895378
I mean, from what I read there's no known reason why clients should be initiating a renegotiation after the initial handshake is successful.
@joe but it's a hit on urban dictionary... a common misspelling...
user895378
03:52
But I think you get the same error if you try to initiate the renegotiation from the server end as well.
@rdlowrey Well, switching encryption off is a negotiation as well :)
Joe
Joe
if you buy it @Orangepill maybe some porno company will take it off you for some easy cash
and when talking about that stuff, everything sounds 'dirtttyyy' :D
I've often wondered how much money the people that owned gooogle.com, googel.com and gogle.com made when they sold their domains.
Joe
Joe
what else would you call a programmer apart from coder, software engineer, developer? any suggestions
Smartass prick
user895378
03:58
@Jack Are you using the ssl:// or tls:// stream wrappers in your test? Because I wouldn't expect stream_socket_enable_crypto to work with those wrappers (as opposed to say, tcp://).
least that's what they call me :)
Joe
Joe
were they allowed to sell those? google could've contested copyright infringement
@joe in what country :)
user895378
@Jack You'd need to fire up the server and clients using tcp:// and then enable/disable crypto when clients connect.
Joe
Joe
USA
which owns the .com tld
or so methinks
i got geek, nerd and jock, but those dont describe a coder well
04:00
code monkey
@rdlowrey I was using tcp:// for the client actually.
Joe
Joe
@Jack mentioned that too. im beginning to think 'why not'
screen gazer
user895378
LCD Sunburn
Joe
Joe
04:02
haha
brainfry
ftw
Speaking of the copyright laws, I've always found this case interesting,
Joe
Joe
hahahaha
where did you find that lol
Heard about it when it happened ..
@rdlowrey Damn, that example in the manual is total bogus :(
Hi, Guys
Joe
Joe
04:17
wow cool read
In my table i have two columns item_ID, and items. for each item-id i have multiple items. How can i write a query to get for each item_id get all items
+that item_id
moin @Orangepill
select item_id, group_concat(item) from items group by item_id ?
@JoeWatkins Morning
@user2345661 a little more specifics would get you a whole lot closer to getting what you are after.
Joe
Joe
ok I give up on this now. sleeping over it will change things i hope.
@Orangepill got it thanks.
user652649
04:43
morning
hi
$dob = 2.0750757125332E-320; how to calculate this?
user652649
what do you mean?
With such a $dob, that must be Jesus. the one from the 70's
$dob is not important but 2.0750757125332E is important
how to convert this value 2.0750757125332E?
user652649
@ShaktiPatel you mean number_format() ?
04:58
yes
2.0750757125332E=? how much value?
user652649
that's already a number
user652649
this is how computers represent big numbers
05:58
@ShaktiPatel It's E-320, not just E ... and that means it's a very TINY number.
It's also referred to as scientific notation.
Oooohhh
06:17
what's that
mornings
It's a Leica M
date('dS F Y H:i',strtotime($date))
This date format prints date like this
07th October 2013 16:27
How can strip the leading zero
Good morning.
I am expecting 7th October 2013 16:27
06:34
@gowri it's a top-secret info. Do not tell it to anyone! Go here - and look into third row in formats table. Tss.. do not tell anyone!
ltrim($date, '0'); =D
I need coffee
List comprehensions in Haskells are pretty kewl :)
Morning
06:51
morning, @Leri
SO answers should be having some flag so that author can mark it as deprecated/outdated. I recently got upvote for solution that applies PHP 5.2 and below.
Getting an upvote for an outdated answer gives you a notification, so that works fine doesn't it?
@leri, Still people using 5.2.
06:57
Otherwise you have to keep track of all your answers.
@Jack You misunderstood me slightly. I will add notice in answer itself but it would be easier to have one checkbox, so I would not waste time on writing text. :)
Hahha, I would be happy to get an upvote for any answer XD
@Leri Pfff! Lazy bum =P
@bwoebi bugs.php.net/bug.php?id=63862 are you over that ??
morning chaps
hi, @JoeWatkins
07:06
@JoeWatkins Funny request; I wonder what the expected result of sort($a = $b) would be ... is $b sorted or $a and $b? :)
Also, his idea of BC break is kind of naive ;-)
Remember, if you want something done right, do it yourself. #orgasm
That's what she said!
what's the result of the expression a=b ?
that's what you are passing ...
just $a I would expect ...
but that's probably a bit logical ... it's prolly b ...
but.. $a=$b .. is it a link?
it's an expression
not a variable ...
07:10
i.e. sort expects reference
yes
so is it correct to use sort that way at all?
user895378
14 hours ago, by DaveRandom
@rdlowrey That's what she sed
Yeah :) classic!
then why is it a bug? if someone doing sh*t - then he should be prepared to get sh*t in result.. no?
@AlmaDoMundo ergo "garbage in, garbage out"
07:11
@Gordon I suspect this user and his correct-me-code-plz to be our famous friend
yes ... I guess @bwoebi wouldn't report the bug now ... but I am digging through old reports ...
at some point php probably let you get away with it ... I'm not sure how it worked then, I don't think I done it, you were always meant to pass by reference ...
E_STRICT is not just a notice
it changes behaviour
if that's the case then it could be considered a bug, when E_STRICT broke bc ... but we are over that, so not much we can do about it now ...
if E_STRICT were renamed E_BROKEN_BC_BECAUSE_OF_SEVERE_SHORT_SIGHTEDNESS it would make much more sense ...
I would probably close that ticket; it's not even a documentation problem imho.
07:27
Ugh, the bug tracker is drunk ...
Can someone help me with my Apache settings
0
Q: Apache virtual host on 8080

progrAmmarI have IIS and Apache both running on my server. Apache is on 8080. I am having some DNS mapping issues. I have a virtual host entry as follows: <VirtualHost *:8080> ServerName something.domain.com DocumentRoot "D:/www/public_html" <Directory "D:/www/public_html"> Options Indexes Foll...

-2
Q: how to roll back the database to 6 days ago

user2861641how to roll back the database to 6 days ago. The database file is. Tried herself writes that DROP TABLE IF EXISTS yep_blc_filters ; Answer MySQL: #1046 - No database selected

To the time machine!!
Also, he's drunk.
@Jack it's good that the question is not about 'how to get db state, which will be 6 days after' :p
07:32
E_GOOGLE_TRANSLATE
07:46
@DaveRandom I ended up doing this pastebin.com/NVC5iPzH and it correctly deletes the .idea directory when PhpStorm is closed, and excludes deleting it in my web folder. Now I can edit files as I please on system using it and not worry about it leaving behind needless folders. =o)
07:58
@crypticツ Interesting, it creates an .idea folder in cwd? I though it would take the dirname($1).
@Jack I'm using Thunar's custom action feature. Made a right click menu item so I right click the file and choose PhpStorm and it opens it from that location.
I could do dirname to make it more portable for someone who does not use that method
I shee.
I'm revamping our CRM system that we wrote with LAMP. One thing we are rethinking is the permissions and roles system. Every user has specific privileges to access certain pages and see certain things. In some instances, certain page subelements are restricted by roles as well. What is a good authentication system design that is suitable for this type of usage?
@crypticツ Great, so phpstorm doesn't detach terminal at all then? That makes life much easier :-)
mornings @all
@DaveRandom If it detached, you would just track its pid and then wait for it to stop :)
Morning
@Jack Indeed. Unless it's one of those really poorly set up daemons that detaches by killing the parent PID (which is, annoyingly, pretty much the only option you have in PHP unless you self invoke with nohup <stuff> 2>&1 > /dev/null &)
morning, @Fabien
@DaveRandom Ouch :)
08:37
@AlmaDoMundo So I really am going to finish up that thing for you this morning, I promise. People kept making me work yesterday :-(
@Mr.Alien :P
@LeviMorrison +1
@DaveRandom hi. Ouch.. I'm grateful - but you don't have to do this :) It's ok if you'll decide that it don't worth your time :p
08:41
posted on October 09, 2013 by Lorna Mitchell

OAuth can be anything you want it to be, the standards are lax and give you plenty of room for getting the right implementation for your system. However you proceed, though, you'll need to check an access token on every request - and in a Slim application, a middeware can help enormously since it hooks in to every request by design. I've recently implemented this and thought I would share. A

20 hours ago, by DaveRandom
@AlmaDoMundo You underestimate just how much I don't want to do any real work
Hey @Jimbo
Hai all
11am and just got to work
The professional
08:54
@LeviMorrison I'd consider having 5px padding on the sides in mobile view.
Hey @Starsong
se·cu·ri·ty [si-kyoor-i-tee] noun: Gets in the way of getting stuff done until you get pwned then it's the most important thing in the world
2
Thought for the day: Windows Sucks
4
good morings
@Starsong true story
08:59
@Jack @JoeWatkins about bug #63862 It was basically a request to change tgat specific behaviour to return there an IS_CV or IS_VAR instead of an IS_TMP_VAR...
@Jimbo RT'd that onto my TL. :P
@Starsong Haha :p
I'm taking a course in programming languages... class.coursera.org/proglang-002/lecture/index
functional programming looks odd
@iroegbu Depends on your goals, actually.
I feel I don't know enough of programming, I mean independent of a particular proglang.
09:06
It helps to have had programming theory before.
Incidentally I've been picking up Haskell for the fun of it.
I sometimes wish I hadn't learnt a more functional approach first. It enabled me to be lazy. But then again, I don't think I would've understood as fast either.
I want to be able to solve problems in my head first then choose a tool to use... Presently, what I do is use which ever tool I know and try to solve the problem using it, not minding/knowing if some other tool would have made it easier.
My tool to solve problems typically revolves around a piece of paper and a writing utensil :)
@Jack Sadist. You'll be writing LISP next...
09:26
@DaveRandom For one, their lists actually work :)
@AlmaDoMundo lol
I'm glad that we have generators now, though ... it makes it nicer to deal with ranges.
but actually. even without generators is was possible.. since spl iterator exists. generators are just more simple way to achieve this. No?
Hence 'nicer' :)
Instead of having to implement Iterator you can write a two line function to do the same thing.
Next up ... list comprehension for php =D
the thing is.. that me, for example - already have a habit to use such 'little' things as short-arrays syntax, generators, e t.c. - i.e. those things, which are not necessary, but yet now I'm looking to them and thinking - wow, how ugly it was without them
09:36
hello guys i have 2 arrays with the same key and i want to merge it, but still keep the key and the value will be an array of all the values from the certain key, is there a function already in PHP?

so

array(1=>a,2=>b) + array(1=>aa,2=>bb) = array(1=>array(a,aa),2=>array(b,bb))
@tomexsans you may play with array functions, but.. simple loop will be most easiest solution
@tomexsans Try using MultipleIterator.
Are the keys in the same order for both arrays?
@Jack Do you happen know if switch works like an elseif tree or does it convert to a HT for the lookup (or where the relevant bit of C sauce is)? /cc @bwoebi @NikiC
@Jack yes they are the same order
Jes
Jes
Hi friends
09:39
(yay multiping)
@DaveRandom I believe it's if/elseif tree.
Jes
Jes
nice to meet you all
i m pretty to new this room
Judging based on the fact that you can do switch (true) { case <expr>: }
@DaveRandom it's an if/elseif tree
Jes
Jes
this is my first time
i m learning php
09:39
we don't have jumptable optimization for it :/
Jes
Jes
got a question
i have created a html form
@NikiC Not (yet)? =D
Jes
Jes
now how would i get the values in php ?
@NikiC kk thanks. Yay micro-optimisation!
@DaveRandom Of course you could make the jump table yourself :)
09:41
@DaveRandom I count that outside of micro-optimization already ^^ Dispatching based on switch (rather than methods for example) can be a serious slowdown :)
But you definitely wouldn't have fall-thru
@Jes Read the documentation.
That said, fall-thru is usually unwanted anyway.
@Jes When you have read the manual, if you still can't figure it out, please ask us a more specific question. We appreciate effort. (I feel like this could be the room topic)
Jes
Jes
ok
will come back to you guys
thanks @Starsong
09:46
@Jack Could be done, but in order to do it the pre-processing required would probably blow the gains away unless the tree is hit a lot...
But I don't really care because I almost never use fall-through
@NikiC When you say "based on methods" do you mean an array of callables or what?
@DaveRandom oh, I have no idea what you're doing, so likely it doesn't apply anyway
That feeling when you code something complex and it just works with no debugging... I don't get it often.
Basically I mean having all the branches in the switch in separate methods and calling the appropriate one ;)
The feeling when you code something simple and it refuses to work ...
@NikiC Actually it sounds like what I'm doing isn't far off what you're talking about, essentially I'm looking at converting a switch to an array of closures.
@NikiC Well yeh, but the reason you'd have the switch in the first place is to work out which is the appropriate one...
09:50
$this->$method() @DaveRandom >D
@DaveRandom Yeah I'm assuming that there is some simple dispatch rule (like call method {'method' . $i} or so ^^
@Jack Right, so that's (more or less) an array of callables
hello evryone
@DaveRandom Technically, yes. Because objects are just glorified arrays anyway :)
@NikiC That would work for my case but methodNNN() would be horribly unreadable
09:51
how to send email from php using gmail as smtp
@Jack I would say the opposite of that, but yeh
The opposite ... arrays are glorified objects ... hmm, does not compute.
s/glorified/stupidified
lol
$object = ['foo' => 'bar']; yay
$array = ['foo' => 'bar']; ... see the difference? :)
where it is?
09:59
wow, github supports CSV files: github.com/hakre/hashcat-gui/blob/master/tmp.drhash/src/… - just seeing, this is somewhat really cool.
@hakre oh wow.
@AlmaDoMundo it's in the name! :)

« first day (1089 days earlier)      last day (4087 days later) »