« first day (2057 days earlier)      last day (3116 days later) » 

17:03
say I have this in a php file pastebin.com/raw/w3Q3W0hm Is there any php that would clear the screen so the asdf isn't printed?
it's something with my network …
but I don't know what :x
E_TOO_BROAD :p
@bwoebi mine works...
I know…
Mine works too when I connect to the eduroam network
17:04
but not when being connected to internal network, for some reason…
hm..
wtf
I think there's something bad about the Fritz!Box Repeater…
If going through the other time capsule hotspot in the house it works fine…
user924016
@rdlowrey =) Im great thanks, not fired yet so all good
17:21
that's the spirit
        if ($delay <= 0) {
            throw new \InvalidArgumentException("Delay must be greater than or equal to zero");
        }
uhm … yeah
17:32
@bwoebi ...b...but...
@bwoebi (in the dual order)
@NikiC (hahaha)
@Trowski I'll investigate later, afk for now. So… you're basically leaking one zval per onReadable/onWritable watcher … I'll investigate why…
@bwoebi I think 0 is fine. :P
17:49
goddamnit. looking at a route for ten minutes wondering why the flying crap it is not intercepting the request.................... to realize I forgot the starting /
can this day end please.
Night, guys.
user924016
lol @FélixGagnon-Grenier it happens all the time shit like that
In DDD are the commands part of the domain or application layer?
well. I have no clue but if they're specific to the domain, wouldn't they be part of the domain layer?
18:00
I've had them in the domain layer but some of the handlers need to send emails which starts making me think the application layer would be more appropriate. What I do now is have my domain layer declare the interfaces and let my application layer implement it
Sending emails like activation link after signup etc seems like it is an application layer concern
Signing up, activation your account, recovering password etc all seem to be application level interactions really when I think about it
When talking about a domain expert about a problem they usually will not be talking about password recovery, activation links etc so it is not really a concern of the domain in my opinion
seems about right.
Going to have a lot of refactoring to do now
I always do this. Develop something for days, read an article that makes me rethink my implementation and I just can't stop myself going back and changing all the code just to make me happy even if it takes 3 nights up until 4am
0.02: think about it more. even if the handler itself may reside in the application layer, I don't think it shouldn't be called from the domain layer
(just in case you can save some sleep)
Yeah like it works perfectly right now but I just can't help myself from going back to change it all
This one won't be too bad though I think since it is just restructuring stuff
Changing some namespaces and service names
var elem = event.target;
var_dump(elem);
oups.
Hello I have a doubt ? What is IIS Express? What does it do ?
!!google What is IIS Express
I did but it was all too complicated :/ Could someone explain it in simple terms ?
18:12
@DaveRandom I bet you're proud
@bwoebi Haha, oops.
What idiot wrote that error mes... oh... I'll go...
@bwoebi The test fails with defer as well, so I'm not sure what's going on.
18:28
Okay I just figured out IIS is some kind of web server
!!rfcs callable-types
Well, regardless... 17-17, requires 2/3rd.... Not gonna happen, mate.
As far as losing votes go though it's a good one. Demonstrates that a non-negligible amount of contributors are interested in it.
18:51
Hello Everyone,

I was following this blog and I have downloaded PHP and extracted it to `C:\Program Files (x86)\PHP`

Now in the second step **Map FastCGI to your PHP location** when I run the second command
"C:\Program Files (x86)\IIS Express\appcmd.exe" set config /section:system.webServer/handlers /+[name='PHP_via_FastCGI',path='.php',verb='',modules='FastCgiModule',scriptPr‌​ocessor='"C:\Program Files (x86)\PHP\php-cgi.exe"',resourceType='Unspecified
I get an error
ERROR ( message:Malformed collection indexer; format is [@position,name='value',name2='value2',...]. The @position specifier is optional, and be '@start', '@end', or '@N' where N is a numeric index into the collection. )
I have Visual Studios 2015 so I dont know if that should make a difference
Guys I have IIS installed I just want to know how to make PHP run on it
19:10
I have an old mac laptop which, infinitely sadly, won't run phpstorm to save its life. Would anyone have a suggestion of a lightweight editor which won't make me want to quit coding for not having phpstorm? Apparently there's atom, not too sure.
Atom is good :)
Or just use Notepad++ :)
Ekn
Ekn
@FélixGagnon-Grenier webstorm/phpstorm sucks terrible on my mac so I tend to use atom instead
Wine + beer = sl;eepy
water = sensible
Ekn
Ekn
19:27
ugh I had too much coffee so far
even water is not sensible :p
Wes
Wes
evenings hodor
Ekn
Ekn
evenin'
Hello I got PHP working on IIS now how do I get it to work on Visual Studios ?
3
19:43
@Trowski @bwoebi is that lazy awaitable still a thing? I think I have a use case.
19:53
We could make requests in Aerys contain local that's a promise that gets the currently authenticated user, but only if it's needed.
20:06
@Fabor fapore = pussy
Cmon you don't have bay reason to do sensible...
Source: me
Bay == any
hello
i uploaded file in CI but its continously give me an error
Array
(
    [error] =>

You did not select a file to upload.

)
any suggestion
i fixed this
$this->upload->data()); to $this->upload->data('myFile'));
but still get the error
the issue is fixed THanks
@SajjadKhan ci better be continous intargration
@PeeHaa I'm very new to CI so now not able to figure the exact problem
user924016
/me guesses CodeIgniter
Noooòoooooò
.com
@SajjadKhan sounds like the perfect moment to run
Or cry
Whatever you prefer
20:30
Hey. Room 11.
Should I write a long rant, as a blog post, about why union types are not the answer?
Ma'am 0/
I mean I'd feel awful about being so publicly against it, but…
Yes you should and no I might not agree @Andrea
okay.
Let's do this
\o/
20:39
good morning
@Machavity oh right, yeah, Anthony's written some good rants :)
@Andrea Still #2 for "Toxic kindergarten" (despite misspelling it to boot)
@Machavity oh my god I never noticed the misspelling, haha
Toxic kindergarden
@Machavity I mean, it wouldn't be PHP if it was spelled correctly! ;)
isn't it "mispelling"?
20:47
@FlorianMargaine mis- + spelling, misspelling.
@Andrea php_real_toxic_kindergarden()
6
@Andrea I still thought one of them was gone
@FlorianMargaine in pronunciation, yeah, but I think the letter's still written
@Orangepill heya orange
@FlorianMargaine It's the very definition of irony. It's one of the most misspelled words in the English language for that reason
20:50
@Machavity misspelled or misspelt? :D
Mispelet
@FlorianMargaine Depends if you're in Mississippi :P
@kelunik Yep, still a thing. Amp\lazy()
Can anyone find the error in this SQL statement?


$tables[] = 'CREATE TABLE data_types (
id TINYINT UNSIGNED NOT NULL,
name VARCHAR,

PRIMARY KEY (id)
)';
I've been trying to figure it out ad narrowed it down to this statement as the error
ThW
ThW
What's the error message if you exercute it directly?
20:57
@PeeHaa did you get my previous ping?
Anonymous
!!rebecca
@Jeeves Can we remove that please?
Anonymous
Nope haha
Anonymous
Good boy @Jeeves
20:59
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' PRIMARY KEY (id) )' at line 3
@samayo No, it's not even hidden. It's oneboxed. And that multiple times a day. That's boring and spammy.
/cc @PeeHaa @DaveRandom
Anonymous
Yeah you are right
@kelunik the naming one?
@PeeHaa yup, and that PR in general.
@kelunik i am "working" on an undo but I would pefer outtight abusers tbh
Anonymous
21:04
@user2800382 do as the message says and check if you have any syntax errors
@PeeHaa So anyone using !!rebecca on fridays?
I did! I can't find any syntax errors in that statement. It's so short!
is data_types perhaps a special word in mysql?
@kelunik am I allowed to come back at you tomorrow so that I will have a more sober view?
Anonymous
Nope let's see it
Anonymous
all of it
21:05
@PeeHaa yes, sure.
0.2.6 was just released yesterday, so we have time to release 0.2.7.
@kelunik no not really. But if people are annoyed > "usefullness" I am more than happy to take any action
Anonymous
@user2800382 remove unsigned and try again
@PeeHaa We could just grab a random PHP tweet instead of the onebox.
still smae error with unsigned.
I will try to re-tpe it up lol
re-type*
Anonymous
Try adding constraints, Id 11, name varchar 255
21:14
ah 'name' is the reserved word
that was the problem!
try with backticks around name
@kelunik would work for me
I'm out for today. Cya all tomorrows o/
My php code is not executing
Anonymous
@user2800382 I doubt that alone was the issue. In any case use back ticks next time for your column names
My php code is not executing and I have no clue why
Anonymous
21:21
@NathanMarotta maybe the code is innocent
The code Is not being read for some reason
Anonymous
Let us see the code
@Andrea Nice, I'll have something to disagree with :-D
Anonymous
If it's small, dump it here; if not use pastbin
<?php
session_start();
$_Session['NUMBER'] = $_Session['numberOfWrongAttempts'];
if($_Session['NUMBER'] > 1) {
$msg = "SHOW MESSAGE";
}
?>
21:24
@samayo what else do you suspect might cause such a problem
I will paste it here
but what I just pasted was the only thing causing hte problem.
$_Session['numberOfWrongAttempts'] changes throughout the code, the number changes correctly, the problem is it isn't displaying anything on the page
I think it is something with the scope
@Andrea But I definitely appreciate if you rant about it … so that I can show up why it's still fine.
Anonymous
@NathanMarotta everywhere you use the $_SESSION array, session_start() must be accessible to it
It is
here, will show you
session_start();
$function = $_SESSION['function'];
$_SESSION['NumberOfWrongAttempts'] +=1;
it is not reading that number for some reason...
Anonymous
first assign it to a number then increment it
Anonymous
21:37
Also $function = $_SESSION['function']; has no purpose in your example
Anonymous
session_start();
if(isset($_SESSION['fails']))
$_SESSION['fails'] +=1;
else
$_SESSION['fails'] = 1;

echo "error counts= ". $_SESSION['fails'];
Anonymous
Something like that.. Sorry can't indent (on mobile)
Anonymous
@user2800382 not much it seems okay to me
Ekn
Ekn
ugh, what here installs php5 stuff??
@Ekn php-gettext?
21:45
is not working @samayo
Ekn
Ekn
I ask for libapache2-mod-php7.0 and get libapache2-mod-php5 - php5-cli etc for free :p
join other chat, so I can explain more.
Ekn
Ekn
and I have to a2dismod php5 and enable 7 to make apache use 7
not sure if it's gettext because of this ^
user924016
hey @samayo dont know if you got that last msg..
Ekn
Ekn
I think regex just includes them all: gist.github.com/ekinhbayar/…
Anonymous
21:52
@RonniSkansing sort of, directory traversing if done with the most unlikely methods will still only upload valid images, so the only overwriting happens between files uploaded by BF. Since no file will be uploaded outside bulletproof' a folder
user924016
When I tested i uploaded outside of the project
Anonymous
But still in the same folder BP created for it right?
user924016
no
user924016
if i had the structure /home/wow/foo/bf/uploads/ .. and use setName('/../../wow.jpg') .. it saves to /home/wow/foo/wow.jpg
Anonymous
Hmm, but you have to wander who would instanciate the class pass $_FILES['upload']['name'] as a value for setName()?
Anonymous
21:57
That's crazy
user924016
sure
user924016
any user submitted name
user924016
which has not been validated.. does not matter if it comes from $_FILES
user924016
but you do some kind of validation in the function
user924016
which might confuse one to think that your method handles sanitization of the input
user924016
21:58
I am not saying it oh nooes and all that, I just got the impression that you did not think it was vuln to directory traversel and escalation via setName
user924016
=) (wall of text)
Anonymous
Yeah I guess if user have an image name field and uses the value to pass to setName directly that could get ugly quick
Anonymous
Yeah I mainly focused on validating the image mime type
Anonymous
But this is a good idea now that I think of it
user924016
I got some other fun image attacks laying around somewhere here
user924016
22:00
like a image file with the size of 15 Kb but internally declares itself to be 8GB of data
Anonymous
That would be nice to see also :)
user924016
let me see if I can find it
Looking for feedback on adding an iterable pseudo-type: github.com/php/php-src/compare/master...trowski:iterable
Anonymous
But those kind of gotcha-hacks only serve to waste the time of the person making them
Anonymous
They are not real exploits
Wes
Wes
22:01
!!should i get a coffee or go to sleep
You should get a coffee.
Wes
Wes
i hate you jeev...
@Wes @Jeeves never wants to let you sleep.
Uhm…
Under which circumstances are hashtables shrunken?
@bwoebi never :D
user924016
22:03
@samayo what do you mean? oh nvm =) I know what you mean
@NikiC ugh
here comes my memory leak <.<
@bwoebi That would explain what I was seeing.
god I'm in the same pit I was when I tried to do the scalar types talk
@Trowski it does
Why is this variable not being printed??
22:04
the word type means so many things
@bwoebi So it's not a leak exactly, as the memory will be reused.
@Trowski yes, the test is bogus…
It does make testing it difficult.
I've initialized the first call with $cb(500);
and then $cb(10000);
Maybe initialize with the same amount and see if more memory is used?
22:06
I'm doing that right now…
user924016
I found that file @samayo its a pixel flood attack.. basicly just upload it via your form and watch the resources go empty.. continous upload in some cases lead to dos via. resource starvation
seems to pass
user924016
dunno how to send it to you
Excellent.
Wes
Wes
@NikiC not even when you do
$a = [giant array];
// remove half of entries from $a
$b = $a;
$b['cow'] = 1; // add something
imho it could trim to count when coying
22:06
@Wes Well, of course
@Andrea @NikiC @bwoebi Thoughts on an iterable pseudo-type: github.com/php/php-src/compare/master...trowski:iterable
4
Wes
Wes
so it's not never :P
@Trowski pushed…
@Wes actually not sure on that "of course"
@Trowski interesting! that's a nice solution to the array|Traversable issue. not my preferred one, but.
22:08
depends on how the copy is done ^^
@Trowski might want to remove the ReflectionParameter stuff, we're kinda ignoring it now that ReflectionType exists
@Andrea It is a bit of band-aid, but if we add a proper solution the iterable type could cover those as well.
@Andrea Ah yes, when isCallable was added ReflectionType didn't exist.
Wes
Wes
@Trowski <3 why a new keyword tho?
@Trowski right, and we didn't add isInt, isFloat etc. after all
@Wes This might be a blocker for 7.1.
22:12
@Trowski you don't need a full keyword
just a reserved class name
And yes, I'd say iterable is an option
I'm not sure whether making array instanceof Traversable would be better or not
@Trowski What about 3v4l.org/5X987?
@NikiC I just copied the way callable was implemented.
@NikiC that's my plan, it's more work to do though
@kelunik definitely not iterable
That's usual PHP stupidity, not "iterable"
Wes
Wes
@kelunik no pls
22:13
@kelunik plain objects not being Traversable is for the better
It's foreachable. Often used for StdClass.
it shouldn't be
This is actually pretty much the whole reason why I'd want this in the first place
That is a good point though... technically any object is "iterable", just not in the sense most people want.
22:14
right, to specify the category of things that should be iterable
@kelunik how often do you foreach a stdClass :o
@bwoebi We did it for all the other repos :-P
@bwoebi @Trowski You forgot to change tabs to spaces. :P
@kelunik Next commit :-D
that one is fine I haven't realized that I used tabs…
22:16
@kelunik At least one positive change in there!
@Trowski fix the other ones!
@bwoebi That is my biggest gripe about PSR-2
@bwoebi Sometimes with json_decode.
@Orangepill I've used PSR-2 for so long that I just got used to it, but after writing code for Amp I much prefer the consistency of always putting the opening { on the same line.
22:17
@kelunik in these cases you unpack it just into assoc arrays instead of objects
I can not find my error
Let's just remove all places that use stdClass and replace them with an anonymous class.
@bwoebi No, because then you can't diff between maps and arrays.
I start sessions in every page, and they are the same ID
yet variable is not the same on each page??
@kelunik uhm… our arrays are maps… or what do you mean?
22:18
Why treat a block of code differently just because it has a name? If you are going to put the opening brace for a function on a new line the same should be done for an if statement.
@bwoebi That's exactly the issue. In JSON they're two different things.
@kelunik right, but it doesn't matter in PHP
@Orangepill Because it was decided by a vote, not by logic :-D
One is a unordered list, the other a map.
you mean ordered list
@Trowski no, because it was decided by survey
22:20
Parsing JSON into objects is too fragile in PHP
user895378
@Trowski Agree ... I really like the opening brace on the same line but I honestly can do whatever other folks prefer at this point
Can't even have an empty key
@bwoebi I'd like your thoughts on iterable before I writing an RFC or sending an email to the list, since it in some ways conflicts with the goals of union types.
@Trowski all the new type hints are implemented as reserved class names. callable is just old :)
@NikiC It is?
@NikiC Nobody really needs that.
22:22
@kelunik I'm 70% confident people need "arbitrary keys" more often than a strong distinction between lists and maps
Even if they may not realize they need it
@NikiC Could you point me to some example code of how that was done?
@Trowski well, I'd prefer to not have a counter proposal until end of union types vote … well, It's not actually a counter proposal and I may even support it (yes, on top of union types) … but others might understand it as such
dunno … I just want unions to pass :-D
@Trowski Basically you add it to lxr.php.net/xref/PHP_TRUNK/Zend/zend_compile.c#147 and the builtin_types list a few lines down
@bwoebi Exactly. If I can wait until after union types and still have time to get it in 7.1 I'll wait.
@NikiC Wait, why can't you have an empty key?
22:24
@Sherif It's converted to _empty_
And some more exotic things will error outright
@NikiC Yea, my question is why does it convert it to empty?
@Sherif Ostensibly, because of property name mangling. The plan is to drop that particular stupid for 7.1...
@Sherif because the null byte is first char then
@bwoebi Ahhhh that's what I was forgetting
heh
@NikiC And leave it out completely instead?
22:26
@Trowski I think it would be good to have it on the table, but only vote it later
Because it's a valid discussion point
I was about to say, wouldn't an empty hash still result in the DJBX33 magic constant?
@Trowski I'd like to see it now, as it lowers the chance of unions. :P
@kelunik :-P
I.e. relating as to whether we'd prefer this approach of handling specific common cases with dedicated types, or have general union types
It shouldn't look like union types is the only solution to the problem
I haven't decided if I like union types yet... I'm leaning toward no since we have nullable types.
22:29
@NikiC to this problem not.
@Trowski So just put it on the table and defer the vote.
@NikiC Maybe the better solution is to have a JSON interface, where all json_decode results must implement that interface. That way you could perhaps just do magic getters to avoid building the properties as hashmaps?
Instead of an stdclass or array return a JSON type or something.
@Sherif If maximum fidelity is your goal
I don't actually understand the problem of unions. People who want to expect mixed types already do now. I've never seen an API redesigned, just because one was unable to type something directly in the language. … It's nothing but annoying.
@NikiC Should there be some other goal?
22:33
@Sherif Er, usability?
For the 95% use case unpacking into arrays is fine
JSON is not a good full fidelity format anyway
@NikiC But what about having a JSON interface makes it any less usable?
It's way too under-specified for that
@Sherif Because it does not integrate
I'm just talking about having an interface between PHP and the JSON serializer.
That way the serializer didn't have to make those kinds of decisions.
Wes
Wes
may i ask your opinion about something guys? i was thinking to change icu functions (currently working with UTF-8 only) so that they allow to specify other encodings. for instance grapheme_strlen($strInput, $encoding = 'UTF-8') (notice how it defaults to UTF-8 rather than some user setting). i was looking at the code and i think i could do it. it is quite wrong having to convert charset every time just to use these functions. opinions?
When using PDO can one have mutltiple VALUES arguments?

for example

$sql = 'INSERT INTO foo (x, y, z) VALUES (:x, :y, :z); INSERT INTO bar (x, b, c) VALUES (:x, :b, :c)'
22:34
json_encode(json_decode($foo)) is exactly sane in PHP
I get a parameters error
Aren't you proposing to actually wrap every single decoded compound or atom structure into its own object?
@Wes But ... but ... UTF-8 is the one true encoding!
@NikiC I'm proposing, instead of json_decode() returning stdclass by default, why not make json_decode() capable of returning an object that implements a standard JSON interface. That way quirks like empty property name didn't have undesirable results. The implementation is left up to the user.
Wes
Wes
Feb 24 at 23:56, by NikiC
@bwoebi There is only one true encoding
Feb 24 at 23:57, by bwoebi
@NikiC yes. Utf-32, I know.
i have good memory :B
@Sherif I don't understand how that's supposed to work
Especially the part about it being an interface
Rather than a concrete implementation
Do you mean that the interface specifies how the object will be populated?
22:38
@NikiC Correct
Ah
Wes
Wes
anyway niki, i'm attempting to do it only if there is a chance for it to be accepted into core. does this chance exist or it's not going to happen, in your opinion? :B
So realistically speaking, add a callback that allows you to control decoding
Example interface JSON { public setPropertyName($name); public setPropertyValue($value); }
Wes
Wes
example? oh, you were answering to sherif
22:40
jakub recently added json parser callbacks internally
Oh does that exist already?
Did not know that was a thing.
@Wes In my opinion, it's not going to happen.
@Sherif Only internally though
@NikiC Well, then it shouldn't be impossible to expose the internal hooks to userland, right? Much like we did with mysqlnd.
@Sherif not impossible. likely still not worthwhile, as the uses are narrow
22:43
Sure, they're probably narrow in scope.
@Trowski yeah, looks good
@Sherif This is the PR btw github.com/php/php-src/pull/1904
@NikiC oh it's just in master
I see
Wes
Wes
@NikiC that was my impression too, but it's probably a the consequence of the idea that since unicode string handling in php is quite chaotic, it's better if php had functions that work with one encoding only, just to reduce the chaos

« first day (2057 days earlier)      last day (3116 days later) »