« first day (3292 days earlier)      last day (1653 days later) » 

5:21 AM
Refreshable PHP crash – #78703
Refreshable PHP crash – #78702
Refreshable PHP crash – #78704
Refreshable PHP crash – #78705
 
user8732191
6:05 AM
Hello
I have a doubt to ask regarding javascript
Can anyone please help me out
 
6:42 AM
@cmb wow ... I haven't even heard anyone say vc6 for at least ten years ...
 
cmb
6:57 AM
yeah, should have been long forgotten
 
7:36 AM
morning all
@Stephen @MarkR problem solved!
 
what did it turn out to be?
 
I have no idea, I couldn't find any programming errors, so I made a ticket explaining the entire situation to the guy, this morning I got an email: "we've changed some settings around for php and the database" , and now it works perfectly
 
ah the proverbial E_DUNNO
 
I have asked what exactly they've changed, but I havn't gotten any response so far
haha, exactly
could also be that they made an error, and are now trying to shrug it off as setting issue
 
good mornings
 
cmb
7:40 AM
@StatikStasis, seems unplanned: bugs.php.net/bug.php?id=78706
 
news.php.net is down – #78706
ReflectionClass::implementsInterface - incomplete documentation – #78707
 
8:00 AM
comprise to be made up of
 
@cmb That's great
Finally some silence
6
 
cmb
:)
 
8:27 AM
morns
 
8:40 AM
@PeeHaa you around?
 
Is it possible to un-alias a class which has been previously aliased by class_alias()?
 
no builtin
 
8:57 AM
oh snap, that would have been useful for me in testing. But I can work around it.
 
@cmb I have some good news: __vectorcall partially works under Windows platform now, at least for several functions )
(in your snapshot)
I don't know why but it can't resolve zend_hash_add_or_update@@32 exported function.
Also, if need to combine pointer with __vectrocall, then asterisk sign should be after __vectorcall:
Original: ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key)
Expected FFI: extern zval* __vectorcall zend_hash_find(const HashTable *ht, zend_string *key)
Works: extern zval __vectorcall *zend_hash_find(const HashTable *ht, zend_string *key);
 
9:16 AM
ftp_login doesn't work with colon (:) in password – #78708
 
Is lxr.php.net down?
Did just most of the PHP infra die over the weekend or?
 
I think that one has been dead for a while? Use lxr.room11.org
 
Ah true mb
 
10:14 AM
(ʘ‿ʘ)╯
 
10:39 AM
@NikiC and others, which is a good example for the arginfo work? i.e., the most/bestest clarification?
 
cmb
10:51 AM
@Derick, I'm afraid there is no general detailed (aka. bestest) description. Skimming over the closed PRs with label "stub" might be useful.
@Derick, re PECL account request joodk: can you grant it, and make him lead for ncurses?
 
@cmb I just need an example of a moderately ocmplex one
@cmb Opened, making him a lead now
 
cmb
re arginfo stub example: maybe github.com/php/php-src/commit/…
re joodk request: ta
 
@cmb Oh, is arginfo master only, not 7,4?
 
cmb
yes, it's for master only
 
/me deletes slide
 
cmb
11:05 AM
:(
 
Now I "only" need to do FFI and preloading, which Remi doesn't have a lot of success with
 
cmb
@lisachenko, thanks for checking! The second issue isn't specific to vectorcall; extern char* __cdecl get_zend_version(void); fails also without the patch. Should have a bug report for this.
I'll have a look at the first issue ASAP.
 
@cmb @cmb thank you, almost ready ))
 
cmb
Anybody here who could add the category "Extensibility Functions/FFI" to bugsnet?
There is "PECL/ffi", but that's quite different.
@lisachenko, did you alread work with preloaded FFI?
 
I probably can...
 
11:18 AM
@cmb not yet, just trying to make it working with Win platform
 
cmb
Would be nice, @Derick. I'm expecting quite some bug reports regarding FFI.
 
@cmb aye
 
I don't remember the password, and it doesn't seem I have sudo
 
ugh nope. don't have db access :-(
 
the password might be in the code though
 
11:20 AM
It's not
Although it would not surprise me if its is user nobody without a password :D
 
I tried that ;-)
 
hehehehe
 
cmb
I've heard "we suck at infra" :)
 
what's the database name?
 
phpbugsdb
That's what it is called locally at least here
Pretty sure it's the same live
 
11:23 AM
I've no sudo, so can't check or find out. I thought it was part of master.php.net/manage, but no luck there
 
Maybe @Kalle can give some access here?
@mega6382 Am now
 
@PeeHaa I wanted to ask, does the imdb work in the example repo?
 
@cmb What about that link?
 
@mega6382 Yes it does
 
cmb
11:30 AM
That's a working PHPT wich preloads FFI defs, and uses them later.
 
If you need the api key I can share it with you for testing purposes
 
I have an api, but I am unable to invoke the plugin
check the jeeves playground
 
Do you get an error or something else?
kk
coming
 
@cmb Oh thanks, will come up with an example myself after lunch.
 
@PeeHaa nope
 
11:51 AM
Refreshable PHP crash – #78709
Refreshable PHP crash – #78711
Refreshable PHP crash – #78710
 
wtf
 
lol
 
Refreshable PHP crash – #78712
 
 
1 hour later…
1:27 PM
Guys any idea about this?
As you know, google-ad doesn't support Persian language websites. So, it doesn't give us ads to serve and monetize. How come if I get ads by a third party website (like a self-designed blog in English) and they show those ads in a Persian website by using an iframe ?
 
@bwoebi Any thoughts on whether X|Y|Z for a value of type Z should have a guarantee that no class loading happens (even if X and Y are not loaded)?
I.e. should we first try to check against already loaded classes and then load in a second pass, or just check types in order?
 
I don't think a well-defined order is important there, it should just be deterministic. Whatever is easiest to implement.
 
Okay, in that case I'll stick to the simple variant for now
I think the implementation is mostly done now: github.com/php/php-src/pull/4838
 
1:46 PM
!!wotd
 
@mega6382 Syntax: wotd on|off|status [frequency]
 
thnx
 
\o
@NikiC IMO, as long as the loading does happen then we are okay -- I wouldn't want this to have to change again if we used named unions.
 
@PeeHaa I have created a pull request, please have a look when you get some time.
 
Guys I work at a PHP start-up and I'm on a super low salary - can I get some tips on how much I should be on and how to go about getting a raise?
 
1:55 PM
@NikiC you reused quite some parts of my old impl, but large parts completely rewritten, it seems to me
 
I'm currently on probation which could be why my salary is low - I've got a pay revue in January does salary likely increase a lot after that?
 
@cmb FFI preloading with my library results in zend_mm_heap corrupted, even if I simply change method flags from protected to public.
 
cmb
hmm, maybe another bug report?
 
/me waves
 
@cmb This can be related to my library too, how can I check if it's PHP bug or not?
 
1:58 PM
o/
 
@ircmaxell \o
 
checking @mega6382
 
@cmb How do I handle a double *decl (as output argument) with FFI?
 
cmb
Hard to tell, @lisachenko. Would probably need to use valgrind or such, to get details about the heap corruption.
 
user11867329
Anyone got a link a good SQL cheatsheet?
 
cmb
2:02 PM
@Derick, access as $double_pointer[0]
 
?
$L = FFI::new('double*');
$ffi = FFI::load(__DIR__ . '/astro.h');
$ffi->sunpos(123, $L, $M, $ra, $decl, $rad);
$L is an output argument, but GDB shows it as:
0x00007ffff7f9c8fd in sunpos (d=123, L=0x0, M=0x0, ra=0x0, decl=0x0, rad=0x0)
at /home/derick/dev/php/solarsystem/astrolib/astro.c:119
119 *M = 356.0470 + 0.9856002585 * d;
 
@cmb then I'd better work on Win support with ffi.enable=true right now. What is strange, that github.com/php/php-src/blob/PHP-7.4/ext/ffi/tests/300.phpt#L8 uses ffi.enable = 1 and not ffi.enable = preload which should fail this test if I understand preloading right
 
cmb
@Derick, try echo $L[0];
 
@bwoebi any reuse is accidental ^^ I ended up implementing it from scratch, because the introduction of zend_type (and related refactorings) and property types unfortunately changes things a lot
 
no, I needed:
$L = FFI::new('double[1]');
It crashed when calling arleady
 
2:05 PM
@NikiC packagist hooks were already enabled... weird. I added you as a maintainer on packagist anyway tho
 
@NikiC okay :-D
@NikiC anyway, at a first glance, looks nice, complete with opcache changes and everything :-)
 
@PeeHaa thanks
 
cmb
@Derick, ah, of course! Guess that should be documented.
 
@Derick you've allocated only the pointer to double, you should either use FFI::new('double') before to allocate value itself or assign it to existing value.
 
@lisachenko I don't understand what you're saying
 
2:10 PM
is sunpos function returns value by pointer?
into L variable?
 
void sunpos(double d, double *L, double *M, double *ra, double *decl, double *rad);
is the prototype
 
mod_php segfaults with opcache.preload – #78713
 
ok, then you should use something like that: $L = FFI::new('double') and pass to the sunpos L as expression FFI::addr($L)
 
why not double[0]? as that works
 
@Derick because you dereferencing invalid pointer, thus segfault
 
2:13 PM
it doesn't segfault, I just said it worked with new('double[0]')
 
Just lucky case ))
 
Commented @mega6382. I added a good example of what most tests should look like here github.com/async-bot/imdb-plugin/pull/2#discussion_r337040692
 
@LeviMorrison @bwoebi github.com/php/php-src/pull/4839 yay?
 
if you have any questions or want t\o to tell me I am wrong just ping me :-)
 
@NikiC For 8.0, right? The tests look suspiciously thin, but looks +1 from me.
 
2:17 PM
@LeviMorrison yeah, for php 8
 
cmb
 void foo(double *);
double d1;
double d2[1];
foo(&d1);
foo(d2);
 
@Derick this allocates a dynamic pointer to zero-array, aligned on "double" type size. If you are lucky, then next bytes will be in process memory and readable, but can contain any garbage. But typically you will get segfault for this case or at least, you will get something unexpected.
 
@lisachenko Yeah, I figured.
Of course, a double is the size of a pointer on a 64bit platform
so that's why that worked
in any case:
I think I'll just stick to writing wrapper extensions in PHP ;-)
 
@Derick just try to use FFIMe )) it will generate everything you need automatically, for simple libraries and projects, this is the best option, IMO
 
Some other time, I'm just trying to come up with an example that's not too crazy
 
cmb
2:25 PM
$L = FFI::new('double[1]'); is basically fine, isn't it?
 
@cmb yes, but not so explicit as FFI::addr, and you should pass FFI::addr($L[0]) to be precise with pointer to this value.
 
@NikiC yay.
:-)
 
@PeeHaa thanks, will fix it right now
 
@NikiC Oh, and we probably ought to make some doc note about this function's format changing in the future to fit future changes to type representations.
 
<3
 
cmb
2:29 PM
ACK (would use a double in C). But is FFI::addr($L[0]) not the same as $L when used as argument?
 
In other words, if you are parsing the string output, be aware of this.
 
@cmb should be the same, actually...
 
Hello
I have this type of array: https://hastebin.com/bagutojopu.php

where duplication found, I need the last index of value, I tried but no luck, please help.

Ex. 105, 106, 107 have same value 100, so I need 107 value
 
ugh, unfortunately the mailing list was fixed :(
 
@LeviMorrison yeah, noted that in the PR as well
 
2:43 PM
@NishargShah did you try array_unique(array_reverse($a, true)); ?
 
@Sjon Thanks, bro! you saved my lot hours
 
@NikiC I found out why php-yacc wasn't updating on packagist
> Skipped branch master, Invalid package information:
License "Apache 2.0" is not a valid SPDX license identifier, see https://spdx.org/licenses/ if you use an open license.
If the software is closed-source, you may use "proprietary" as license.
 
@ircmaxell ugh
 
funcs returning pointer can't use call convention spec – #78714
 
cmb
2:52 PM
@lisachenko, ^
 
(side note: it would be even better if msvc supported the proper position for calling conventions, which is before the type)
 
@cmb thanks!
 
cmb
@NikiC, is that defined in any standard? (I have to admit that the position is, say, unintuitive)
@lisachenko, yw
 
@ircmaxell That's subtle - nice that you found out why :-)
 
@bwoebi subtle as they have been sending nagging emails for every single repository :P
 
3:04 PM
@PeeHaa I haven't got any, maybe something in spam...
 
@bwoebi Lucky you :D
 
yes, it's junk email :-D
I don't check my junk often...
 
I got soooo many of those (mostly because I fucked up licensing lines myself)
 
@PeeHaa I have fixed those issues, please check when you get time.
 
Aye awesome
Will do after food <3
 
3:07 PM
thanks <3
I will start writing the wotd and dad plugin tomorrow, and will try to complete those asap.
 
3:44 PM
@PeeHaa I'm surprised that nobody built a bot to PR a fix for those...
 
user11867329
Anyone got experience with KUSANAGI OS?
 
So, after much thought and discussion, I'm personally not going to propose the Project Charter anytime soon. If anyone wants to move ahead with any part of it (or the whole thing, or something else entirely), I'm all for it and can support a bit
 
@NikiC I'm happy to see more exceptions discussion, yay. However, I've got a nagging feeling that a certain someone will find out and kick up a fuss. :(
 
@salathe yup
 
4:11 PM
@ircmaxell Yeah good one
Last thing @mega6382 :) can you move all the setUp methods to the top of the methods?
 
Morning
 
Morgens @StatikStasis o/
 
@ircmaxell :( but understand you
 
4:30 PM
@PeeHaa sure, that happened because of my phpstorm configurations, I have save+format on ctrl+s, so it automatically moves protected methods to after the public ones.
 
@beberlei Yeah, it'll get heated and personal, and honestly that's not something I need right now
 
@mega6382 Automated formatters always end bad in my experience :-)
 
yeah, lol, they are a lot of trouble
@PeeHaa done
 
Awesome thanks. Will let the builds run and merge\o/
 
4:46 PM
thanks <3
 
4:59 PM
I'm thinking of ideas for short-form try statements
I'm thinking something along the lines of:

$x = try(launch_fn(), fn(ErrorException $ex) => null)

Where it would be try(AST, FN, ...)
I wish I could shorten the fn(...) bit down some but if it needed to use the exception object it'd need to magic up an invisible variable which I would hate. Maybe deny using it at all?

$x = try( some_fn_that_throws(), ValueError => null );
 
@PeeHaa build is complete it seems
 
 
1 hour later…
6:08 PM
Merged thanks
 
6:53 PM
I need some advise guys. I have a PHP / Websocket based chatsystem. All working perfectly fine. All messages are logged in a MySQL database (on average between 5000 / 10000 a day). Now my users would like to be able to read back their old private messages. Those private messages are selectable with userid's / receiver id's, but they're obviously not unique. With the database growing in size that fast, I'm afraid it would have a huge impact on performance.
I mean, imagine a query having to go through a database with millions of records to find all those messages. Then imagine around 500 users going online / offline all the time and doing this..
 
Seems to me you would want something like elastic search
Although I have no clue why users going online/offline would have any impact on anything
 
Because to be able to read back old messages after disconnecting from the websocket, they'd have to be selected from the database. It's not like the websocket stores old messages in its memory, haha
 
@icecub as long as they are well ordered (meaning you're paging by an indexed field), that shouldn't be too much overhead.
Create your index as a multi-column index with the first columns being your filter criteria and your last being your order column(s)
 
@icecub But searching an logging in are two different things?
 
so assuming a table of sender_id, receiver_id, message, sent_timestamp, ..., put your index on (sender_id, receiver_id, sent_timestamp), and then when you do WHERE sender_id IN (%d, %d) AND receiver_id IN (%d, %d) ORDER BY sent_timestamp DESC it's a simple index scan
 
7:02 PM
oooooh
misread
 
I do something similar for millions of messages, it's fine as long as you've got a decent index
 
I thought you wanted to do some fulltext searching
 
Yes, but logging in would automaticly restore the old messages. Or wait.. you're right. There's no need to do that! I should only restore them if they are trying to read them.. ugh, can't believe I didnt think about that..
 
Well, reading the most recent N is a cheap operation
so you can pre-load say 10 messages, and provide a "see more" at the top of the scroll (just like this very room works)
 
@icecub You might want to do that anyway to find missed pings
Or at least some form on history handling while they were gone
 
7:05 PM
No that won't work. I mean, it would if they were in a seperate table. But all messages are stored in a single table. So most recent N would just return completely different messages
But I think you're right about indexing those columns :) That should definitely help. Thanks a lot @ircmaxell
 
@Trowski It's going places imgur.com/a/kACLKzx \o/
 
7:42 PM
Who's got two thumbs and has had a threat of violence against them for an open source project?
 
a number of us
but you got one today?
:( sorry to hear that man
 
I had one for downvoting a bad question.. trouble is, I didn't even downvote that one
 
I used to run a online community, got lots of threats on that one. More so when someone whois'd my website in the days before privacy settings
 
@ircmaxell in a way makes it easier. Was in the middle of drafting an email to some appropriate authorities, and a threat of violence is easier to get them interested than "someone being really annoying over a long period of time".
 
Definitely follow up on it, but at the same token don't get hopes too far up, most Authorities don't care too much :/
 
7:51 PM
It's usually because it's impossible to track down. With VPN's everywhere these days, it's just not worth the trouble. Easier to just say: Thank you for letting us know, please contact us again when they're on your doorstep
 
lots of hard-men sitting behind keyboards... I mean that in multiple ways
 
I understand it's a joke, but kind of inappropiate
 
@icecub hypothetically, if someone is dumb enough to want to fight, they might also send their home address.
 
@Danack True
 
gauntlet.png with their home address in it
Sadly the intent is primarily to instil fear, which is easy enough when you threaten someone with violence and you don't know who.
 
8:03 PM
Talking about fear.. My favorite spam mail these days is the one talking about recording me on my webcam and telling me to pay up or it will go on the internet, lol
 
Yup... I know people who have had genuine breakdowns over that shit.
When people say that it's only names and emails that are at risk if their websites get hacked, I point them to a registry of sextortion scams
 
I just tell everyone that asks me about it: If they don't show actual proof, they don't have it either. Just ignore it
 
Well that's why they combine it with decrypted / stolen passwords, to add authenticity
Most people don't have good password hygine, imagine getting an email with your email password, probably the same as your computer password etc
 
Ye ok, but at some point, that's their own fault. Don't use the same password everywhere
 
and always uninstall the drivers and keep a piece of tape over your camera when you're watching porn.
(Actually, just do it regardless)
 
8:12 PM
What a day...
 
'sup?
 
Well uninstalling drivers is a bit overkill, lol. Just tape it or put it down if it's not attached to something. Might want to install good internet security like BitDefender which warns you if something accesses your webcam / microphone
 
@MarkR Just a lot of craziness at work (restructuring) and a lot of changes and more roles I am being given... still waiting on compensation for said roles.
 
ah yes that old chestnut =\
 
@icecub I've seen clear and verified threats of significant harm, from people where they openly admitted to doing it, go unhandled and uncared by authorities a lot
 
8:23 PM
just not worth the effort i seems
 
Well kind of depends on the authorities. My guess would be that they just don't take it seriously. They're like: We got better things to do. Untill something actually happens.. then they play innocent
 
Could I have a php script or .htaccess config see a url like /careers/123 internally process it as /careers/job?job-id=123 and return those contents, without actually re-directing / changing the url?
 
yes
 
would that be called routing? what do I look up for this?
 
"url rewriting" is the term
 
8:34 PM
I thought that's only for stripping file types... neat!
 
nope, can be used to do all sorts of things. It's quite powerful
 
Right on, cheers
 
I actually do something simular redirecting ws:// <-> wss://. Though that's more proxy tunneling
 
pro tip: rewrite the URL /xxxx to index.php/xxx. You can then do the details in there. And if it is getting crowded other URLs like /yyyy can go to other.php/yyyy. This is normally well supported by PHP.
(and the webserver)
So you can the first catch in the webserver and further delegate to an app front-controller (entry-script). In there is maybe github.com/nikic/FastRoute - to just name one.
 
8:54 PM
I'm working with WordPress. We used to have a custom post type for this and then switched to an Applicant Tracking System, so we don't keep any of the data in our dashboard anymore. All I need is the id from the slug to be given to the template which then gives it to the 3rd party api and displays it all pretty and integrated.

Figured a page with a query parameter would be the easiest way (since it keeps it all WordPress-y) but with proper slug. Seems the rewrites (if this works as I expect it to) should handle that.
 
Yes, if you place it well in the .htaccess this comes before anything else touches WP even (or you provide that URL that triggers the intended action inside the app, here WP).
This is the great benefit of controlling at webserver level (unless the .htaccess grows too large and becomes unmaintainable)
 
Yup, I'll try and handle it through the app first, that seems the more proper way codex.wordpress.org/Rewrite_API/add_rewrite_rule
 
@Julix depends a bit on the level of control. Wordpress only touches that part in the .htaccess which is marked, so you can place your own rules on top.
I personally dislike it when the application changes the webserver configuration, but if it works for you, there is little to argue.
 
9:46 PM
Can anyone tell me what the optimization level setting to turn off to stop this Opcache bug would be please: https://bugs.php.net/bug.php?id=73654
And yes, upgrading would also fix the issue...
 
9:59 PM
from the report might be that nikic remembers it? I have no clue, this is above my paygrade.
 

« first day (3292 days earlier)      last day (1653 days later) »