« first day (3709 days earlier)      last day (1244 days later) » 

2:33 AM
@Tpojka lol
 
Telling you.
 
3:04 AM
@LeviMorrison what exactly is the point here? emulating a reference by wrapping a value in an object container?
 
 
1 hour later…
4:16 AM
@JoeWatkins yeah, you're not alone
 
4:45 AM
Documentation ERROR in Exception::getCode ・ Documentation problem ・ #80504
 
@bwoebi The most common uses are where you have generic code that has no way in standard PHP to distinguish between value of null versus no value. For instance, the result of an array_reduce could legitimately be null, but if the array was empty it might also produce null. How do you distinguish?
There are quite a few Maybe, Optional, and Option packages that all implement this idea in different ways.
 
5:04 AM
I have that issue when writing caching layers without resorting to a "has" method, I usually use a LookupFailed class that I can instanceof check in place of a valid null.
 
 
3 hours later…
Wes
7:38 AM
i use a domain specific class/placeholder for no value
and i try to leave null for "undefined"
 
7:55 AM
morns
 
 
2 hours later…
9:32 AM
o/
doesn't this also get tested now in this
 
9:52 AM
@Ekin yeah, should probably delete the bugxxx test
 
10:04 AM
!!rfcs
 
10:29 AM
@NikiC alright
all those numbers ... TIL this page exists
 
 
1 hour later…
11:55 AM
the lcov page looks like it could've been useful, if it wasn't that outdated :-P
do we have a similar sort of coverage somewhere else?
 
12:16 PM
@bwoebi Yeah me too, which is a tad confusing
@Ekin It should appear now on app.codecov.io/gh/php/php-src
But we use Azure Pipelines for code coverage
gcov should probably be removed/redirect to the above link...
 
oh nice, thank you
I checked Azure but I didn't see line coverage
 
@Ekin Only the scheduled daily build does it :) it's a bit of a hassle to find it...
 
oh I think I see. So scheduled run generates it and uploads to codecov.io daily?
 
12:33 PM
I think so, that codecov.io thing is rather recent
anyway I'm off to the German embassy
 
Viel spass
 
BUG ・ Unknown/Other Function ・ #80505
 
1:06 PM
high quality summary description there
 
The best
 
1:51 PM
@Girgias Hm, when actually opening a file I always get "GitHub API: Forbidden"
 
I did get the same thing, at least logging in via GH there does take you back to it
 
 
1 hour later…
3:05 PM
Hello gentlemen
May I ask a question related to Laravel?
 
You can ask. Whether you'll get a useful or informed answer is another question. Generally framework-specific questions are better asked in framework-specific venues.
 
@Derick @cmb @Sara I assume github.com/php/php-src/blob/master/docs/… is already automated via github.com/sgolemon/php-release, right?
And do I need to request access to php.net/distributions, or doing everything via web/php-distributions.git is enough?
 
cmb
3:28 PM
@GabrielCaruso the files need to be pushed to web/php-distributions.git; if you have karma for that, everything is fine. I never used php-release, so I can't comment on that.
 
@cmb Just checked people.php.net/carusogabriel, I do :+1:
 
cmb
Consider to clone that repo soonish, since I had serious trouble doing so (needed several attempts and finally a hack to get it).
 
I'll do my tests this weekend, thanks for the heads up!
 
user13415013
Guys I've got a problem.
 
user13415013
3:43 PM
When using classes the string given in variable isnt showing , isntead showing blank string in classes.
 
I'd give Nobel price to anyone who can decrypt what is said here.
Post what you mean in gist.github.com
Also, 'Day.
 
user13415013
:), I am writing , please dont mention
 
user13415013
I have this variable
$userLoggedIn = "zhōn"

I've passed it into classes Post, like this
$post = new Post($con, $userLoggedIn);

now when i print that $userLoggedIn from classes, It prints blank instead.
 
Is zhōn a constant?
 
user13415013
oh sorry it is "zhōn";
 
3:51 PM
What does the constructor look like? How do you attempt to use that value inside the class?
 
user13415013
Guys suddenly it worked.
 
? doubt After fixing the quotes?
 
@nerd Sometimes is needed just to ask. However, as question is more precise as faster solution will be.
 
user13415013
yes i got problem where it was
 
user13415013
I think it is solved. Sorry.
 
3:58 PM
@nerd Enlight us what was about?
 
user13415013
I was using classes to insert into database.
this was code
$post = new Post($con, $userLoggedIn);
$post->submitPost($_POST['post_text'], '');
and
Previous silly error was , I was printing the blacnk submitPost userid.
But although I cant able to insert into database.
but can update other database.
 
user13415013
This was code
<?php
class Post {
	private $user_obj;
	private $con;

	public function __construct($con, $user){
        $this->con = $con;
        $this->user_obj = new User($con, $user);
    }

	public function submitPost($body, $user_to) {
        $body = strip_tags($body);
        $body = mysqli_real_escape_string($this->con, $body);
        $check_empty = preg_replace('/\s+/', '', $body);
        if($check_empty != ""){
            $date_added = date('Y-m-d H:i:s');
            $added_by = $this->user_obj->getUsername();
 
user13415013
my this //insert post is not working, but not error is showing in terminal so dissapointing
$query = mysqli_query($this->con, "INSERT INTO posts VALUES('none', '$body', '$added_by', '$user_to', '$date_added', 'no', 'no', '0')");

but that last code is working
$num_posts++;
$update_query = mysqli_query($this->con, "UPDATE users SET num_posts='$num_posts' WHERE username='$added_by'");
 
Why are you using mysqli_real_escape_string and strip_tags? That's a very smelly code
Never write queries like this. You must use parameterized statements
 
user13415013
Thank you. I should use parameterized ones, I will check, Thank you .
 
4:05 PM
Is there any reason why you use mysqli? Did you know that there is a much better e extension called PDO? Make your life easier and start using PDO today.
Prepared statements are also much easier with PDO than with mysqli
 
user13415013
Yes, I was educated past days about pdo. I was just going through this tutorial, will remove it immediately when i gain some php insight and will move to PDO :)
 
Good job!
 
This what @Dharman says.
Also type hinting can help.
As developer you have to ensure you did everything to make code as safe as possible.
 
type safety is a very different kind of safety to input sanitisation...
 
Sure thing. I am continuing advices of good (industry) practice.
 
4:11 PM
yeh indeed, just be careful not to overload is all :-)
 
Type hint can tell if something went wrong before db query line executes. To be exact, just when method starts execution.
 
yeh but that's about guarding against your own stupidity, not guarding against malicious data
 
user13415013
:)
 
and I would argue that the latter is typically more dangerous :-P
or at least, worth focusing more of your effort towards
and more importantly they are very different concepts
 
@DaveRandom Oh, Jeffrey Way? Didn't recognise you... :D
 
4:14 PM
:-P
 
Joke. I know what you are saying.
 
I am actually against the phrase input sanitization. This phrase is so vague it could mean anything and most of the time you don't need to do any sanitization.
Depending on the business requirements you might want to remove some stuff, e.g. leading spaces, invisible characters and such, but the phrase input sanitization is often used in connection to security which is misleading, as you can't sanitize input enough to ever be safe.
This is why we have things like prepared statements that don't rely on changing the data and accept it as it was provided by the user. Security should not involve sanitization.
 
I fundamentally disagree with your definition of "sanitisation"
parameterised queries are still a mechanism for santising input
 
@Dharman General definition of sanitation would be getting stuff into final state - state of grade for use. So sanitation also represent removing blank spaces per business requirements.
 
That's the point. There is no one definition of sanitization. It can mean a lot depending on the context
 
4:20 PM
@Dharman Just did it. :D
 
Sanitization usually involves removing stuff that should not be there. Prepared statements don't modify the data in any way
 
you are both wrong, sanitisation does not inherently imply modifying the data.
:-P
 
user13415013
Thank you @Dharman, I used from w3schools and found problem
I edited code
$query = "INSERT INTO posts VALUES('none', '$body', '$added_by', '$user_to', '$date_added', 'no', 'no', '0')";
if (mysqli_query($this->con, $query)) {
echo "New record created successfully";
} else {
echo "Error: " . $query . "<br>" . mysqli_error($this->con);

And found problem
Error: INSERT INTO posts VALUES('none', 'sadflasd;f; kljsdf;lk asdklfasldfjlasdf lasdfj asdf asldf', 'zhōngguó_long', '', '2020-12-11 17:19:32', 'no', 'no', '0')
 
@DaveRandom I didn't focus on that.
 
user13415013
I can solve it :)
 
user13415013
4:21 PM
may be :)
 
user13415013
Thank you :)
 
I HAVE DECREED. JUDGE DAVE HAS DECIDED. THE MATTER IS CLOSED.
<maniacal laughter>
 
@DaveRandom :(
 
seriously though, I do think that you are somewhat missing the point @Dharman,
"input santisation" is about making sure your data does not break your system
that is the beginning and end of it
if does not pertain to any specific mechanism for doing so
 
4:23 PM
Why would data ever break your system? That sound like a buggy system
 
imho, ymmv, etc etc
 
Dumb question: what's the name of an array that isn't associative? Indexed array? That is to say, one with a numbered index that starts at 0.
 
@Dharman what else do you call SQL injection?
that's input data making your shit behave in a way you did not intend
i.e. the data broke it
 
@Tiffany Numeric.
 
@Tiffany Numerical array
 
4:24 PM
Thanks
 
@DaveRandom SQL injection is a computer bug resulting in an incorrect building of SQL statements. It if often caused by reckless inclusion of data into SQL instead of keeping it separate and binding during execution
 
@Tiffany "array" :-P (the other being a map or table or ...)
@Dharman it is input data breaking your shit, plain and simple
 
Yeah, but not because you didn't sanitize it
 
don't define things, worry about their effects :-P
"input santisation" is a concept that should be taught in terms of "don't let your incoming data break your shit"
that's all that really matters
3 mins ago, by DaveRandom
imho, ymmv, etc etc
right I need to go out but will be back in a bit if you want to respond :-P
 
I don't really know where this concept of data sanitization originated. I can't find any serious information online about data sanitization in terms of making input safe to use. SQL injection is prevented by data parameterization, XSS is prevented by proper output formatting. There is no real unambiguous definition of input sanitization that I know of.
 
4:34 PM
because it's not a specific thing, it's a concept
 
@Dharman that's because it doesn't. and can't, exist. Making something safe depends on where that data is used.
 
like being a "web developer" is not a specific thing
 
But if it depends on where the data is used, then how can you sanitize the input?
 
and the definition of the concept, for me, is "preventing data from breaking your shit"
 
You have to employ techniques specific to the thing you are doing.
 
user13415013
4:35 PM
Guys when writing php programs in your work or learning,
What way do you prefer to use, OOP or functional?
 
@Dharman you sanitise it at the point of input based on what you are doing
 
@Dharman I don't.
 
Preventing a text input from allowing newlines would be input sanitization
 
every time :-P
 
Dave, Please share some good online resource that would support your claim
 
4:36 PM
[text](url)
:-P
 
@MarkR That's input validation
 
Not if you remove them it's not
 
@Dharman my brain is the online resource that supports my claim :-P
I do not have any articles up my sleeve, what I have is a decade of experience
 
@Dharman watch that talk. it covers it at scale.
 
Ok, but if your remove them then you are proving my point. You sanitize based on certain functional requirements rather than security
 
4:37 PM
(which I realise is not a convincing argument on its own)
but honestly I do know what I am talking about :-P
 
"You sanitize" - I don't. I validate on input, escape on output.
 
(^ or you use mechanisms which do not require escaping, such as parameterised queries)
 
I must have missed the bit which limited input sanitization to only security
 
btw if anyone can help me figure out how to implement RFC: is_literal that would be great.
 
@MarkR also that, yes
 
4:39 PM
Also wasn't this on reddit a couple of days ago?
 
Then let me repeat my point. "Input sanitization" is an ambiguous phrase that should not apply to security. It has nothing to do with security and people use it apply different meaning depending on the context
 
@Danack interesting
 
@Dharman I'd agree with that general statement
 
I can't see how you could do it in such a way that wouldn't be broken by $foo = $bar; juggling
 
I tried, I failed - not even sure that's an approximately correct approach.
Or what those things I modified are actually doing...
 
4:41 PM
my instinct is pointer tags on the zval, not sure if there are any spare bits left though
it only needs a 1 bit flag I think
 
@DaveRandom yep. That's what I tried. But attempt is no worky.
 
and presumably a bunch of logic in the parser, that's the tricky bit :-P
 
s/logic/magic/
 
@Danack Bob is the person who made me understand(ish) pointer tags, maybe ask him :-P
 
user13415013
Hey guys, I've finnally found problem.
got another question to ask.

What should i write to query when some id column in table is in autoincrement?

That was reason of problem
My insert statement was not working because of this
using ' ', 'none', none, all were not working, but using int 1 was working .

What should i pass to autoincrement values when inserting in database?
 
4:44 PM
Nothing, null, or default keyword
 
@bwoebi if you have time, I'm interested in pusing an 'is_literable' RFC and attempted to get it working through stuff I didn't understand, which didn't work. Can you give me any pointers on how to get it working?
@nerd you don't set that field on insert. DB does it for you.
 
"pointers" I see wot u did there
 
Can this RFC be split? I agree is_literal() sound nice, but I do not agree with the mysqli changes
 
I should have worked some... "my energy on this idea is flagging".....
 
user13415013
using nothing also didnt solve problem
Column count doesn't match value count at row 1
 
4:46 PM
@Dharman yes.....hmm....I thought I had already done that....let me check I haven't forgotten to push....oh wait, that's on another computer that like's out of arms reach....
 
user13415013
yes thanks
 
"Column count doesn't match value" sounds like the column count doesn't match the number of values you've passed.
 
user13415013
@Dharman , null worked :) Thank you @Danack :)
 
lol @ "spare_words.md" :-P
 
Don't include the AI column in the SQL. Just remove it
 
user13415013
4:47 PM
see you later guys. :)
 
Can someone help me close this question? stackoverflow.com/q/25196505/1839439
Someone bumped it up and now it annoys me
My close vote expired
 
cmb
The point is that secure_file_priv is set; otherwise the test would succeed. Is this comment outdated? /cc @Dharman
 
I fixed that today
Is it not included in PHP 7.4?
 
cmb
no, not in 7.4
 
yes, I tested it on Windows with MariaDB and MySQL and after my fix there were no issues
Maybe the updated test case needs to be ported to PHP 7.4 too
 
cmb
5:02 PM
I don't understand why the unpatched test succeeds on Linux, though. Ah:
SKIP MySQL PDO->prepare() and 1295 (ER_UNSUPPORTED_PS) [ext/pdo_mysql/tests/pdo_mysql_prepare_load_data.phpt] reason: secure_file_priv directory not writable: /var/lib/mysql-files/
That test isn't quite right.
 
Maybe you just have the environment not set up properly
Yeah, that test is... not great
 
 
1 hour later…
Wes
6:22 PM
turns out not all sata drives support hot swap
or rather all except the one i own, most likely
 
@Wes check this, it might help you understand this better youtube.com/watch?v=kfVsfOSbJY0
 
Wes
not a good time i just fried a ssd
 
a new one? or one with important data on it?
 
6:47 PM
I started looking at coffee machines, specifically those pod things.. who doesn't like pods. anyway I just discovered, because a machine mentioned having adapters for two different types of pods, that Nestlé created two different systems for 'pod coffee' that are different, and compete with each other.
what the shit is this
 
@Stephen the technical term is "rent seeking".
Anyone know if Hallmark has a card to congratulate someone on the occassion of the commencement of their second civil war?
 
Wes
@mega6382 no, it was new
i mean it either didn't support hot swap or it was already dead
in unrelated news, i hate that for a lot of people "hiding cables" is more important than having computer cases that are easy to clean
 
pretty sure even if it didn't support hot swap, (un)plugging a cable shouldn't fry any PC component since people stopped using ISA cards.
 
Wes
i literally have no way to clean my case unless i take out everything first
CABLE MANAGEMENT & RGB LIGHTS > PRACTICALITY
 
throw some liquid cooling in there also...
 
Wes
6:56 PM
high maintenance
i might make a hole with the angle grinder tho
just so that at least i can blow away the dust
jesus this is truly stupid
i am not too pissed for the hard disk, except i'll have to wait like january for the replacement (assuming they'll replace it)
 
7:17 PM
Is __PHP_Incomplete_Class something we still need to handle for enums or do we trigger the autoloader and throw if the class is not defined?
This would only be relevant when calling session_start() before registering the autoloader, I assume. Not sure how common that is.
 
8:12 PM
@Stephen this was a few years back, I think they removed it due to backlash, but I'm not certain. When Keurig started rolling it the second release of their coffee makers, they introduced DRM - meaning you had to use a Keurig-certified cup in their machines. They were trying to kill off the reusable cups. I don't think it worked out.
 
 
2 hours later…
10:16 PM
Guys anyone have any idea whether can we connect php slim framework with ms access 98 ?
I am trying to use php 5
 
@astrosixer perhaps with odbc
 
okay let me try it
 
how's 2005 doing those days?
 
quite good compared to 2020.....
 
10:43 PM
@GabrielCaruso Derick already answered, but I'll +1, Yes. "Rolling a Stable Release" is what github.com/sgolemon/php-release does for you. "Getting a Stable Release Announced" is still an essentially manually process (though specific steps have scripts). You should deffo have access to php-distributions, that would have been sorted months ago, but as Derick says, do get it clones sooner rather than later. It's hyooge.
 
11:20 PM
How to compile PHP 7.4 on Windows?
I think my dependancies are wrong, but when I tried to update them I got "Fatal error: Uncaught SDK\Exception: The passed CRT 'vs16' doesn't match any availbale for branch '7.4'"
 
cmb
@Dharman 7.4 wants VisualStudio 2017. You can install that side by side with VS 2019, if you like. It may work if you just use the latest 8.0 dependencies with VS2019, though.
 
The compiler threw a bunch of errors at me when I tried to compile with 8's stuff
Stupid question, but how do I install VS 2017?
 
cmb
visualstudio.microsoft.com/de/vs/older-downloads - seems they require you to create an account for older versions now. /S
 
ok, I see. I am trying to login now
 
cmb
might not be necessary; can't you select VS 2017 via Visual Studio Installer?
you could alternatively use the VS 2017 build tools (direct download of installer)
 
11:34 PM
Is this it? VC++ 2017 version 15.9 v14.16 latest v141 tools
 
cmb
yes
 
@cmb Ok, I got it installed. How do I use it to update dependencies?
 
cmb
basically, set up the path (phpdev\vc15\x64\php-src), and run php-sdk\phpsdk-vc15-x64.bat
 
@cmb What do I do with this error: "VsDevCmd.bat encountered errors. Environment may be incomplete and/or incorrect. ***
[ERROR:VsDevCmd.bat] In an uninitialized command prompt, please 'set VSCMD_DEBUG=[value]' and then re-run"
Is it ok to set it to any of the 3 options? What do they do?
 
cmb
Is VS 2017 properly installed? Can you open VS?
 
11:44 PM
I can open it but I don't know if it is properly installed
 
cmb
Could you create a C++ project?
In the VS Installer, you have to enable "C++ Desktop enviroment" (or something like that)
 
I think I didn't install that
 
cmb
Well, actually phpsdk_deps restriction appears to be overzealous; I just successfully built 7.4 with 7.4 deps on VS 16.
 

« first day (3709 days earlier)      last day (1244 days later) »