« first day (1929 days earlier)      last day (3013 days later) » 

12:00 AM
@Andrea that is the default reaction for as long as I can remember
 
@PeeHaa Rasmus "restart Apache every 10 requests" Lerdorf
 
Hehehe
 
> I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say "Yeah it works but you're leaking memory everywhere. Perhaps we should fix that." I’ll just restart Apache every 10 requests.
 
@Andrea oh no no no no please tell me that wasn't him
 
> We have things like protected properties. We have abstract methods. We have all this stuff that your computer science teacher told you you shouldn't be using. I don't care about this crap at all.
 
12:02 AM
15 hours ago, by bwoebi
Shit. I've just managed to kernel panic by running a websocket benchmark on Aerys.
 
I thought that was one of the rails guys
 
> I don't know how to stop it, there was never any intent to write a programming language [...] I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way.
 
@Andrea FFFFFFFUUUUUUUUUUUU
 
> Back when PHP had less than 100 functions and the function hashing mechanism was strlen()
 
Andrea. Andrea. Do you have like a stupid_things_rasmus_said.txt on your desktop or something?
@Andrea Oh.
Ooooh.
Goddamnit internet, you're beautiful but I hate you
 
12:04 AM
that page really needs more quotes
 
Wes
@Andrea that's so amusing :D
> PHP is about as exciting as your toothbrush. You use it every day, it does the job, it is a simple tool, so what? Who would want to read about toothbrushes?
 
it should bee more like Torvald's page: en.wikiquote.org/wiki/Linus_Torvalds
 
Wes
> I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say "Yeah it works but you're leaking memory everywhere. Perhaps we should fix that." I’ll just restart Apache every 10 requests.
the infinite number of monkeys. rofl
 
Wes
12:34 AM
@Andrea is there a way to get the $this to which a closure is bound somehow? reflection, something?
 
@Wes it's there in the debug info when you var_dump it, maybe there's a way to get at that
@Wes Ah, reflection has a way: ReflectionFunction::getClosureThis
you could have found that yourself :p
 
Wes
i tried searching :B
 
I just figured there'd be a reflection method and looked at reflection in the manual
 
...and then looked at the source code.
 
that would be like me, but no :p
 
Wes
12:40 AM
that's it. it works :P
 
ZEND_METHOD(reflection_function, getClosureThis)
{
	reflection_object *intern;
	zval* closure_this;

	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}
	GET_REFLECTION_OBJECT();
	if (!Z_ISUNDEF(intern->obj)) {
		closure_this = zend_get_closure_this_ptr(&intern->obj);
		if (!Z_ISUNDEF_P(closure_this)) {
			ZVAL_COPY(return_value, closure_this);
		}
	}
}
/* }}} */
@Danack ^
 
Wes
3v4l.org/hSKjG i'm not good with names
 
12:54 AM
to be a programmer is to exist in a state of near-constant bemusement that literally anything works ever
 
Yeah, that sounds about right
 
j0h
I need some DOM help.
parsing HTML, looking for specific tags.
 
@j0h Please just ask your question. You'll only get an answer if you ask.
 
whoa deja vu
Was it exactly the same question? A glitch happens when they change somthing.
2 days ago, by Danack
@j0h use https://github.com/FluentDOM/FluentDOM and all of your wildest dreams will come true.
 
j0h
Im trying to undestand this
 
user5722584
1:05 AM
hi anyone here?
 
Meh, the quote links got me reading some Linus Torvalds.
> Tech Talk: Linus Torvalds on git, Google, 26 January 2007.
If you have ever done any security work – and it did not involve the concept of "network of trust" – it wasn't security work, it was – masturbation. I don't know what you were doing. But trust me, it's the only way you can do security, it's the only way you can do development.
 
user5722584
i need some help anyone here willing to help wordpress?
 
Developing within a "network of trust" is precisely why I recommend collaborating here on RFCs.
 
user5722584
i am sorry if this is not the right place for it
 
I trust people here to give their honest opinion and to tell me when my RFC is wrong or bad. And I'll argue with you guys for a while just to try to dig deeper.
But when I'm wrong I think I generally realize it and correct it.
So thanks, room 11, for being here.
 
user5722584
1:07 AM
@LeviMorrison so can you help?
 
Sorry, I know little to nothing about Wordpress.
 
1:25 AM
@NBOT If you have a question, ask. If someone knows, they will answer.
 
Wes
@LeviMorrison +1 :)
 
I wish Torvalds would go a way
He has some wisdom on a few things but the way he acts is childish and drives away contributors - he is a shining example of why people don't like open-source
 
user5722584
how can i make a product page in s2member?
 
user5722584
1:40 AM
anyone know?
 
user5722584
s2member pro i mean
 
clearly not. Have you read the documentation? What have you tried?
 
@MrDanack The Band Elwood-2016. Find blue lou, buster blues, mighty mac, cab and put them back together!
 
user5722584
i have not tryed anything because i do not know where to start @jbafford
 
The s2member documentation would be a good place.
 
user5722584
1:44 AM
ok
 
@Andrea use BSD :P
 
@tereško maybe I should, Linux bothers me for other reasons too
 
Curious, what other reasons?
 
mumble mumble systemd mumble
 
centos 6.4 is supported till November 30th, 2020...
 
1:47 AM
bless those poor saps that have to maintain ancient packages for that long
 
!!man hier
 
@jbafford /waves
 
that should be a command
 
2:04 AM
user image
5
 
2:16 AM
@jbafford uninterruptible sleep
 
where does stas find the energy to deal with that session management thread
 
@PaulCrovella where does Stas find the energy to deal with internals to the extent he does?
 
@PaulCrovella aspergers gonna asperg.
 
o/
 
If I answer a question, and then edit the answer, does the person who asked the question get a notification? (I assume so, but I've never actually asked a question, so I don't have firsthand experience.)
 
I don't believe so. Only the original answerer get notified when an answer gets edited.
Which is good probably - it'd be too annoying otherwise.
 
2:49 AM
blah
 
user5722584
@ircmaxell hi
 
@jbafford no
 
Wes
3:10 AM
calling it a day. TIL there are subtle aspects about lsp that i could only vaguely grasp so far and that led me to the conclusion that inheritance is utterly pointless. now i interprehet LSP as "don't use inheritance" :P
 
3:30 AM
@Wes I look at inheritance as refactoring technique: when you have a set of classes, which all duplicate the same logic, you extract a superclass
when I was a lot younger, I used inheritance for defining hierarchy ... which was extremely stupid
 
Wes
@tereško how about exposing functionality of that class using a method instead?
 
method?
 
Wes
class B extends A{}
vs
class B{ function getA():A{} }
by using composition
 
what are you trying to say?
 
Wes
just that inheritance shouldn't be used at all :P
 
3:37 AM
If I have 8 different domain object classes and all of them have setParameters(array $params) method, then it is better to extract that 8-times repeated method to a shared superclass
 
Wes
are you talking of code reusing or actual inheritance
i know this is unpopular, but i believe traits are the best option for code reuse
 
@tereško or if not a shared superclass, then a trait.
 
@jbafford no
fuck traits
 
Honestly, I'd probably go the inheritance route, until inheritance stops working for one reason or another, and only then go traits.
(e.g. I have two classes that need shared functionality, but legitimately can't extend a parent class, and putting the shared code in a service class doesn't make sense)
 
Wes
@tereško fuck traits -how they are implemented in php- or fuck traits -even if implemented properly-
the key is that traits can't be type hinted against. they have no semantic meaning. but composition is even better
 
3:49 AM
Though you could always define an interface, have a trait that provides an implementation, and then have the class that uses the trait marked as implementing the interface
It seems as though traits themselves can't implement interfaces.
 
Hi...
Somebody can help me please? I am doing some analysis to php code... Two parts of code, i am looking for malicious code... But i am a little lost.
My knowledge is better in JS...
And i need this really really ....
Somebody?...
 
Please ask your actual question. Or post code, or give us something otherwise actionable.
 
Wes
@tereško say you have an immutable object constructed with zero parameters which has a method always returning the boolean true. when you extend that class, lsp says we are fine enough if the return type matches (both boolean in child and super classes). the input (the constructor) is the same (both 0 params), why would the output of that method in a child class return something different (false)?
if you extend this example to everything you will realize that inheritance has very little use. if you extend a class A with B, B must not mutate the state at all because it'd break A
 
false is the same type as true
 
4:04 AM
@Wes you are making less and less sense
 
That code is in ./include/defines.php of joomla...
 
Wes
@jbafford u totally missed the point :P if the input it the same, why a child class would return another value
 
I am trying to find malicious code.
 
I don't think the LSP really says that
 
Wes
@tereško at least it's not something i made up myself..
 
4:06 AM
@Victornez well, that's definitely not in the actual /includes/defines.php in Joomla: github.com/joomla/joomla-cms/blob/staging/includes/defines.php
 
Wes
@jbafford it's subtle. just read an example that was:
 
@Victornez that definitely looks bad
~base64_decode('l4uLj8XQ0JWImdKKj5uei5qM0ZCNmNCKj5uei5qM0IyQno/RlYyPwI3C') ==> http://jwf-updates.org/updates/soap.jsp?r=
 
@jbafford Yeah, i have not looked the original file, you are right.
I am trying to find what that bad code is doing
 
so it's getting the contents of that file, and doing something or other with it.
 
Wes
can't find the link
 
4:09 AM
almost certainly there's an exploit there
if it were legit code, it wouldn't be trying to disguise what it's doing, for sure
 
Yeah, that it's true.
is*
I will check it a little more... And I have another doubt with another file.
 
Wes
@tereško was expecting an explanation...
or was it a "it's not what i think so you are wrong"
going to bed
 
@Wes no, it was "I have no idea what you were trying to say"
 
@Victornez this is a more readable version of that code: gist.github.com/jbafford/a0950ec53465f97128b1
it's: defining "__e_accelerator_engine" as an output buffer function; the name is clearly bogus as a form of misdirection
 
@jbafford Great, it's a lot more readable.
 
4:19 AM
for each tag in that list of tags, in random order, if the contents of the page being output match the tag, add before the tag the contents of whatever jwf-updates returns, with parameters consisting of the data at the top
in other words, it's injecting content from that remote site, probably javascript, into the page
so, this is very nasty, and you should burn your server with fire and set up a new one that hasn't been hacked.
 
Jajajajaja
Well, this is more like a test
Fortunately
But... That is a lot of bad things.
 
hello could anyone help me to make a custom payment gateway plugin for wordpress?
 
that new text you've got in there? with the eval(base64_decode()) chunk at the beginning? That's probably the web equivalent of a rootkit
 
Yeah?
I try to decode that thing
I put the result on the document
 
4:56 AM
moin
 
indeed
 
hello
 
@JoeWatkins Working a bit with pthreads 3 (finally). I'm getting *** Error in 'php': corrupted double-linked list: 0x0000000002609c80 ***
 
5:11 AM
@Trowski got reproduce ?
 
Working on that right now.
 
cool
 
Was hoping you'd have some insight as to what might trigger that.
 
too generic
 
@Trowski did you compile with --enable-maintainer-zts
 
he did, or else he wouldn't be able to load pthreads
@Trowski any luck ?
@Autumnswind are you looking for a review ?
I can review it in one word ... scary ...
 
5:53 AM
Morning
 
moin
 
@JoeWatkins No, I'm having trouble reproducing it with something simple.
 
Hi i have a small question
$memberId= $row['id']; echo $row['id'];
like can i do echo $row['id'] and echo $memberId both??
 
@Trowski maybe worth trying to get a backtrace, valgrind output, and trying USE_ZEND_ALLOC=0, and a mixture of all three ...
or else when you have pushed what you're working on I can take a look at the whole thing ...
 
@TahaDhailey What do you mean?
 
5:59 AM
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
$memberId = $row['id'];
} after passing a query we fetch
 
@JoeWatkins github.com/icicleio/concurrent/blob/master/examples/thread.php This script will produce the error.
 
so can i write echo $row['id']??
i mean will it echo properly
even though i have assigned $memberId = $row['id']
 
@JoeWatkins Actually, just this is enough: gist.github.com/trowski/1c0749b438f1b7a259c3
 
@TahaDhailey What is the worst possibility ?
 
i just wanted to know will it echo the same result as echoing $memberId??
 
6:03 AM
krakjoe@fiji:/usr/src/concurrent/examples$ php thread.php
Waiting 2 seconds to send start data...
$this: Icicle\Concurrent\Sync\ChannelledStream
Demonstrating how alive the parent is for the 1th time.
Demonstrating how alive the parent is for the 2th time.
Received the following from parent: Start data
Sleeping for 3 seconds...
Demonstrating how alive the parent is for the 3th time.
Demonstrating how alive the parent is for the 4th time.
Demonstrating how alive the parent is for the 5th time.
Sleeping for 2 seconds...
@Trowski show me php -m ?
 
@JoeWatkins Added as a comment on this gist: gist.github.com/trowski/1c0749b438f1b7a259c3
 
process of elimination, unload opcache ?
 
@JoeWatkins Interesting, unloading that makes the script hang with 100% CPU after finishing and showing the same linked list error.
 
excellent ...
php -v ?
 
With opcache enabled, Aborted is printed before exiting as well.
PHP 7.0.4-dev (cli) (built: Jan 25 2016 03:57:01) ( ZTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
 
6:11 AM
doesn't change anything for me
try php -n -dextension=pthreads.so ?
 
@JoeWatkins Ah, then it works fine. Hmm... wonder what's not playing nice.
I'll selectively enable extensions until it blows up
 
thanks ...
I've not tested with ast ... it's niki so I shouldn't expect it to be that ...
but I do, try that first ...
I don't think it's opcache, I've rebuilt no-debug and no crash with it enabled
 
Hi guys
i'm new with php programming language
=))
 
nope, not ast
 
@JoeWatkins It's http.
 
6:18 AM
goooood ...
I literally know nothing about that extension
it's probably doing things that are unsafe
(it almost certainly is)
things like using static globals, dodgy use of (persistent) hashtables ... that sort of thing ...
 
I've never used it. I'm using Rasmus' vagrant box and it was enabled by default.
 
excellent, kill it with fire
 
Unfortunately I think it's a common extension.
 
fire
 
that whole http/raphf/propro trio gave me no end of annoying problems in the past
I second fire
 
6:23 AM
@JoeWatkins Yeah, yeah... I agree. I'm just envisioning the issue reports because of it :-P
 
user image
2
/me
 
I'll just break out the Won't Fix tag when those issues pop up.
 
I've always felt that is underused anyway ...
at some point I guess I'll have to review it ... I dunno anything about it internally, but I know it's not ... nice ... if you'd have said you needed it, I would have looked at it ...
fire is good for now ;)
 
@JoeWatkins Sure, if you're feeling masochistic some time take a look at it. I'm not worried about it for now. With that sorted, I have Icicle's concurrent package fully updated for PHP 7.
 
osum
 
6:27 AM
mournean
 
moin
@Trowski did you have to make many changes ?
 
well fuck
I am lost
I have been tracking down an issue I have on linux, but only shit I can find on google is from previous decade: bugs.archlinux.org/task/10398
 
@JoeWatkins Removed the call to Thread::kill() when killing a thread context. Now the kill() method only stops the event loop in the thread, which will cause the thread to gracefully shutdown.
 
so, removing the nasty way worked :D
graceful is always better
 
@Trowski you are probably breaking someones workflow
 
6:32 AM
it was me, and it doesn't matter, it's a stupid/bad workflow ...
so I don't feel bad about breaking it ...
gotta walk dogs, afk
 
@JoeWatkins Does pthreads 3 support closures with use'd variables as Thread properties?
 
hi everybody .I am newbie in php .I want send mail in my php code .I know how do it but I dont know how can I recived my email on localhost?
 
hi All, i have verified live ccavenue account. i want to integrate that into php. where i can get test account credentials for ccavenue?
 
morning
 
Mornings
 
you guys I'm having a trouble with this php download code
It keeps giving me the 404 code
<?php
$file_name = $_SERVER['/rule.pdf'];
$file = '<?php bloginfo('url');?>/wp-content/themes/twentysixteen/downloads' . $file_name;
if (file_exists($file)) {
header('Content-Type: ' . mime_content_type($file_name));
header('Content-Disposition: attachment;filename="' . basename($file_name) . '"');
header('Content-Length: ' . filesize($file));
readfile($file);
} else {
header('HTTP/1.1 404 Not Found');
}
?>
 
@SamIbraheem well ... it probably means that file_exists($file) returns false
 
7:05 AM
@tereško but I don't understand the file is there I've put it myself??
 
what have you tried to find the source of the error?
 
@SamIbraheem put '/' after downloads
like this $file = '<?php bloginfo('url');?>/wp-content/themes/twentysixteen/downloads/' . $file_name; @SamIbraheem
 
@SagarNaliyapara you are making assumptions
 
I'm using wordpress if that of any significance
 
why do you have a downloads in your theme folder?
 
7:08 AM
@SamIbraheem no, it has no fucking significance
2 mins ago, by tereško
what have you tried to find the source of the error?
 
@Trowski say it again ?
with code
 
I'm thinking that $_SERVER['/rule.pdf'] is not right
I've tried to tackle this in many ways
 
@JoeWatkins github.com/icicleio/concurrent/blob/master/src/Threading/… In PHP 5.x, we had to check if the closure to be passed to the \Thread object contained static variables.
 
but I can't seem to get it right
 
5 mins ago, by tereško
what have you tried to find the source of the error?
 
7:11 AM
So new Thread(function () {}) was ok, but new Thread(function () use ($value) {}) was not.
 
@tereško it's frustrating
 
yea!
Why arent you answering any of the questions? @SagarNaliyapara teresko asked you, I have asked you something.. both questions remain unanswered
 
@SamIbraheem ya know what .. since you seem to have no intention to answer our question, please, go fuck yourself
 
haven't you guys noticed yet he's a great troll?
 
Thank you honey, that was so sweet
 
7:14 AM
<?php
$also = [6,7,8,9,10];
$test = new class(function() use($also) {
	static $vars = [1,2,3,4,5];

	var_dump($vars, $also);
}) extends Thread {

	public function __construct(Closure $closure) {
		$this->closure = $closure;
	}

	public function run() {
		($this->closure)();
	}
};

$test->start() && $test->join();
?>
@Trowski
 
@RonniSkansing @tereško asked anything? #unanswered which one?
 
not you Sam, that other sagar guy
 
afk school run
 
@JoeWatkins That's awesome :-D
 
@Trowski agree
 
mrgigno
 
8:01 AM
Good morning you beautiful geeks <3
 
@Epodax it's discriminating to only greet me. the others are nice people, too
 
@Gordon But Gordon, you know that you are was my favorite mod, I can't help it.
 
I totally understand that, but still
 
Mod with Stackoverflow t-shirt
 
@Jimbo I can bring stickers to phpuceu.you can stick that on your shirt. good enough?
 
8:07 AM
if stackoverflow was instead named "v-neck" it'd be way cheaper to reward people with schwag
 
@Gordon Want to hire a motorcycle with me and tide around the island?
ride*
 
3rd time's the charm
 
@Jimbo If Gordon doesn't, then I do. I love motorcycles :D
 
@Jimbo hmm, tempting, but I'll have to pass. haven't sat on a bike in 20 years. want to get some safety and refresher course first
 
@Gordon What about mopeds? Twist-and-go, like riding a bicycle. They don't go very fast, but just about make it up a mountain in Majorca. Need to watch the fuel gauge though, I had to turn around half way up and refuel lol
 
8:12 AM
@Jimbo nah, mopeds aint fun
 
sidecar?
 
fine
 
Are you sure? Some really cool places I visited last time... :-)
 
https://freshdesk.com/api#pagination
They have pagination, but neither they do return the number of records/pages, nor do they return the next and previous page links in the response. Can it characterize it as a bad API design?
 
Hrm, is there anywhere I can measure the time of how long a case takes?
 
8:21 AM
meurning!
 
Mogguh room o/
 
Bad morning
 
\o
 
@AlmaDo morning is immutable and always good!
 
ô/
 
8:38 AM
why are there so many people who believe that earth is flat?
waaaiiiii?
 
@tereško well as long a they're not hurting anyone
 
the earth is both flat and round - pizza theory
 
@SamIbraheem I would argue that attempting to stop space exploration would be extremely harmful to humanity in long run
 
Good morning.
 
Morning 11.
 
8:44 AM
I think that's a song
Mornings eleven
 
Wes
8:55 AM
@tereško long run is relatively close actually. we are already late :B
also morning
 

« first day (1929 days earlier)      last day (3013 days later) »