« first day (3736 days earlier)      last day (1203 days later) » 

12:07 AM
@samayo pretty good, busy with work, how are you?
 
Wes
12:35 AM
been programming with var_dump lately, as using the debugger causes the whole thing to break due to timeouts
and damn it's horrible
so badly indented, so hard to read. print_r being even worse with null false and empty strings impossible to distinguish
 
@Wes Yw.
 
Wes
need something that works with just text. will roll my own soon probably
 
That symfony component is great regarding readability. In case xdebug is not an option.
And what exactly went wrong with xdebug?
 
Wes
i have a websocket connection that timeouts almost immediately and i haven't find a way to remove the timeout yet
so like i hit a breakpoint, spend 30 seconds reading, resume execution, websocket is gone
 
12:51 AM
Didn't work with websockets much. One answer on SO says debugging websocket app should behave similar to any other app. Have you checked other possible reasons for timeout?
Also, check if xdebug.log is set, maybe there is something useful.
 
@Wes would be useful to know which end is closing the connection and at what point, get a wireshark capture
the websocket protocol has a built in ping/pong mechanism but I'm not sure how much it is used in browsers in practice
 
Wes
it's the server. remember the issue i had just a few days ago?
 
no :-P
 
Wes
i have to keep sending useless messages because if i go idle for too long it dies
 
I don't remember much though
the server closes the connection?
 
Wes
1:00 AM
Nov 23 '20 at 0:08, by DaveRandom
heartbeat
to be fair, it was 1 month ago :P
 
> a few days
:-P
 
With NYE in between. :D
 
so have you established whether the client or the server is closing teh connection then, to be clear?
and do you have control of both ends?
 
Wes
i run the server but i didn't code it
there's probably a way to set the timeout but couldn't find it yet
 
@Wes that's what I have to deal with, I can't use a debugger either :/
server kills connection
 
Wes
1:05 AM
$ka = Loop::repeat(1000, function(){
    // keeps connection alive... @TODO find a better solution
    $this->_connection->send('{"id": 0, "method" : "getPoo"}');
});
i mean i should think of a funnier method name at this point
getAnswerToTheUltimateQuestionOfLifeTheUniverseAndEverything
 
Wes
yes
 
1:22 AM
@Wes And you are certain it works well but connection fails on server side?
 
@Wes wuu2 and response is nmwbu
 
Good night.
 
 
2 hours later…
3:09 AM
So.......... should I start a discussion about not opening voting on RFCs when a significant number of voters are in countries that are undergoing a coup? Cos' it kind of feels like I should start a discussion about not opening voting on RFCs when a significant number o voters are in countries that are undergoing a coup.
 
is there really that many PHP account holders in the US?
 
@Tiffany more the principle of the thing, than the current stuff under vote/potential voters.
 
fair enough
 
like when Britain + france go to war over shellfish in the Channel 7 months time, that would be quite a few voters who might not be able to give enough attention to things.
 
3:28 AM
That's a joke of course. We'll be petitioning to have better access to European markets by then........but the point stands.
 
3:46 AM
Is there a type for a curl resource?
I know it's basically resource but that's not an actual type, or more specifically, it can't be used as a parameter type
 
4:45 AM
As of 8.0, it's an object of type `CurlHandle`. Prior to 8.0, it's a resource of type "curl".

So: if (($x instanceof \CurlHandle) || (is_resource($x) && (get_resource_type($x) === 'curl'))) { ... }
But for the sake of a parameter type, if you want to support pre-8.0, then..... no. There's not a hintable type for a curl handle.
 
5:25 AM
Darn :(
On 7.3 currently, almost refactored for 7.4... hopefully we'll be switched sometime before summer
Hopefully before that...
Probably won't be on 8 until either late this year or early next year
 
5:51 AM
@Danack referring to a future "Britain" makes it sound like the Scotts and the Irish aren't 10 seconds away from leaving to rejoin the EU.
 
6:34 AM
Good morning! I am noticing a strange error in password verification. Before this error, I manually inserted name and password to the admin table and verified them and it worked fine. Now I created a script with a admin name and password included in a variable to execute instead giving a UI to create admin since I thought it might be secure. Now my password verification is not working. I went through several answers in SO and customized everything but nothing seems to be working.
it was mentioned in an answer to change the password from form since it might override the database password. I tried that and still erroring that password check is false. Also, it was recommended to have 255 length to store the hashed password, I already did have that and I extended it to 600 and still the same error. Went through the docs and found nothing suspicious in the code. The length of the hashed password returned 60 and I don't understand why is it still not working
 
7:28 AM
@RifkyNiyas do you run the add-admin.php script from a browser, or from the CLI?
 
@Stephen brower
 
ok, can you add a statement to it, to dump the hashed password that will be inserted (i.e. $hashedPwd) to output (using var_dump or similar), run it, and then check in the database directly, and compare the values.
or even paste the hash here.
 
@Stephen ill try that out
it seems to be the same and it works. How can I send a picture here?
chrome is warning like , chrome recommends you to change the password for localhost? any issues?
I had the same issue when manually inserting the password to the database
 
the chrome issue is because you're using a password of 'password'.
assuming you don't use that in a real system, you can ignore the issue while developing.
oh wait what do you mean by "it works" - you were able to login?
 
@Stephen Ah ok! Thanks for the help.
@Stephen Yah.I found a duplicate with the username I inserted before
Deleted it and I was able to login
 
7:41 AM
right. generally the username column would have a unique constraint
 
morns
 
8:15 AM
morning
 
The public statements coming from politicians of one particular persuasion in The United States of Trumpistan over the last day or so, all seem to indicate that they had an inner monologue that included this moment:
 
8:34 AM
freebsd-12.2 amd64 ・ JIT ・ #80603
 
9:04 AM
Changed behaviour of mysqli_stmt::bind_result in PHP-7.4 ・ MySQLi related ・ #80604
 
9:48 AM
@MateKocsis Would you know about somebody who could stand in for you?
 
10:24 AM
Finally have async functions working in the AWS SDK within AMP. What a rabbit hole that was.
Can finally ditch PHP 7.2 because Parallel's thread seems to just break after that version, get it back into a single thread and up to 8.0 \o/
 
10:39 AM
@Dharman I found the issue, basicly the front end developper was sending a string to the ajax call with html elements in it (this case <span></span> around the value), which doesn't show to me when I dump it in the query. Thx for the help and the other usefull tips!
 
Wes
10:53 AM
blog.jetbrains.com/phpstorm/2013/03/… the feature i didn't know i needed until now
 
11:05 AM
Morning
 
11:34 AM
Monring!
 
Wes
12:24 PM
\o
 
o/
 
12:40 PM
o/
 
\o
 
12:52 PM
@ga
@GabrielCaruso 8.0.1 is not yet announced ?
 
@Wes I think one of my favorite features is PhpStorm automatically adjusting the spacing if I'm moving code inside braces, like if I'm moving it into a try/catch block or an if statement. It'll automatically indent the code <3
 
1:47 PM
debug_backtrace inconsistent, major improvement suggestions ・ *General Issues ・ #80605
 
2:33 PM
hey just so I can say I asked someone knowledgable, time()/etc that return unix timestamps in php, won't rollover to negative numbers in ~17 years right? (cc: @Derick)
 
@Stephen It might. The issue is related to 32bit systems
 
I realise that, but what I'm asking is, on a 64bit system, where php has 64bit support, does time() use that support
 
@Stephen Why don't you simply execute it and see for yourself? 3v4l.org/XAojP
 
because that tells me date supports 64bit integer input, which I give approximately -1 fucks about. I'm asking about time() output.
If you don't know, you don't have to answer, this isn't the Spanish Inquisition.
 
@Stephen I think it comes down to the size of time_t on the system
I don't know what that looks like in practice
but PHP is just converting a time_t to a zend_long, so as long as time_t is 64 bit then I guess the answer is yes
I think there might be some flavour that uses nanosleep by default and that is where stuff starts to get weird
 
2:43 PM
well it seems to work as expected on Debian at least.
where would we be without virtual machines.
 
I know this is a dangerous thing to say but I feel like the 2038 problem is probably pretty well solved by now, and in 17 years it's will be thoroughly so, I can't imagine there being all that many 32-bit CPUs left doing real-world things by then
not important things, anyway
 
time() might overflow in 2038 but it might be patched until then. Anyway, this is why we have nice DateTime class which doesn't suffer such problems.
 
@Stephen yes it is also important to note that timelib_time is massively abstracted from unix timestamps in a sense... it can cope with anything from 0000-00-00 00:00:00 to 9999-12-31 23:59:59 I think
 
@DaveRandom I would assume the same, but a client specifically asked me "hey I know this sounds paranoid but what's the deal with this", so I wanted a more solid response than just "im pretty sure it'sfine".
we mostly don't use timestamps anyway
but its a legacy codebase, I wouldn't be surprised by much I could find in it.
 
@Stephen I mean just sizeof(time_t) is probably near enough a correct concrete answer
 
2:59 PM
@RemiCollet Not yet, I have a problem: I do have the git.php.net/?p=web/php-distributions.git;a=summary cloned locally, but I didn't have the submodule initialised in the git.php.net/?p=web/php.git;a=summary locally. Could you help me doing it? If that takes the same time as the parent repository, it will be forever :(
I'll figure it out how to run git submodule update with a --depth=1 or something to speed it up
cc @cmb @Derick @Sara
 
web/php has a mirror on github that is way faster to clone
 
yes... cloing the submodule may take some time... quite big
 
then you can just update your remote URLs
 
@DaveRandom Thanks, let me try that!
@RemiCollet I missed that step, I though I only needed the repo itself, not the submodule :(
 
if it's not an official mirror it might be @salathe's
but I have definitely seen one
 
@GabrielCaruso I'm really NOT a git expert, rather another victim ;)
3
but I think you can commit "only" the files related to the release announcement (git commit without -a, rather with file list), so ignoring the oudated distributions folder
if the distributions folder exists and is outdated you can probably use "git remote set-url origin /path/to/your/local/copy
 
@RemiCollet Okay, I'll try that
 
3:57 PM
get_browser returns Chrome instead of Edge on MacOS ・ Unknown/Other Function ・ #80606
 
@Girgias Got something during the release: https://github.com/php/php-src/commit/426fe2f20c4e85c34f118ca891c99f70def1c8a8

There's a format (I didn't know either, that's why I'm sharing):

Fixed bug #ID_OF_BUG (DESCRIPTION OF THE BUG). (AUTHOR)

The period (.) at the end of each message is mandatory. Also, can I associate that with the #80438 bug, or is that something else?
 
@GabrielCaruso They don't have a bug ticket, but they are bug fixes
Also I didn't know about the format thing either
 
@Girgias Okay, gonna edit it by hand without the numbers!
 
Thanks :D
 
@Girgias Amazing, share knowledge. Maybe @MateKocsis should know about this as well, as we are all new here \o/
 
4:11 PM
@DaveRandom That's just disturbing.
 
@Sean amphp/parallel or ext-parallel?
 
@Trowski amphp/parallel
 
What exactly doesn't work after 7.2?
 
It's been a while since I dug down into it. IIRC originally it was something to do with windows support, some extension or something required to get Thread to work was no longer supported past that version
 
@Sean Oh, yes, ext-pthreads dropped support after 7.2 I believe.
 
4:17 PM
But I had the same issues on a linux box too when I set one up last month, had to pin php to 7.2, enable a specific extension after compiling it, god my memory is fuzzy
 
Use ext-parallel instead.
 
Yesssss, that's the one.
 
cmb
@GabrielCaruso I've just update the submodule: git.php.net/?p=web/…
 
@cmb Thank you so much 🙏🏻
 
cmb
np :)
 
4:19 PM
I'll give it some time and release, send the emails, etc
 
Yeah, just checked on the box, it is indeed pthreads.
 
4:41 PM
@Derick Yes, I would be willing to do that.
@kelunik may be interested in participating too.
@Sean If you have the ability, try installing ext-parallel and see how that goes.
 
PHP 8.0.1 released, thanks everyone for your help!
3
 
yay!
 
Now back to Brazil's hotness
 
it is astonishing the number of backbone network engineers that give you your own IP address when you ask them for a gateway address
it's like every single time
obviously my own address is my own gateway, why the fuck would that be what I am asking
 
Can imagine it's frustratingly close to the number of people who have given me addresses starting with "192." for allow lists
 
4:52 PM
...and php.net is 500'ing. Yay!
 
@Sean looooool
 
Hmm... php.net seems broken
 
idk it's pretty damn fast, maybe it's a new streamlined design
 
cmb
5:15 PM
should be fixed with git.php.net/?p=web/…
@GabrielCaruso ^ (did you forget to run bin/bumpRelease 8 0; that would have failed, though, since it expects the major version already to be there in releases.inc; might be worthwhile to fix, otherwise we may have the same issue with 9.0.1)
 
Oh shit, apologies! Thanks for fixing it
@Sara Can I take PHP 8.0.2? I need moar practice :D
 
cmb
np; site is back :)
 
5:31 PM
Another problem: all the releases today in the homepage are linked to a 404
Taking a look
 
cmb
@GabrielCaruso good catch! Yes, there needs to be a 2021.php
 
Done via github.com/php/web-php/commit/496b7de5, waiting for the website to update to validate it's now working
Checking if there's something else missing or not working due to the new year
Okay, working. Now, back to vacation mode, see you in two weeks 👋🏻
 
6:05 PM
@GabrielCaruso If we want it, you got it. :D FTR I think 8.0.1 went fine (modulo very minor hiccups yes, but overall fine).
@GabrielCaruso There is some git surgery you can do to move the separate checkout into position and have it recognized, but honestly I'd want to have the checkout in front of me to make sure I get it right. It is NOT the recommended way of dealing with submodules.
@cmb Kinda surprised that entry not being there would break the site. :/
 
cmb
Uncaught Error: Call to a member function add() on null in D:\git\php\web-php\include\branches.inc:138
 
@GabrielCaruso Did you manage?
@Trowski When would you be able to? I prefer Mondays.
 
Ah.... that I can see.
If only we had ?-> :)
 
what's the ?->:) [man balancing anchor on head] operator do?
 
nullsafe object dereference operator
$x = null; $y = $x?->foo(); // $y === null
 
6:12 PM
no that's ?->
 
?->
 
Oh, you're making a joke about the smiley after it :)
 
:-P
 
ahem it is to lol.
 
@DaveRandom if you notice, the :) wasn't part of ` `
 
6:13 PM
(y) <- woman desperate for a wee emoji
 
Sorry, Buzzkillington reporting for duty
 
@DaveRandom Well shit, now I can't unsee that.
 
yep, sorry
 
So in revenge, I'll put this thought in your head.... What if it's just tucked?
 
I mean it could equally be a dude but they are definitely very feminine hips
 
6:17 PM
hrmm, point.
 
I wouldn't want to assume emojender though
 
Hahaha, that was the punchline I was looking for. Well sorted on that joke.
I couldn't quite bring it together.
 
it was touch and go for me tbh
 
<3 you both
 
Right. This will prevent the type of outage we had this morning: https://github.com/php/web-php/commit/527e1f4a06f95251e3264d696145f11f70c25843
And this will make bin/bumpReleases behave when we get to PHP 9.0.0: https://github.com/php/web-php/commit/f4dfa851e2ebdab70352658a40e006f3d7b106d4
 
6:25 PM
foreach foreach if if if :-/
I always feel overwhelmed whenever I try to tackle stuff like that
ext/ldap/ldap.c is a right mess but refactoring it just feels unachievable :-/
 
Every so often I get a bug up my ass to make web-php a bit cleaner, but there's SO MUCH TO DO.
 
yeh, and I also feel like a partial job would be worse than nothing at all a lot of the time - at least a total mess is consistent with itself
 
At work, I call it "violence".

For example: Slack: "@sgolemon: I couldn't sleep last night, so I committed some violence against the auditing subsystem. TL;DR - It's a thousand lines simpler and a bit faster now."
 
heh
is there a specific convention against splitting up monolithic files? things like ldap and soap are insane, I'm sure it could be made more manageable by categorising things and breaking it up a bit
 
We still have a bunch of globals spilt all over the web-php codebase, but we used to have way more. In particular, in include/versions.inc we had these $PHP_7_2_DATE $PHP_7_2_VERSION $PHP_7_2_FILES etc... variables that we referenced elsewhere through a mix of global $PHP_7_2_DATE; and variable variables $GLOBALS["PHP_{$branch}_DATE"]. I spent a couple days on that cleanup to make sure I didn't bring the site down in the process.
 
6:30 PM
but there doesn't seem to be much of that in php-src, most extensions seem to favour a small number of files
 
No specific convention at all. If you see a monolith, smash it up.
 
right, @heiglandreas I need to talk to you about ext/ldap at some point soon :-P
 
Personally; I like "1 file per class, 1 file for global functions, 1 file for module housekeeping", though even that isn't a hard and fast rule. Lost of ICU stuff makes even that impractical.
ext/curl/interface.c is another monolith, btw...
 
@Sara yeh but for stuff like ldap where it's just a fuckload of global functions... :-P
yeh I bet curl is bad as well, never opened that box
 
cURL is a special beast because it's also a fuck ton of importing constants from the header. There's a lot of refactoring one could do to make that more palatable.
 
6:33 PM
well yeh that's what I was thinking, the public API of curl is only a handful of functions, it's mostly descriptive data structures presumably
is there a concrete game plan for retiring resources yet?
 
But even those could be moved to header files and pulled in like:

#define X(T) do_something_with(T);
#include "massive_constant_list.h"
#undef X
 
I think it's more of a cardboard plan.
 
curl_set_opt() is also a beast tho
There is a plan, and we've gone a decent distance in implementing it: github.com/php/php-tasks/issues/6
Streams is the big ugly 400lb gorilla in the room though
 
@Crell like, if I were to hack ldap to replace the resource with a class mysqli-style, and hack is_resource() to return to true for instances of that class, would I be told where to get off?
 
@DaveRandom Except for hacking up is_resource(), you'd be lauded.
We're just making that part of the joys of upgrading.
 
6:36 PM
I was just trying to think if there is any other thing about resources that would fundamentally break in a non-BC way
other than gettype
you could make them look like a resource to all intents and purposes
 
is_resource/gettype should be it, and we've largely decide we're okay with that.
 
not that I want this btw, just thinking about bc
sweet
 
That PR has a bunch of stuff already in 8.0 that we've just .... done.
 
@Derick Unfortunately Monday rarely works for me. Wednesday - Friday or the weekend works better.
 
cool, cos there's an async API exposed by openldap, and I can't expose that to userland without a whole new set of functions, and I don;t really want a whole new set of global functions, methods would be way better
@Sara for me the solution to this is a shiny new OO API
 
6:39 PM
So the resource to object conversions are all considered "go" at this point. Actually adding methods to those classes require RFCs be approved.
 
oh yeh obv that would be a separate issue to the refactor
 
So do the conversion first changing nothing about the API from a user point of view (other than the type), THEN work on adding new APIs as methods and RFC it.
 
aye
well, looks like I should go learn how PHP 8 works :-P
 
A lot like PHP 7, thankfully
 
I assume there's not a huge number of fundamental changes for class decls etc?
yeh cool
 
6:41 PM
You can also reference the commits in the PR for a boilerplate template for conversion
 
oh trust me, this will be heavily copypasta driven during the PoC phase :-P
 
Glad you're on it. LDAP is one of those that needs an LDAP server to test properly (and I presume you have code using LDAP that you care about which is why you're paying attention to this ext).
 
I talk to AD and phone systems a lot
and I got a fresh server 2019 VM here just waiting for me to screw it up
 
6:58 PM
@Stephen fyi there may be other issues, but yeah......quite a few years left to fix any more that are found like bugs.php.net/bug.php?id=78241
 
@DaveRandom Ooo, async sounds good :-D
 
it turns out that whole API async-first
can easily be exposed in a very similar manner to ext/pgsql
but it will create a fair number of new routines and I'd rather make them methods of a class than litter the global namespace with yet more resource-oriented functions
 
 
1 hour later…
8:16 PM
How is makeCurlRequest as a method name, for a method that makes an API request using curl?
I was going to try renaming it to start with request but couldn't think of anything to add to describe the request
 
@Tiffany What is the name of the Class?
 
It's a value object pretty much... I'm choosing not to specify the name because it's domain-specific
... please don't ask me to explain the class design decisions cause I have no clue, and I'll not yet skilled enough to improve it
 
I was about to say "Should a value object be making network calls?"
 
Yeah....... 😬
I'll have to posit that question to the lead at some point, see if the variations of requests that are made can be put somewhere else outside of the value objects
 
If it's an object that makes different types of network calls, that's one thing... If it makes just curl calls, that's another thing.
The name you've chosen is descriptive enough.
 
8:23 PM
I'm wrong, it's not a value object. It's an adapter. I got mixed up because the class name is named after what is being adapted.
 
Thing is, I was just curious as to whether it makes different types of calls
 
I see
Thanks!
 
You might need to break it down further if it does more than one thing and depending on intended usage
$obj->makeRequest($method, $url, $queryParameter) vs something else
 
8:53 PM
@Tiffany make implies create.....somewhere there's a really good list of names that are standard for Java code, unfortunately I lost that bookmark.....I think execute or dispatch might be more appropriate.
 
@DaveRandom I'll be back at 8ish UTC. Feel fre then
 
9:07 PM
@heiglandreas basically I just want to talk to you about what ideas you had when you were looking at it/ideas you might have moving forward. Initially I'm just looking at a 1:1 refactor to objects instead of resources, but after that I would like to go some way to possibly creating a nicer OO API (at least a bit of sugar for common cases) and I want to expose the async stuff in openldap to userland
so no great urgency :-)
 
9:19 PM
Anyone know of an extension that has an optional library dependency of the .h/.so kind? (not on another extension)
 
9:35 PM
@Danack thanks
 
@LeviMorrison does mysqli's multiple back-ends count?
also I'm guessing curl has a bunch
 
@DaveRandom Maybe? I will take a look.
 
probably dealt with at the libcurl level rather than the PHP build system though now I think about it
 
@LeviMorrison what's it you're trying to solve?
 
Just experimenting, looking for examples of different kinds of linking, finding headers, etc.
 
@DaveRandom by the way, networking gear x)
My firend just reminded me
 
oh shit lol
though you may not want it as much now :-P threatprotect.qualys.com/2021/01/04/…
I will sort it out tomorrow
 
Thanks :D
 
10:08 PM
@DaveRandom well, someone's going to have an awkward conversation about quality control.
 

« first day (3736 days earlier)      last day (1203 days later) »