« first day (2253 days earlier)      last day (2921 days later) » 

00:19
@kelunik @bwoebi LazyPromise or just Lazy?
@Trowski The former (it implements Promise?)
Or something else entirely…
So does Failure, but it's not called FailedPromise.
But Lazy itself is somewhat not selfdescribing
Right… I don't like it either.
Maybe this is why I went with a function.
Amp\lazy is fine
(though I still haven't seen an real world use case for this)
00:23
I think it makes more sense to be another object like Pause.
well, if it's public API, i.e. Amp\Lazy, then that name is fine too
Ok, I'll go with that for now.
00:40
Bobs-iMac:upx bob$ php -r 'class a { function x($a = null) {} } class b extends a { function x() {} }'
Bobs-iMac:upx bob$ php -r 'abstract class a { abstract function x($a = null); } class b extends a { function x() {} }'

Fatal error: Declaration of b::x() must be compatible with a::x($a = NULL) in Command line code on line 1
Wtf does the latter error?!??!?
@Danack "I wonder if that application is using converting the values to hex, and then decoding it inside SQL as primitive form of parameter binding/protection against SQL injection attacks" That's exactly what i'm trying to do. It works for strings, but as you can see it doesn't work for INTs. Any help?
@bwoebi Wow… suppose that wouldn't be considered a simple bug fix though…
@Trowski I'm not sure.
@bwoebi There's no reason the abstract class should enforce something a regular parent doesn't…
Just commit it :-D
hehe
!!remind Just commit it in 40 hours
00:48
Reminder set.
!!reminder list
Registered reminders are:
• @⁠DaveRandom http://chat.stackoverflow.com/transcript/message/33706606#33706606 → Id: :33706826 → Saturday, 29th April 2017 12:01 (UTC) - Set by Gordon - Seconds left: 11617919
• finish cleanup of http://php.net/manual/en/function.session-start.php → Id: :34521502 → Monday, 09th January 2017 22:32 (UTC) - Set by PeeHaa - Seconds left: 2151793
• http://meta.stackoverflow.com/questions/338573/sensitive-info-disclosure?cb=1 → Id: :34608864 → Wednesday, 28th December 2016 09:45 (UTC) - Set by PeeHaa - Seconds left: 1069014
@Trowski [busy with something else currently]
 
2 hours later…
02:37
Hello guys... does anyone know what this code is supposed to do and why it is failing?
ini_set('session.serialize_handler', 'php_binary');
session_start();
$sess = "\x1xi:1;\x2y";
session_decode($sess);
(the output is the following: "PHP Warning: session_decode(): Failed to decode session object. Session has been destroyed in index.php on line 5")
It error PHP Warning: session_decode(): Failed to decode session object.
@VănTuấnPhạm Yes, what does it mean? This is in the context of a proof of concept for an old vulnerability
But I'm not sure whether I didn't compile PHP correctly or this is the expected output. For the record, I'm not a PHP programmer, so that explains a lot.
03:04
php can't understand variable $sess = "\x1xi:1;\x2y" because it contains special characters; you try change it to $sess = '\x1xi:1;\x2y';
or change it to a different value
Oh... did you just change double quotation mark by single quotation mark?
you changed?
uhm... what is the difference between the first $sess that you wrote there and the second one?
03:19
double quotation mark can get value of variable,single quotation mark can't get value of variable.it show name of variable.
$a = 10;
echo "$a" => 10
echo '$a' => $a
Oh, okay... but are you that is the cause of the error? I replaced the value and used the single quotation mark and the output is the same.
For some reason, other examples don't use "ini_set('session.serialize_handler', 'php_binary'); "
uhm.you can remove it and check
Then I get an empty array.
mronins
@RobertSmith is line 5 the line of session_decode?
@FélixGagnon-Grenier Correct
Wes
Wes
03:30
mornings
yeah. I don't have links nearby, but I think I've read a few articles about how unserialize can be dangerous when used with unsanitized data. session_decode expects to received a serialized string. "\x1xi:1;\x2y" could be some malicious string. the error message also reveals something: the function should return true on success, or false on failure, not destroy the session
free on delete, or free on write, something like that, iirc
@Wes o/
@FélixGagnon-Grenier I think that is exactly right.
However, I'm not sure about why even the latest PHP release behaves that way (showing the message "Session has been destroyed")
indeed, you'd think someone would have fixed it.
let me a few minutes, I'll try that over here
Excellent. By the way, the vulnerability is the following: bugs.php.net/bug.php?id=72562
@RobertSmith well, it still behaves that way because that code specifically defines the session decode handler
ini_set('session.serialize_handler', 'php_binary');
there seem to be come details on php_binary here but it seems it does not differ much from the default serialize handler
Wes
Wes
03:43
!!friday
@FélixGagnon-Grenier Right, that is why when you remove ini_set, I don't get the error.
Wes
Wes
rick roll doesn't work to me. i enjoy watching it every time. my kind of music
@RobertSmith yeah. I wonder what the string actually means
03:45
But what does it do when you don't use ini_set? Because I think that session_decode($data) sets the serialized data to the $_SESSION variable (please, correct me if I'm wrong)
@Wes it's not Friday yet.
it will instead use the default serialize handler
guess what
@Tiffany @Jeeves says it is.
@FélixGagnon-Grenier Who is the creator? Kony?
03:46
@Jeeves I am
@FélixGagnon-Grenier So you are an affiliate of Ask Jeeves?
@Jeeves I'd even say principal investor
@FélixGagnon-Grenier Then say the joke.
After that, I thought I would be able to print $_SESSION, but then $_SESSION prints an empty array.
03:47
I got vagrant running with putty...now I'm trying to install nginx on the fucker
Wes
Wes
you are still working?
@Jeeves with my huge investment of 0.0000000000000000000000001. close enough
@FélixGagnon-Grenier Oh I see. What kinds of companies?
@FélixGagnon-Grenier Do you ever dream of doing something else?
Something like this:
<?php

session_start();
$sess = "\x1xi:1;\x2y";
session_decode($sess);
print_r($_SESSION);
?>
@RobertSmith yep, that would be sane
try var_dump(session_decode($sess));
that would probably return false
03:48
But then $_SESSION is being filtered or why do I get an empty array.
!!3v4l session_start();
$sess = "\x1xi:1;\x2y";
session_decode($sess);
print_r($_SESSION);
Okay, let me try.
does anyone know do phone application cache raw passwords or password hashes?
what kind of phone application?
I wish @Danack was around
03:49
like facebook
shit. everything I've said turned out false
var_dump(session_decode($sess)); outputs bool(true) !
var_dump(session_decode($sess)); returns true
yeah :P
let's take a step back though. are you just trying to understand what is going on internally? do you have an actual problem you are trying to solve?
Yes, I'm trying to understand that proof of concept but as you can see, I was receiving that error very early in the code.
As I said, this is the vulnerability: bugs.php.net/bug.php?id=72562
By the way, the idea was to try to reproduce the issue in an old PHP installation.
nvm
I'm speaking without thinking right now
03:55
Well, I checked that part of the code which is contained in session.c inside the ext folder and confirmed that the fix is not applied.
Actually, you made a very good point. I'm not sure what I'm supposed to get. A segmentation fault? An handled exception? Not really sure.
I'm going to get something to eat. I will be back in 5 or 10 minutes.
see you soon!
04:13
morning
I'm back
04:30
Hi to all I want to create chess Game any one tell me how to do that ?
04:41
@Gautam You love laravel?
04:53
@FélixGagnon-Grenier I'm noticing that many POC begin using ini_set("session.serialize_handler", "php_binary"); Are you sure this is not supposed to be already enabled in PHP installations?
"session.serialize_handler defines the name of the handler which is used to serialize/deserialize data. PHP serialize format (name php_serialize), PHP internal formats (name php and php_binary) and WDDX are supported (name wddx)"
@littlepootis its my favourite.
I think I misunderstood. php_binary is certainly an internal option. igbinary is an extension and as you said, php_binary and php are mostly the same. The question is then why am I getting an error when using php_binary.
By the way, this works:

<?php
ini_set('session.serialize_handler', 'php_binary');
session_start();
$_SESSION['value'] = 1;
$data = session_encode();
session_decode($data);
print_r($_SESSION);
?>
05:15
morning
o/
05:38
morning
where is everybody ??
!!friday
Hellow all
Good Morning
Do anyone have idea about jenkins?
I am so confused
!!friday
var socket = io.connect( 'http://localhost:8080' );
If I use chat.php, which port should I make it listen on node js ?
05:49
Is, or is not, Jeeves a bot?
Because I've seen Jeeves do some very human-like things
hello everyone
morning
any one know how to convert .st file into .m3u8
its very urgent
how is it related to php
05:51
i want it in php
I know you've probably googled, and I don't know a solution, but here is a link I found
@rawatHemant
0
Q: How to create dynamic m3u8 by pasting the URL in browser?

user1788736I want to create a dynamic m3u8 when a PHP script is called. I don't want to save the result m3u8 on server, instead I want to push it to browser so it is downloadable. Could anyone show me how I can achieve this task? Example of PHP script to be called: http://www.asite.com/makeM3u8.php?videoI...

I.m working with live streaming videos so client have some .st file and he want to convert these file into m3u8
It is more specific than the information you provided but it does go over converting .st to .m3u8 using PHP
hi everybody
05:58
@Alesana, link you provided not working for me
can I encode procedures of mysql?
is there any way for encodeing mysql procedures same code encodeing in php?
mornin Joe
06:01
o/
@rawatHemant It's not?
25407474 is the question ID, so.. stackoverflow.com/questions/25407474 should bring you there
ok
that the same as previous link
its not working
any other please
That's weird
working for me.
Yeah very odd
I put it into a pastebin just so you can check it out
Commented out all the parts that weren't code
06:19
Be careful with that type of code. Make sure that $origin, $basedir, $res is not set by the user.
you are doing it wrong ...
what happens if 1000 people come at once, can your hardware convert 1000 videos at a time ?
queue your requests?
of course, it can't ...
yes
yap
I have to go another way.
06:33
Now what I am wondering is how the online video converters work
ffmpeg worked for me?
they dispatch jobs to a distributed queue .... the part of the website that converts the videos is a separate service, with different scaling requirements, different hardware requirements ....
you don't just convert videos right there in the page ... you don't do anything that creates a new process if you want the front end of the web server to scale as the webserver was designed to scale ... by creating new processes within requests, you are destroying the ability of the webserver to function as intended ...
it cannot work at scale .. can't ...
Hmm but what I mean in general is the converting is quite rapid, and to be able to handle that much at once it must be quite expensive, and a lot of these services have very few advertisements
I don't see how they make more money per conversion than it costs them
I have no idea how business works
I am into internet marketing so these things pick my curiosity
06:36
?
Obviously, they are making money, I just don't know how :P
but they do it on dedicated hardware, using specially designed infrastructure to cope with the load ... it is extreme load compared to serving up a website ...
I can imagine!
I'm not sure if ffmpeg is really fast. It looks kind of slow to me (converting mp4 movies, at least)
the speed of the thing is not really determined by ffmpeg but by the input and output codec and the algos they use ...
ffmpeg is only a vehicle for the codecs to get around in, it doesn't do anything fancy of it's own really ...
06:40
Sure, but I haven't seen ffmpeg working quickly ever and I'm not trying to convert HD.
conversion is complicated, but it can be that it's not always fastest to convert A to B, it can be the case that it's faster to convert A to C and then C to B ... just because of the way the converters are written ...
I have a way off topic question. How did most of you learn PHP? I have been learning for a couple years just coding myself with different projects I come up with, but I feel as if I am not learning at a rate that is as fast as I would like it to be
experimentation will help ...
I never set out to learn PHP ...
With learning or ffmpeg
Ahh ok
with ffmpeg, experimentation will help ...
06:42
I never did either but now I am thinking maybe I should
what you want to focus on with regard to learning is learning about programming in general ...
I think so. Honestly, when I dare to change something, the results are not great. I have limited experience, though.
books are the best thing humans ever invented ...
Books on programming in general?
in general, but we're talking about programming right now ... books are better than trying to learn off the internet for everything, but especially for programming ...
the internet is not subject to any discipline ... authors of real books are, so are publishers of those books ...
06:45
Interesting, I thought it would have been the opposite
the internet is good for extended learning, obviously, but you need to be educated to a level where you have internal criteria to choose what is a good source of information and what is not ...
Such as, a book is one person's thoughts, and if I see something on StackOverflow for example it has many different people rating things
"I am not learning at a rate that is as fast as I would like it to be" ... wouldn't you say the same about pretty much any other thing?
@RobertSmith Very good point! I guess what I should have said is that I am not learning a a rate that I feel is acceptable
you are making the mistake of equating popularity with correctness ... if 1000 people upvote the answer to a question, does that make it the correct answer ?
06:48
That is also very subjective. Fulfilling what you deem acceptable based on your aspirations is always going to be tough.
@JoeWatkins For me, I would have assumed that the answer is yes
argumentum ad populum is logically fallacious ...
I'm not saying the internet is no good, I'm saying you have to develop your knowledge to a point where you have a criteria to choose the good stuff and disregard (or even respond to) the bad stuff ...
@RobertSmith My aspirations and what I deem acceptable are definitely two different things.
Well, I was talking about short term aspirations. Those should be similar to your aspirations.
books do that ... not because they are all correct, but because they are disciplined, they are subject to peer review, and review, before they are published ...
06:51
Otherwise, you're going to get frustrated easily.
@JoeWatkins I can see that I guess I just didn't expect books to have more accurate information. It make sense though, do you have any good books that you could suggest to me?
@JoeWatkins i have never worked on such things but any ideas how to start with it, means like this scaling,having good architecture for website.
(I meant to say: Those should be similar to what you deem acceptable)
it's not about accuracy really, it's just about discipline ...
@RobertSmith Are you saying that you will get frustrated if your short term aspirations are above what is acceptable, or the other way around?
06:55
the kind of books I would suggest would scare you away if you are just starting out, so I'll refrain from doing that ... what I suggest is going to your local book store, it doesn't matter what the title is, or subject, or language used for examples ...
if it can be generally applicable to programming, then stand there and read the first ten pages before deciding if you will buy it ...
Is two years of experience what you mean by just starting out?
i will not be scared :) Joe
I mean in particular just starting out with reading proper books ...
Ahh I see
Wes
Wes
mornings 2
06:56
Well, let me schedule an email to myself with some titles for the future
start anywhere, basically ... so long as you finish here
yes, if your short term aspirations are way above what you deem acceptable. Because when you don't fulfill your aspiration, you're going to thing you failed.
yo wes
@Linus the answer is too complicated, each language and even platform within a language scales differently, there's no book for that ...
I guess as far as short term aspirations that would make sense. My short term aspiration is to finish this script so I can get it on the market, and that is exactly what I deem as acceptable haha
well there may well be good books on scaling a particular thing ...
selling software doesn't really work unless you have the resources to market it ...
07:01
Joe just in general how things work etc...
That I do have
@JoeWatkins I have bookmarked the page so I make sure it is a book I read.
I was an internet marketer before I was interested in programming
well we know in general what it takes for anything to work at scale, we know that it's about using as few threads (or cycles, or processes, or whatever measure you choose) as possible to produce the maximum throughput, but the details of that are expressed in formula that change by language and platform
That sounds about right!
hi
i have question
can some body help me?
Wes
Wes
what the actual wall
07:07
2 messages moved to Trash can
@Wes I like that expression
@AwaisAhmad read the room topic, and put code in pastebin/gist or anywhere other than all up in my face ...
Wes
Wes
ahaha
what i am trying to is http://mdbootstrap.com/javascript/carousel/ multi item card i have to print multi item cards according to the records.I have to print 6 cards in each row.What i m trying to do is print first 6 cards if records are 6 or less than 6.else print 6 cards in each row @user6838959 .have a look at multi item cards at this link you may understand my question
Do you think maybe it would be better suited for a Javascript room?
07:11
no because i m first trying through php.Then i will add html or javascript in it
Hmm as much as I would like to help I don't think I can
Anyways, I am going to bed everyone.
Wes
Wes
@pinepain it's just that libxml sucks, so i thought an headless browser or something would be better for dom handling
@AwaisAhmad Why don't you use your server as a REST API that sends JSON and your javascript library consumes that data to produce the layout you want?
Wes
Wes
07:28
wording help please english folks:
"When thrown, the state previous to the call is guaranteed to be kept."
that doesn't sound right to me :\
07:45
previous state
Wes
Wes
or "the state preceding", right?
yeah preceding the call. w\out to
Wes
Wes
yeah without to. that sounds right :B thank you very much
anyone have idea about NBA live streaming API
Anonymous
08:25
mohoi
mooorning
!!friday \O/
@Jeeves you're too kind!
@Naruto Thanks.
morenmtoings
Anonymous
08:34
mornin piehee
Wes
Wes
buongiorno \o
Anonymous
\o
08:50
o/
seems I'm a little late to the greetings
@Gordon I should totally make an Android homescreen widget.
@kelunik do it!
08:59
@kelunik lol nice one

« first day (2253 days earlier)      last day (2921 days later) »