« first day (1385 days earlier)      last day (3556 days later) » 

3:00 PM
@DaveRandom The moment I stepped out of the place I burned it down!!!!!!!!!!!!!exclamationpointexclamationpointexclamationpointexclamationpoin‌​texclamationpointexclamationpointexclamationpoint
 
user895378
morning
 
> This works but I'd like to know how I could make it better?
way to read the FAQ there my friend
 
morning @rdlowrey
 
Every time I grow my beard I think... yeah longer is awesome. Then I catch myself in the mirror and think... "You look like a terrorist". It's a mistake I can't seem to stop making.
 
3:03 PM
@Fabien terrorism or growing your beard ?
6
 
Yeh, I'm not sure growing a beard counts as terrorism
I haven't been arrested yet
 
still not allowed a beard ...
 
Missus has no choice.
 
I just don't want to be searched every time I go to the airport.
 
@Jimbo What, she can't get rid of her beard?
 
3:05 PM
:D
 
Or is she your beard?
 
@DaveRandom I need to deflect this but I can't think of a valid response
400 sir, 400.
 
@rdlowrey mornings
3 hours ago, by DaveRandom
@rdlowrey can we suppress the E_DEPRECATED for CN_match in 5.6 when the value exactly matches sslsock->url_name? Since you have to specify CN_match in order for the name to be validated in <=5.5, you can't write secure, cross-version error-free code without a version check, which is kind of wanky
 
user895378
@DaveRandom This sounds like a bad idea to me. Something is either deprecated or it isn't. Introducing special cases where it isn't deprecated is just confusing. And as for writing cross-version compatible code you totally can:
 
user895378
$peerNameKey = (PHP_VERSION_ID < 50600) ? 'CN_match' : 'peer_name';
 
3:07 PM
That'd be a pretty awesome comeback for when your wife tells you you're not allowed a beard. "How come you get to have one?"
 
user895378
@Fabien damn.
 
</relationship>
 
user895378
Welcome to Fabien's Marriage Advice Corner.
 
@rdlowrey Well yeh obviously you can do it, it just sucks a little bit
 
I just passed the 3 year mark last weekend :P
 
3:07 PM
@Fabien if you could use that as a come back, it wouldn't really be awesome ...
 
user895378
@DaveRandom I mean, if you think it's a problem we can kill the deprecation warning altogether.
 
@rdlowrey no I'd rather not do that, it needs burning and it was approved as part of an RFC. It's hard enough to get people to agree to remove shit, let's not rock that boat over a minor annoyance
 
@Fabien And in total?
 
8.5 years
 
user895378
I really am going to bite the bullet and finally do all my doc updates for the TLS stuff this coming week.
 
3:13 PM
@Fabien Why </relationship>? I envisage and slap / chase around the house, but ultimately, laughter :-)
 
Hey so @rdlowrey you know we were talking about exposing the ability to do raw stream socket creation? Turns out you already can: php.net/manual/en/function.stream-socket-pair.php
Quite why there is no stream_socket_create() I have no fucking idea
Wonder if we could sneak one in before 5.6.0/in 5.6.1?
It's not really a new feature and has no BC implications, it's just a saner API
 
@Jimbo Why would you slap her?
 
@Fabien For wearing a beard I should have
 
user895378
@DaveRandom If you want to do it I will help with testing and a middle of the night ninja merge. 100% support from my corner.
 
lol
 
user895378
3:15 PM
Shoot first, ask questions later.
 
@rdlowrey Like what we do with @Lusitanian's mom. Also morning
 
user895378
@Jimbo I also merge with her in the middle of the night like a ninja, yes.
 
:D
 
Where the heck is @Lusitanian btw? O_o
 
fucking PM
 
3:16 PM
he's fucking your PM?
 
user895378
that shouldn't have been funny but it was
 
Shit, she looks like an egg!
 
sorry, had to.
 
so ... there a JuniorDev, they were planning tasks for him and PM found out that there are no takes planned for last 2 days (3 week plan)
guess what he decided top do ?
 
Go on
 
3:19 PM
to find additional tasks for him, because "his plan is not full"
"otherwise he will be slacking off"
 
They assume too much that he'll manage these tasks to the second :/
 
60
A: What is the terminal velocity of a sheep?

CalebFalling speed is explained in the "Transportation" page on the wiki: Every tick (1/20 second), non-flying players and mobs have their vertical speed decremented (less upward motion, more downward motion) by 0.08 blocks per tick (1.6 m/s), then multiplied by 0.98. This would produce a terminal...

lol ^^
 
heh. Wife told me the url to her printer so I can email it and it prints the contents. I sent her dickbutt :P
Wife: sigh. poor wastes paper with a penis
 
@Jack great question, lol
 
ooh, my one post gave me 22 link karma on reddit .. thank you, dr. evil!
 
3:25 PM
@Jack I've never played Minecraft before but that answer makes me wanna try it out.
 
@cspray it's like playing Lego, just that you usually imagine a story when playing with Lego, which makes Minecraft kinda dull once you built everything you wanted to build. Although it takes some time to get there.
 
> I couldn't find anything on the falling speed of chickens, so I set my own apparatus to test. < instant win
 
did that sound jaded?
 
@Gordon Not really
 
fun fact: i forgot to visit SO because of Minecraft when I was close to 1000 consecutive visits.
 
3:36 PM
Any ideas what to tick1?
Godaddy default is v 5.4, I need .5 for password_hashing
 
@Gordon nooooooooooo
 
Anyone know what I should do?
 
Go to the pub?
 
I don't drink.
Also im talking about Godaddy's php thing.
 
3:40 PM
Wtf
I got an error on
$hash = password_hash($_POST['password'], PASSWORD_DEFAULT);
 
@RahulKhosla If you don't know what you need, you could try randomly clicking things or use the defaults button...
 
Tried defaults, it said it didn't know wha the PDO class was.
 
soo... have you tried to add pdo + pdo_whateveryouuse and then tried again? ...
 
Call to undefined function password_hash() in
Thats with 5.4
 
@RahulKhosla ...so use the password_compat lib I just linked you to then...
 
3:43 PM
read the link that daverandom posted...
 
@Gordon Any minecraft mods?
 
I'd rather use 5.5 if I can, meaning I wont have to manualy add each function.
 
Look at the link Dave sent @RahulKhosla
 
So use 5.5, and whenever you find something that complains something is missing, add that thing...
 
@Fabien nah, always played vanilla
 
3:48 PM
As a base from that list I'd have apcu/dom/fileinfo/gd/imagick/ldap/mbstring/mcrypt/mysqli/odbc/opcache/pdo/pdo_my‌​sql/pdo_pgsql/pgsql/phar/posix/sockets/zip @RahulKhosla - but that's a list of things I use, not necessarily a list of things you will use, and not necessarily containing all the things you will need for whatever you are doing
 
@DaveRandom what if it complains there aren't enough unicorns?
 
@Jack Add more unicorns. Duh.
 
Or, maybe pirate ships.
 
php.net lists have suddenly gone quiet for the day or my subscription is broken again?
 
nope, relatively quiet
 
3:51 PM
@Jack lulz
 
@Gordon If you've spent your time in vanilla you should really check out something like "Feed The Beast'.
 
@DaveRandom Thanks, Im just using a few, is there one for header's?
 
@DaveRandom we sometimes have that problem here as well ... someone said "feets" so I thought he meant "fits" ... turns out he meant "feeds" :)
 
@Gordon Tekkit has a nice introduction to some of the core mods that are part of FTB. You can probably skip top video #5 though.
 
someone has some sed-fu in here?
I'd like to replace \n\nFOO by BAR\n\nFOO
 
3:58 PM
sed-atives?
 
/usr/bin/sed I mean
 
okay, so, what's the problem?
 
@bwoebi In what file/files?
 
@webarto In a .c file.
The newlines don't like me with sed.
 
@Fabien thanks. ill check it
 
3:59 PM
@RahulKhosla What do you mean "headers"? What do you want the extension to do?
 
2 mins ago, by bwoebi
I'd like to replace \n\nFOO by BAR\n\nFOO
 
@bwoebi find . -type f -name *.c | xargs sed -i"" "s#\n\nFOO#BAR\n\nFOO#g"
Not sure, tho.
 
tried.
didn't work.
 
@bwoebi have you tried using '$'?
 
@Jack no?
 
4:01 PM
@bwoebi link
 
@DaveRandom Nvm i got it, sorry.
 
will try.
 
@Jack php.net/manual/en/filter.filters.sanitize.php what one should I be using for your guidv4();?
 
@bwoebi They mentioned of using something known as perl.
perl -i -p -e 's/\n//' file
 
@RahulKhosla huh?
 
4:04 PM
I need to santasize the get
Idk what to use.
 
SANTASIZE ALL THE THINGS!
 
@webarto perl in a PHP Makefile? Great! :-D
 
Facebook's down?
 
1
Q: PHP preg_match UUID v4

PavI've got a string that contains UUID v4 $uuid = 'http://domain.com/images/123/b85066fc-248f-4ea9-b13d-0858dbf4efc1_small.jpg'; How would i get the b85066fc-248f-4ea9-b13d-0858dbf4efc1 value from the above using preg_match()? More info on UUID v4 can be be found here

 
@bwoebi Haha, that would start a war.
 
@RahulKhosla Working for me, but very slow
In fact all I get in the top banner
 
This is gonna cause some headlines.
 
Maybe it's going to cause people to actually some work
 
"FB crashes for 20 secconds" --- ILLUMINATI SHIT
WW3.
 
meh
 
4:09 PM
@Jack Why not just use a sanitize thing?
 
@RahulKhosla There's no FILTER_SANITIZE_UUIDV4 that's why
 
Oh right
Thanks for the link then :)
 
@Jack and how does it work for two newlines?
echo "regexp" | sed 's/regexp/\'$'\n\'$'\n/g'
doesn't work.
 
@Gordon Not just me then
 
@bwoebi ehh good question
 
4:16 PM
@Jack I can also work with any other tool… as long it's acceptable in a PHP Makefile.
If I could choose, I'd use php -r here, but hehe
 
I don't think I've built a system like this so far (for work). 51 classes and counting... (inc exceptions though)
 
@Jack don't talk so much in irc, help me please :x
 
:P
 
and stop using sed syntax as long as you don't master it :-P
 
@bwoebi you know php could have done the replacement by now =p
 
4:21 PM
2 mins ago, by bwoebi
If I could choose, I'd use php -r here, but hehe
 
there you go
ugh .. fine ... let's see
 
Replace it once and then replace it again :P
 
@bwoebi printf "\n\nBAR\n\nBAR" | sed ':a;N;$!ba;s/\n\nBAR/FOO\n\nBAR/g'
stoled from teh internetz
Problem is that sed operates line-by-line, the crazy construct at the beginning basically loads the whole file into the matching space
 
bob$ printf "\n\nBAR\n\nBAR" | sed ':a;N;$!ba;s/\n\nBAR/FOO\n\nBAR/g'


BAR

BAR
didn't work.
 
[cwright@host37 ~]$ printf "\n\nBAR\n\nBAR" | sed ':a;N;$!ba;s/\n\nBAR/FOO\n\nBAR/g'
FOO

BARFOO

BAR[cwright@host37 ~]$
#worksforme
 
4:30 PM
Use an exoctic *NIX system like OS X and it stops working.
 
s/exotic/stupid/
^ oh, the irony
 
@DaveRandom didn't match, as I mistyped "exotic" :-P
 
@bwoebi do you have to use sed?
 
@Jack anything acceptable in a PHP Makefile.
 
except Perl? hehe
 
4:32 PM
so, something generally available.
 
have you tried tr?
 
I have no idea of how the syntax is.
 
tr <find> <replace> < file.c
 
does tr '\n\nFOO' '\nBAR\n\nFOO' < file.c > file.c work?
or how?
 
that's the theory.
not sure whether piping in / out the same file would be advisable.
especially if you don't know whether it will work heh
 
4:35 PM
no idea if that works. otherwise I need to copy the file first.
 
i have to say tr does some really weird shit on my system.
 
printf "abc\n\nFOO\ncba" | tr '\n\nFOO' '\nBAR\n\nFOO'
abcBBA

Bcba
huh?
 
inorite ... fubar
 
oh no
 
is it just OSX or sth?
 
4:38 PM
the characters in string1 are translated into the characters in string2 where the first character in string1 is translated into the first character in string2 and so on.
 
@bwoebi what about escaped newline literals?
 
no, this time not.
 
ah feck
 
printf "\n\nBAR\n\nBAR" | sed ':a;N;$!ba;s/\
\
BAR/FOO\
\
BAR/g'
 
didn't work either.
 
4:38 PM
Nasty but works on linux
 
misread. the problem is that operating on the full file doesn't work with sed on OS X.
 
@bwoebi damn it, your stupid problem is worse than the game about squares!
 
I think it won't work with sed.
@Jack lol
 
@Jack preg_match('!/images/\d+/([a-z0-9\-]*)_!i', $uuid, $m) whats $m?
the output?
Dam how I hate regex
 
I have no idea… but maybe awk works?
 
4:44 PM
@bwoebi printf "\n\nBAR\n\nBAR" | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n\nBAR/FOO\n\nBAR/g' ?
 
$ printf "\n\nBAR\n\nBAR" | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n\nBAR/FOO\n\nBAR/g'
FOOnnBARFOOnnBAR
not really.
 
Oh I saw that somewhere as well, one sec
 
ok, I'm losing my mind here
$signature = $this->worker->parseAst($node);
var_dump(serialize($signature));
$node->jitType = $signature->getReturn();
.string(250) "O:18:"JitFuPHP\Signature":2:{s:9:"\000*\000return";O:13:"JitFuPHP\Type":3:{s:7:"\000*\000type";i:1;s:10:"\000*\000subType";N;s:11:"\000*\000userType";s:0:"";}s:9:"\000*\000params";a:1:{i:0;O:13:"JitFuPHP\Type":3:{s:7:"\000*\000type";i:2;s:10:"\000*\000subType";N;s:11:"\000*\000userType";s:0:"";}}}"
PHP Fatal error:  Call to a member function getReturn() on a non-object in
 
you sure no typos?
 
is the $signature->getReturn() call the issue or something in the getReturn method?
 
4:48 PM
look at the error
and look at the source code
 
@ircmaxell yeah, maybe you call somewhere else a method called getReturn() too.
 
the getReturn() call in $node->jitType = $signature->getReturn(); is raising the fatal
@bwoebi no, it's that line...
 
ok
also no sneaky invisible character?
 
no, I'll rewrite it just in case
 
printf "\n\nFOO\n\nFOO" | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n\nFOO/BAR\
\
FOO/g'
@bwoebi ^
 
4:50 PM
same
 
$this->worker->parseAst($node)->getReturn(); directly too?
@DaveRandom woot
 
dafuq OSX
 
lol
 
that will need epic comments because that looks stupid
 
Comment to add:
#if this looks stupid, ask Chris Wright
 
4:51 PM
> // OSX IS FUCKING SHIT
 
@bwoebi yeah, same error
 
Well, then there's internally a problem, not in your PHP code, definitely…
 
I can't make the $'lf' thing work on linux
 
WTF
 
4:53 PM
> "Test results indicate that the RF resonant cavity thruster design, which is unique as an electric propulsion device, is producing a force that is not attributable to any classical electromagnetic phenomenon and therefore is potentially demonstrating an interaction with the quantum vacuum virtual plasma."
www.wired.co.uk/news/archive/2014-07/31/nasa-validates-impossible-space-drive
 
@ircmaxell I suppose is_object($signature) yields false?
 
quantum vacuum virtual plasma FTW \o/
 
lord...
the fatal error is printed before the var_dump
 
ehh
 
F-YOU-UBUNTU
 
4:54 PM
why fuck you, ubuntu?
 
@ircmaxell is that why the . in front of the var_dump() output or is that not related at all?
 
@Jack part of a phpunit test suite, and I accidnetally copied a valid test
 
ah right
ohh, this is part of phpunit?
i wonder if it's specific to that then
 
likely some kind of output buffer in place
really annoying
 
@Jack help me with your regex thing please?
 
4:58 PM
anything is possible with phpunit
 
$uuid = $_GET['auth'];
preg_match('!\d+/([a-z0-9\-]*)_!i', $uuid, $m); Im not doing this right.
 
@RahulKhosla now it's my regex thing?
 
Idk you made your cool function, your like the owner of it.
Plus 98 ups isn't that bad.
 
My function has nothing to do with regex
 
Well then the thing you sent me?
preg_match('!\d+/([a-z0-9\-]*)_!i', $uuid, $m);
 
4:59 PM
That's an answer by someone else.
 
Oh.
My bad, can you still help with this?
I've almost finished my project :D:D:D:D:D
 
just preg_match('/^[\d-]{36}$/', $uuid) should do it.
 
@Jack Im getting Notice: Array to string conversion in /home/rahulkhosla123/public_html/asd/activate.php on line 7
$uuid = $_GET['auth'];
$loginStmt->execute([':verify' => preg_match('/^[\d-]{36}$/', $uuid)]);
Just out of curiosity, what was the $m in the example on that link?
 
5:15 PM
Nvm I fixed it, thanks.
 
@ircmaxell I'm surprised that you are using it for anythinfg
it has this annoying habit of breaking-with-updates
 
5:34 PM
@Jack How about ^[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12‌​}$
 
5:47 PM
make: sapi/phpdbg/phpdbg_rinit_hook.lo: Permission denied
hello, unix? I'm running make as root.
 
6:02 PM
I feel like /bin/sh is making jokes of me.
if (echo -n "$(PHP_GLOBAL_OBJS)" | grep -q 'phpdbg_rinit_hook'); then \
if ! grep -q 'phpdbg_webhelper' main/internal_functions.c; then ( \
cp main/internal_functions.c main/internal_functions.c.bak; \
cat main/internal_functions.c.bak | sed -e ':a' -e 'N' -e '$!ba' -e 's:\n\nstatic zend_module_entry:\
\#include "sapi/phpdbg/phpdbg_rinit_hook.h"\
\
static zend_module_entry:g' | sed -e ':a' -e 'N' -e '$!ba' -e 's:\n\n};:\
phpext_phpdbg_webhelper_ptr,\
\
};:g' > main/internal_functions.c \
) fi \
I'm doing something wrong. I always get an empty file…
 
Could be worse. Bash could be telling you you fsck
 
@tereško well...
 
6:18 PM
noooooo… The Makefile substitutes the $ sign and the whole sed expression goes fubar.
 
Fk sake
ragex is just stupid.
var_dump(preg_match('/^[\d-]{36}$/', $_GET['auth'])); giving me int(0)
 
@RahulKhosla Why bound \d with brackets
 
I thought thats how you do it?
 
\d is the same as [0-9]
 
6:26 PM
1 hour ago, by Jack
just preg_match('/^[\d-]{36}$/', $uuid) should do it.
@Machavity Im trying to sanitize a uuid 278468c3-e6f8-4e42-8d9e-68d31e17b62d
$_GET['auth'] = 278468c3-e6f8-4e42-8d9e-68d31e17b62d
 
Ah
 
@Machavity Any ideas?
 
Try /^[a-f0-9\-]{36}$/
 
@Machavity No it didn't work, I think it edited the uuid.
I just need to prevent sql attacks
By sanitizing it.
 
Oh. Considered prepared statements or real_escape_string?
 
6:33 PM
I was told not to ue real_escape
 
It's not perfect but escaping is fast and easy. Just hafta be aware of the pitfalls is all. Mainly involving character sets
 
Someone can drop my tables?
inject them etc?
 
not with escaping
 
html_specialcharicter could do the trick too?
 
6:38 PM
Oh nonono
I can only use PDO
I didn't realise it was mysql_*
 
@Machavity emm ... are you mental ?
 
@Machavity Im already doing that.
$uuid = preg_match('/^[a-f0-9\-]{36}/', $_GET['auth']);
$loginStmt = $db->prepare("UPDATE users SET activated = 1 WHERE verify = :verify");
$loginStmt->execute([':verify' => $uuid])
But having just $_GET is not safe enough
 
why the fuck would you choose to avoid prepared statements ?
 
Im not?
@tereško Im using them I think :S?
 
6:40 PM
@tereško Believe it or not, PDO does that exact same thing unless you change the configs
 
why wouldn't you disable the emulation of prepared statements ?
 
Ok im a bit confused. WHO ARE YOU TALKING TO :D?
 
user895378
@bwoebi I feel like it's one of those kind of things where if you're familiar with it it's great, but otherwise it just seems ridiculous. I've had lots of sadness from dealing with autoconf and makefiles
 
@rdlowrey agree. Totally.
 
user895378
I'm sure if I used it every day it would totally make sense.
 
6:44 PM
Sure. Just like PHPs quirks make sense to us, because we know why.
And… hooray! It finally works.
 
@Machavity Having a prepared stmt and having just :auth => $_GET['auth'] surely isn't secure enough is it???
 
@RahulKhosla Actually it is
 
$query = $this->db->prepare("SELECT tag FROM `user_tags` WHERE `user`= :id");
$query->bindValue(':id', $id);
try {
	$query -> execute();
	foreach ($query->fetchAll(PDO::FETCH_COLUMN, 0) as $row) {
		$this->user_tags[] = $row;
	}
}
 
	if (echo -n "$(PHP_GLOBAL_OBJS)" | grep -q 'phpdbg_rinit_hook'); then \
		if ! grep -q 'phpdbg_webhelper' main/internal_functions.c; then ( \
			nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \
			cp main/internal_functions.c main/internal_functions.c.bak; \
			cat main/internal_functions.c.bak \
				| sed -e ':a' -e 'N' -e '$$!ba' -e "s:\n\nstatic zend_module_entry:\#include \"sapi/phpdbg/phpdbg_rinit_hook.h\"\\$${nl}\\$${nl}static zend_module_entry:g" \
				| sed -e ':a' -e 'N' -e '$$!ba' -e "s:\n\n};:\\$${nl}	phpext_phpdbg_webhelper_ptr,\\$${nl}\\$${nl}};:g" \
^ This weirdness.
 
What would be the oci equivalent of the code I posted?
 
6:45 PM
@Machavity No one can inject stuff into my db?
 
and you're not using $uuid properly. preg_match returns a boolean
prepared statements are secure because of how they work. So, no
 
Oh great!
 
Well, not a true boolean. a truthy/falsey value you can use like a boolean
 
@Machavity $loginStmt->execute([':verify' => $_GET['auth']]); looks good?
 
Yes
 
6:48 PM
Ok thanks! I think my sites 100% secure now.
 
user895378
@bwoebi \o/
 
Anyone good at .htaccessing?
<Files "cron.php">
Order deny,allow
Allow from name.of.this.machine
Allow from 127.0.0.1
Deny from all
</Files>
This doesn't seem to be working for me for some reason?
 

« first day (1385 days earlier)      last day (3556 days later) »