« first day (1528 days earlier)      last day (3406 days later) » 

12:34 AM
@NikiC It's ages since you sent that, why'd you want it?
checking array mem consumption?
 
Hi peeps
What am I possibly doing wrong?
`setcookie('session', 'this is a session', 0, '/', 'http://localhost', FALSE, FALSE);`
 
@MikeM. Are you trying to set a cookie? and it's `foo` for code e.g. foo
 
I give up with the format code
and ye.
for some reason it doesn't set that cookie :(
 
@MikeM. Did you do that before any other output?
 
12:41 AM
Yup
Nothing is being outputted.
`<?php
setcookie('session', 'this is a session', 0, '/', 'http://localhost', FALSE, FALSE);
//name, value, expire, path, domain, secure, http-only

if(isset($_COOKIE['session'])){
die("cookies are used");
}else{
die("cookies are not used");
}
?>`
sorry for the inline code, it isn't that big tho :)
 
@MikeM. Did you refresh the page?
 
maybe 50 times now xD
 
You can mark this as code by editing your message and pressing fixed font next to the send button ;-)
 
Also, why'd you specify all the parameters?
The last 3 are probably unnecessary or problematic
 
hmmm
 
12:44 AM
Like 'localhost' - maybe should be 'localhost:8000' (if that's your port)
 
removing the last 3 did the thing
 
not setting the domain basicly says "take the upper domain"
 
It's probably the domain that's the problem
@MikeM. depends
Did you try 'localhost:8000'?
 
nope
I am quite sure I don't run port 8000 anyways xD
 
12:47 AM
What port then?
 
80 :)
 
OK, the port's unnecessary
 
once I do:
 <?php
	setcookie('SimpleBB[session]', 'this is a session', 0, '/');
	//name, value, expire, path, domain, secure, http-only

	if(isset($_COOKIE['SimpleBB[session]'])){
		die("cookies are used");
	}else{
		die("cookies are not used");
	}
?>
it fails
while it is set....
 
refresh
is it fixed now.
 
nope
 
12:51 AM
well, the [] might be the problem
Also, why are you using cookies and not sessions?
 
yet the session is there.
http://i.imgur.com/JQ2JzcH.png
because this session == sessionkey
the sessionkey is saved into the database with the loginkey, the loginkey checks which user it is and bam, remember me is working.
 
OK, it might be PHP mangling the names of cookies (a legacy of register_globals)
try var_dump($_COOKIE);
 
@MikeM., tools.ietf.org/html/rfc6265#section-4.1.1 seems not to allow [] in cookie names
 
hmmm
array(2) { ["session"]=> string(17) "this is a session" ["SimpleBB"]=> array(1) { ["session"]=> string(17) "this is a session" } }
 
@MikeM. Ah, PHP interprets [] as array indexing for cookies just like GET and POST, I guess.
 
12:56 AM
Indeed
<?php
	setcookie('SimpleBB[session]', 'this is a session', 0, '/');
	//name, value, expire, path, domain, secure, http-only

	var_dump($_COOKIE);

	if(isset($_COOKIE['SimpleBB']['session'])){
		die("cookies are used");
	}else{
		die("cookies are not used");
	}
?>
That does the trick :)
Which is quite correct as SimpleBB turns out to be an array with the Session as key with a value
 
idk why I do it like that anyways.... xD
 
There's still the question why you're not using session_start
 
Remember Me with sessions???
Not working quite well is it?
Unless you want to keep the user logged in until the user logout or closes the browser.... but that's not the point of a remember me
 
@AndreaFaulds are you suggesting lowercasing all class/namespace names then?
(talking about the internals case sensitivity thread)
 
1:00 AM
Shouldn't classes and namespaces always be initcap?
 
@MikeM. that's just a convention that has been adopted
 
@Ocramius Nah, just filenames in autoloaders.
 
I always do filenames in lowercase
xD
 
1:03 AM
why doing stuff like: MemberClass.php if you can do memberclass.php <= just an example on what I mean...
 
@AndreaFaulds did you consider bringing it up in the composer ml then? It's not a bad idea tbh
@MikeM. because of existing autoloaders (pre- and during PSR era)
 
@Ocramius I'm not on the composer ml, someone ought to suggest it though
 
No idea...
 
Will do
 
Something like "psr-4-lc": { ... } (PSR-4 lowercase) would be cool
 
1:04 AM
@MikeM. You could save a token on client side to login the user again. setcookie('SimpleBB[session]', 'this is a session', 0, '/'); is also a session cookie that will be deleted when user closes his browser.
 
/leave
 
I hate PSR-4, so I'm gonna propose PSR-0-lc XD
 
@Ocramius Or that :)
 
j/k, I don't really care
 
Shamed to say that no shit because of the 0 xD
That was just to test if the cookie works
the cookie will exists for 30days....
 
1:12 AM
 
@Ocramius :)
 
fairly sure existing codebases cannot be migrated
because of issues with git/svn with file path collisions on case-insensitive filesystems -.-
 
@Ocramius ?
You can do a rename.
Change the root dir, perhaps.
 
yeah, I broke few repositories on windows systems doing that :-)
not fun to solve either
 
Making case changes with git on windows is definitely no fun
I've had some really weird issues in the past when people did that
 
1:16 AM
Huh? It causes problems?
But Windows is case-preserving...
 
Also, for the record, lowercasing for autoloading is really really really ugly
 
@NikiC ?
OK, don't lowercase
 
I'd much rather update code for case-insensitive class names than deal with a lowercasing abomination
 
Convert to under_scores
Honestly, dir-structure-based autoloaders are wrong anyway
Use a map ;)
 
@NikiC I also dislike the idea, but it indeed simplifies things a bit
 
1:19 AM
@Ocramius ogodnokillitwithfireaaaaaa
 
From a style perspective, lowercase class names are really ugly
that said, I need to get back and do some more java and get used to it: they survived with it for ages.
 
If the thing went to a vote, I'd probably vote for making class names (and class names only) case-sensitive. Though I'm probably in the minority there ^^
 
ntfs is actually case sensitive, btw
 
If you're going to revisit auto-loading, a plugin based system for autoloaders in Composer would be better than a new single standard.
 
@NikiC They are case-insensitive.
 
1:20 AM
@Ocramius Java does lowercase class names? I've never seen that. But I didn't do much java
 
@PaulCrovella what is ntfs?
@NikiC no, they do namespace lcase
 
@PaulCrovella No it isn't. It's case-preserving. lrn2filesystems
 
class name is uppercase
 
windows file system
 
@Ocramius Ah yes, that they do
 
1:21 AM
again, also a convention, not enforced.
 
@Ocramius IS THAT A CASE-SENSITIVITY JOKE AHAHAHA
@PaulCrovella what's windows
 
I was asking about ntfs, not NTFS!
3
they different.
 
it's like NTFS for Billy Mays victims
@PaulCrovella Huh, interesting. I didn't realise.
 
@PaulCrovella Ah, so basically it's case-sensitive, unless you try to use it. Right?
 
1:22 AM
yep :)
 
Netbeans be like "X updates found", I be like "Netbeans don't -.-"
 
@AndreaFaulds You're thinking of OSX HFS ?
 
@NikiC It depends on the subsystem Windows is running in
@Danack ?
 
@AndreaFaulds The osx filesystem is case-preserving in the sense of touch foo.txt; touch FOO.txt results in a single file with lower case foo.
 
@Danack NTFS is case-preserving, though.
@Danack Mac OS 9's filesystem supports both case-insensitivity and case-sensitivity
 
1:25 AM
From Paul's link: "For example, the following filenames can coexist in one directory on an NTFS volume: CASE.TXT case.txt case.TXT"
 
I don't feel I should say it's OS X's, because it really isn't. It's the FAT32 of the Mac world
@Danack Yes, NTFS is theoretically case-sensitive. But most (i.e. all actually used) NT subsystems use NTFS as a case-preserving filesystem
 
Regardless:
9 mins ago, by Danack
If you're going to revisit auto-loading, a plugin based system for autoloaders in Composer would be better than a new single standard.
It would also allow interesting things like code-generating libraries to be invoked when necessary, rather than having all code have to exist on a filesystem before it could be used.
cough cough proxy-manager should have that.
 
Code-generators?... Excellent idea!
Now we can have barewords with backslashes!
 
@Danack you know that composer already supports plugins, right?
 
@Ocramius not for autoloading, right?
 
1:34 AM
You can add your own php files to the autoloader
they'd just be additional callbacks
all functional libs do it already
 
I has a new avatar. Hopefully.
StackOverflow y u no update
YAY it updated ^^
 
caching hates christmas
 
aye
aw, GitHub doesn't use Gravatar any more :<
function getIPTask() {
    yield;

    $stream = new Hanno\Stream("http://ip.jsontest.com/", "r");
    $data = (yield 'until' => $stream->read());
    $data = json_decode($data);
    var_dump($data->ip);
}
$reactor = new Hanno\Reactor;
$reactor->addTask(getIPTask());
$reactor->run();
I should finish Hanno...
 
1:56 AM
@Ocramius That's not as awesome as being able to reuse new autoloaders across different libraries.
 
@Danack I use the Zend\Loader if I want to hurt myself O_o
 
@AndreaFaulds first moment I thought you'd use Amp…
 
Maybe I should ^^
@Danack Mesmerising
 
@AndreaFaulds well, in reality in your Application you anyway don't use Reactor primitives. All you do is yielding back what you get from the libs you use. The Application should try to be unaware of the underlying Reactor primitives.
 
I needed an image loading, er, image - so stealing ideas from imgur.com/gallery/tzdth
 
2:02 AM
so, there's no point in making the Reactor providing high level APIs for everything, Application anyway shouldn't need them.
 
@Danack I've always been a fan of a simple "Getting loaded..." bit of text.
 
@Danack use jumping ElePHPants
 
@AndreaFaulds and that's IMO exactly what Amp bids. low-level primitives to be used in a library.
And the nice generator resolver as a plus on top of it.
 
@PaulCrovella Meh - that pops too much when the site is doing responsive crap design.
 
@AndreaFaulds Your example really isn't real world code. You'd never operate on a protocol directly; you abstract it away (e.g. like Artax does)
 
2:06 AM
I don't see why you wouldn't.
If I want a GET request, I want a GET request...
 
Just that you don't want a GET request directly, but something where you can set uri, headers etc. and which bid you also a nice Response interface.
at least not in real world.
 
this gives me that
 
?
 
2:35 AM
wew
mybb cookie: mybbuser
content: user static login key
First try: change mybb user cookie to a test account

got into the account without any login
 
you should save a base64 encoded version of this in the cookie too
 
Going to get a friend to head out for a second test
 
3:30 AM
Feedback on stackoverflow.com/a/27596194/3942918 would be appreciated. I'm always a little hesitant when it comes to matters of security and it'd be good to know if I'm missing something or where I'm full of shit.
 
4:07 AM
@MikeM. I've updated it a bit to clarify
 
I know what you mean but we aren't talking about 100 to 10 years
we are more likely talking about a hour to 30minutes or even less!
 
no... no we're not
not even close
 
I know what you mean but you actually have to weight both items before taking a decission....
How big is the change that you update the cost within a year, and how big is the change you get attacked within a year?
I am just a bit brainstorming, don't be offended or so...
 
@JoeWatkins Did you end up writing that function autoloading patch? Because if not, no bother, I'm working on one ^^
 
@MikeM. Oh, not offended at all. Just at .3 seconds to compute a hash you're looking at actually cracking a password every 12 years or so. And that's what's important, keeping the hash calculation time up. If you store the entire string it's actually trivial to upgrade later, just password_needs_rehash during login and rehash if necessary.
 
4:16 AM
I don't use it XD
I am just talking about storing $2$10$ with the salt or password....
 
ya gotta store it, along with its connection to the salt and password, somewhere
 
Well you do not need to store it if you take "time-over-patch"
 
if it's a private script you can just define it upon hashing, this is not good if you ever need to upgrade as you say.
it does however take the "attacker" a longer time to think what kind of hashing method you used.
if it's a public open-source script you'd rather go with "patch-over-time"
 
It's terrible if you ever need to upgrade, and you do. Do not rely on security through obscurity either. If a flaw is found in the algorithm you're using, a new attack method opens up (think of what the introduction of GPUs did), or whatever an attacker only needs to figure out what (outdated) method you used once - then the rest is wide open.
 
4:25 AM
indeed that's why I said both has cons and pros
 
that's like being offered a penny or $100, and weighing the pros and cons of which to choose.
 
4:46 AM
guys, is anyone proficient in RX (doesn't matter what language it is)
I have a conceptual question about it: stackoverflow.com/q/27596693/251311
 
fucking youtube
so .. I had this naive idea to expand my youtube subscriptions
of course the "browse by category" system has ben completely fucked up
like all the other parts of youtube, it's designed as an echo-chamber .. only category section is country-based
basically it is terrible, because it seems that people in latvia, who use youtube, have no taste
 
5:02 AM
The overwhelming majority of content on youtube is terrible. Everywhere.
It really should be rated on the bristol scale.
 
good morning
 
zan
Good Morning folks
 
morning
 
MOrning! :D
 
5:53 AM
Morning
 
MORNING
sorry for interrupting, I want to ask you. Anybody know about this problem?stackoverflow.com/questions/20146967/…
I have tried that solution but it's not make a change. THanks for advance
 
6:23 AM
Good morning
 
morning
any help please
 
7:06 AM
hello
 
morningz
@HendryTanaka don't repeat yourself, you asked the question and if someone wants to answer they will ...
 
@JoeWatkins Sorry, but....oh well...i'll wait. sorry
 
morns
 
moin @PaulCrovella
 
7:31 AM
posted on December 22, 2014 by kbironneau

/* by serviet */

 
@HendryTanaka If you want to convert html to pdf, this is much, much better than than tcpdf etc: github.com/KnpLabs/snappy
but you need to install wkhtmltopdf.org
 
anyone uses sublime text 3?
their cdn is down I desperately need a 64bit deb/tar of the latest dev version :(
 
@SergeyTelshevsky seems to work for me?
but the cdn takes a few seconds to respond
 
Must be blocking my region or something, none of the downloads work :(
nevermind, found in the download history :)
but still have some problem with dns
 
7:53 AM
morning
 
@Patrick What's wrong with tcpdf?
 
@HendryTanaka it has a very bad html to pdf conversion. Lots of buggy stuff and you can't even use divs if I remember correctly. wkhtmltopdf renders the same as your browser so it looks identical, it can even handle javascript... It's like comparing a a toy car with a broken wheel to a lamborghini
 
... not to mention that tcpdf apparently isn't working for you anyway.
 
tcpdf is as ugly as hell
 
Quick question, what is this kind of data ? laravel.io/bin/NkdDW It's seperated by { } for each set of data
It says it's json but xD how do i "parse" it XD
 
8:05 AM
json_decode()
 
It looks like incomplete JSON with some escaping characters in weird positions. Maybe some other obscure serialisation format?
either that or just malformed JSON
 
I'm pretending that's a bad paste. If it's not well.... then it's a string. Just another string.
 
Good monring
 
8:09 AM
morning
 
It's not a bad paste xD hmm i smell Angular js
 
@CodeGuru it's json.
Unfinished json string
 
Wow the amount of stupid in that ^ thread is amazing
The best one being:
> sizeof isn't 0 based so it starts at 1 then 2 etc.
Whatever that means :P
 
@PeeHaa it's like everyone is racing to get a negative score
 
:P
 
Hello
 
i am looking to remove null bytes from my string what's the most appropriate way to do it ?
this str_replace(chr(0), '', $foo['foo']);
OR
this  $value = str_replace("\0", "", $value);
 
8:22 AM
@Patrick Um...thanks for suggestion
 
happy holidays @PeeHaa and @Gordon
and also to the room 11 regulars. ^_^
 
hey @PeeHaa ^
 
@reikyoushin Happy hollidays :)
 
good meurning!
 
8:41 AM
@PeeHaa do you mind having a look at my question ?
 
@Joseph Maybe. Depends what the next step involves :P
 
@PeeHaa oh . Nothing i just want my question answered if possible. I don't have money to pay you if that's what you are asking for .
 
Nope not asking for money. Just like to know what your question is before looking into something. If I were you I would you ask my question instead and if somebody is here and wants to help they will
 
@PeeHaa oh my bad i thought you saw it.
 
I would go for the second example but I think it is subjective
However this begs the question. What are you doing that results in strings with that in it :)
 
8:51 AM
@PeeHaa using them in queries .
 
Why?
 
But where would the null bytes come from? Is it user-generated data? Couldn't it then contain other invalid characters than just the null character?
 
@PaulCrovella Thanks language nazi :)
 
@SimonSvensson yes it is user generated, but i wouldn't worry too much about that , as i am using PDO.
 
8:54 AM
o hai
 
ohai @FlorianMargaine o/
 
@PeeHaa because i need the data to be stored in my DB
 
@PeeHaa Sorry, that one is a pet peeve. At first it only kinda annoyed me, then I ended up with a (bad) manager who misused it multiple times every damn day. Now it triggers rage.
 
@Joseph But where are the null chars coming from?
@PaulCrovella :-)
 
@Joseph, and why do you need to remove null characters? Doesn't PDO handle them correctly?
 
8:55 AM
@SimonSvensson i do not know, does it ?
@PeeHaa because i read somewhere that of this kind of attacks
 
I assume that everything should work as-is, as long as you're doing stuff like bindValue and not building sql strings manually.
 
@PeeHaa so i thought why not cleaning my inputs from those
 
@Joseph In order to prevent attacks you would need to understand what you are defending against
 
@SimonSvensson i am binding my values like they should be
 
8:57 AM
@Joseph, then try issuing a request using a null character and see if PDO handles it correctly.
 
AFAICT in php this is handled for you
Unless you have found something wrong with php where it isn't handled correctly
 
I wouldn't confirm without code...
 

« first day (1528 days earlier)      last day (3406 days later) »