« first day (1955 days earlier)      last day (2990 days later) » 

4:00 PM
@NorthbornDesign So if I want to find out what happens on a given url, I have to dig through all your handlers and logic to find out what is called?
 
@Gordon basically, yeah ...
 
ok. cool
 
@NorthbornDesign why is foo's handler trying to match bar or qux instead of your router/dispatcher?
 
@Patrick Arguably, yes, but the digging is rather shallow.
 
@Nanne when i google the differences between the two, it's everyone asking why they should swap (the i stands for improved), but no where do i find the actual little differences like i said in my earlier posts.
 
4:01 PM
What exactly are your handlers doing? Are they doing more than just gluing your app to http?
 
@PaulCrovella Because the routes aren't in one place. Each handler is an application, each application has it's own routes.
 
I wonder if there's a list of which functions changed usage..
 
I struggle to see the benefit of calling more than one handler for a given request
 
@Patrick Because middleware, handler reuse, etc.
 
@NorthbornDesign Alright. Then why couple the handlers at all instead of just calling them in succession until a response is returned?
 
4:04 PM
@CasNouwens I wouldn't try to do anything that handles all the calls as the same. Just rewrite and use the manual to see how it should work. Don't try to replace blindy with a list-of-changes in hand. Also, if you're coming from a codebase that's that old, mabye you want to do more changes, like use PDO ?
 
@Patrick Well, that's sort of what happens. Its no different than any list of "routes" to be matched, first one wins. But instead of a one-dimensional list, it's a tree.
So it recurses.
 
@NorthbornDesign i mean call them in succession from the outside. not from inside each handler
 
Ah, yes, that's what I was referring to by iterative as another solution ^^ up there.
That's a consideration I'm making, but an overhaul-refactor.
15 mins ago, by Northborn Design
Anyway @PeeHaa and anyone else; each controller construction/invocation is like a sub-application being initialized and run. How am I to inject dependencies automagically if I'm not passing the injector down? The only other way I can think of is to change the implementation detail of the way each handler is constructed/invoked so that it is iterative, and the injector lives at the top level (where it "belongs")
 
That's definitely much more reasonable than construction inside the handlers
 
And it reduces stack depth... but now I have to do more work.
lol
 
4:07 PM
At least you won't get killed by your successor
 
Well, my successor is likely to be 6-months-from-now-me, which bodes poorly for now-me cause I'm a sadistic jerk. I should probably save myself from myself.
Iterative it is.
 
helloooo how to find homepage in addons in pyrocms
 
thank you
 
@JoeWatkins :D
 
4:23 PM
that is... an interesting approach
 
@NorthbornDesign then each application would need a/the dispatcher so it could register its routes and kick the request along
 
@JoeWatkins Help me, I'm being chased by a pack of superglobals!
 
what is this life?
 
Adobe adventures continue.
System: Here's a callback URL adobe. Let me know when someone signs a document. There should only be one signee, so I should only get one hit from y-
Adobe: Someone signed. Someone signed. Someone signed. Someone signed. Someone signed.
4
 
twad3o al3chran
 
4:37 PM
Is it still common to host your own mailing server for your apps? Or do people mostly use things like Google App Engine now?
 
@PaulCrovella The issue with registering routes at the top level is that routes are context dependent; A -> B -> C means a different request context for C than Q -> X -> C. In other words, nested handlers need to know about who called them, and there can be many many many permutations.
 
@NorthbornDesign why do you have sub-handlers called by multiple top-handlers?
 
Because reuse.
C can return a record/records without context (invoked directly) or with context (invoked from a handler) wherein the context may provide additional conditions on its operation.
 
@NorthbornDesign "How am I to inject dependencies automagically if I'm not passing the injector down?" Use Tier - that is the exact use case it was designed around. Each 'tier' of the application either says "i've handled it, stop processing the request" or says "I've handled my bit, and I know this is the thing that needs to be executed next, an here are some more things to be added to the DIC".
@FlorianMargaine An easy example to understand is imagine having a different router used depending on whether the request is coming from the general internet, or from an IP address that is fixed to the head office.
 
hey guys!
 
4:43 PM
The first 'router' just looks at the ip address and then tells the DIC, "please use the 'InternalOfficeRouter' when anything asks for a Router", or if the request is coming from outside, it says "Please use the 'OpenToTheWholeInternet' router".
 
@NorthbornDesign as far as C is concerned, all that "context" is just arguments in the request - it doesn't actually need to know who invoked it
 
And then the 2nd level of dispatching actually uses that router.
 
@PaulCrovella Yes, but the outer handler may do the dirty of middleware tasks, as well as loading/constructing things to be passed into the sub-handler.
@Danack That's essentially what I'm doing now, kinda. Except with the recursive calling. The injector is modified (immutable; mutate-cloning) and passed into the next handler. Transitioning to a iterative approach, where each handler passes back the next handler (or the response if complete) I can also pass back new rules/definitions for the injector's subsequent builds.
Looking at Tier now.
 
I think the iterative calling is the vital step in having sane apps that do DI cleanly, without having either to either pass service locators around, or just doing comical things like Symfony does with 'Contexts'.
 
4:47 PM
It's beginning to appear that way.
YIELD ALL THE THINGS!
 
...it doesn't actually use generators btw.
NORMAL FUNCTIONS ALL THE THINGS!
 
lol
YIELD NORMAL_FUNCTION_CALL(); // ALL THE THINGS
Seriously though, will delve through Tier and incorporate or homebrew around it's intent as needed. (with attribution of inspiration of course)
 
I probably need to update the skeleton app....will ping that to you once it's done.
 
Sure thing, thanks!
 
Hi short question about mysql
I want to add a new column of the type datetime to some table
alter table myTable
add newColumn datetime;
is this the correct way to do it?
 
4:58 PM
@NorthbornDesign That took significantly less time than I thought it would: github.com/danack/TierJigSkeleton It doesn't do a lot, it just shows how I wire up config files etc, and then actually invoke an application.
@trilolil What happens when you try it?
 
I am affraid to try it x)
I am very new to mysql
and don t want to screw things up
 
tier.phpjig.com/designDecisions/noEvents @Danack little typo "...XML documens."
 
> Prevent yo dawging inside exception handler.
 
cause there is no ctrl+z
 
@NorthbornDesign I herd you like exceptions....
 
4:59 PM
@Danack That is a beautiful message.
 
@iroegbu ta - my keyboard is getting a bit flaky....
 
@trilolil make backups. also set yourself up a sandbox to play and test things out in.
 
how can I make a proper backup of a mysql database?
just copy all the files?
or is there some specific way to export everything?
 
why don't you try using Google a bit?
 
@trilolil top-tip. Everyone learns by just trying it and then seeing what sticks. And also, you need to use google first, and then only ask other people if you really get stuck.
 
We aren't here to spoon feed you help.
 
kk
 
really?
That's the feedback?
 
uhu
 
5:03 PM
čau
 
@trilolil not you....
 
I just looked at the latest commit to see what was "took significantly less time than I thought it would", saw this oddity
 
my bad
 
@trilolil have you tried this link?
 
K - giving me feedback that I have whitespace in my code where not needed, does not provide me with a warm and fuzzy feeling.
 
5:05 PM
@tereško gr8, appreci8
r8 8 out of 8
 
almost 5/7
 
lol
a perfect 5/7
 
@trilolil I'm sorry. If I knew you were suffering from writing impediment, I wouldn't have made fun of you.
 
plz no h8
 
5:19 PM
does anybody know why now() returns
0000-00-00 00:00:00
in my mysql database
?
 
@trilolil The zero-date is usually an indicator that the date/time specified is invalid. Why NOW() would return that, I don't know. The only thing I can think of is that something about the systems / mysqls date/time/timezone setup is invalid/incomplete.
 
ok ll check thx
 
You might be better off posing theat problem in MySQL specific channel.
It could also be that you're not executing the SQL you think you are (for example, you might be escaping the function call "NOW()" into a string, instead of executing the function)
 
is there a way to resize a submitted image using PHP?
nvm!
 
5:40 PM
Could someone tell me if this flow works; create temporary folder with unique name, write files to this folder, create a zip of this temporary folder probably in the same location as the folder, and then send zip to client to be downloaded.
I guess it doesn't have to be temporary since I'm gonna have to run some script on routine to clean up this directory of folders/zips.
 
5:54 PM
Howdy o/
 
The mkir() is not working for me. Everything I've read suggests looking at the permissions, but the files live locally on Windows, so there isn't a CHMOD I can access. Any ideas?
 
Hows is it not working?
Do you get a warning?
 
@RonniSkansing I had a typo. Thanks for making me recheck. So stupid I am.
 
6:15 PM
3 hours ago, by PeeHaa
Can't you just pass the data from the controllers around instead of the SL?
Sorry. Was afkish. But yeah don't pass the injector around
 
6:30 PM
morning
 
Morgen @kelunik
 
This code is ugly, can I write it more pretty?
$pingedperson = $_POST['pingedperson'];
if($pingedperson && $pingedperson != $_SESSION["Id"] && $pingedperson != $author_id){

} else {
	$pingedperson = null;
}
 
posted on February 22, 2016 by nlecointre

/* by serviet */

8
 
6:59 PM
What's the best way to apply htmlspecialchars() to everything inside $_POST?
 
Manually when needed
 
Yeah, I was doing that, but it's already like 50+ lines that have that function. It doesn't seem very elegant.
 
Wrie a context aware escaper :-)
 
Oh gee thanks lol
I'll just do it manually or make a loop that just saves over the orig value post-function.
 
I hope you are not talking about overwriting the POST superglobal because that is terribad
 
7:05 PM
Haha I think that's what I was talking about. Manual it is since you scared me!
 
boo
 
@JoeWatkins Scary morning.
 
ohai watkins o/
 
hehe morning @Charles
moin @PeeHaa
 
why is he using htmlspecialchars() on $_POST?
 
7:19 PM
Hey, everyone...
You may find it humorous, but I am having this doubt..

I created a database through phpMyAdmin... Created a user and set its password.
Now, whenever I login through CPanel, phpMyAdmin gives access to the database without any prompt for password.

Is it because I would have done some error while setting the password?
Or phpMyAdmin gives access to database after logging in through cpanel?
 
@Saurabh because phpMyAdmin is still using the default user (that doesn't have a password set)
 
@iroegbu: Do I need to set password for default user as well?
I mean, if I keep it without password can it be a security threat? (Assuming CPanel password is known to me only and is secure enough)
 
-1
A: pthreads for Visual C++

SergeyADon't worry about signals - they do not exist in Windows anyways, and all you are doing is blocking alarm signal. You can just dummy this call out.

:o
 
I used to think "olfactory fatigue" was "oldfactory fatigue", because when you're old and have worked in a factory for a number of years, your sense of smell weakens from bombardment of chemicals and smoke.
 
Good evening all
please how do i make pdo display errors i've tried PDO::ERRORMODE_WARNING;
 
7:31 PM
Let it throw exceptions
!!canon sqli
 
2788
Q: How can I prevent SQL-injection in PHP?

Andrew G. JohnsonIf user input is inserted without modification into an SQL query, then the application becomes vulnerable to SQL injection, like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the us...

 
That should give you an idea on how to set up the connection
 
but it's not working because i altered one of my binded parameters and it just fails silently
@PeeHaa you mean having a try except?
 
read the post and the code in the linked post
No you don't need to use exceptions, but it will make your life easier.
Also enable php's error reporting
 
I'm trying to deploy my php site (zend framework 2) on apache / windows server. However, only my layout is loading for the base URL and everything else will 404. Anyone have an idea? The apache logs show no error.
 
7:41 PM
@PeeHaa, thanks it working now
 
\o/
 
o/
 
\o
 
@PeeHaa stupid facebook. It ought to be 1.0.0 now!
 
Dat version bump..
 
7:45 PM
they just wanted to skip 6 too and overshot a little
 
@PeeHaa. i'm a prodigal son that just came back home to php
eloped with python
it's been ages since i even did any php
 
It should be a bit better less crap by now :P
 
@danidee get out ...
 
:-D
 
@PeeHaa There are too many preconceived notions of what v1.0 is. We're still following semver. We're just communicating stability by moving the 0 from the beginning to the end.
 
7:49 PM
I kid, I kid :)
 
@MadaraUchiha you'll be happy to know that I've now refactored all my code in this app to use the repository pattern
 
@danidee Pro-tip: The MailingList interface is awesome but don't look at the implementations, especially InternalsMailingList, or you'll find yourself writing Python again.
 
@JoeWatkins :( :(
@Northborn ok will definitely check it out
 
you know what'd be super great? being able to specify that (and type hint against) elements of a traversable come in a particular type
also enums and structs
 
i don't want to combine python and php when i could just do it all in php...though it might be tempting
 
7:55 PM
 
@Andrea Rejoice!
 
@Machavity Only if it runs inside v8!
 
@Machavity i dont' think the team leader is up for that. he seems to hate everything outside php
ps. i just got a new job
 
> State: alpha Release Date: 2008-02-17
i'm sure it'll be fine
 
@danidee Your team leader and mine are polar opposites.
He hates everything inside php :D
 
7:59 PM
@Madara, i just hope he's not gloomy and cursing php all day
 
@danidee so long as he equally hates everything inside PHP, then it will be fine.
 
@MadaraUchiha Isn't that the purpose of Room 11?
 
/topic Support group for those afflicted with PHP
 
@danidee he sounds like my kind of guy ...
also, every time someone uses the python module, a fairy cuts the throat of a unicorn and then feeds herself into a mincer ...
 
sup
 
8:08 PM
yo @ircmaxell
 
o/ @ircmaxell
 
morning
 
room topic changed to PHP: Support group for those afflicted with PHP. Don't ask to ask, just ask. Chat Guidelines : room-11.github.io [php]
8
 
this room just confirms something a friend told me
 
> XML is like violence: if it doesn't solve your problem, you obviously aren't using enough of it.
@danidee what's that?
 
8:11 PM
python programmers are not fun to be with and arrogant :)
this room is very lively
 
sometimes we even discuss php ...
 
Wes
evenings \o
 
we were just doing a little survey in our heads about the programming language that has the most 'un-fun' programmers
 
I got to meet Anatol on Thursday
 
8:13 PM
@Wes o/
 
really nice guy
 
did you survey assembly programmers ... because that would be kinda unfair :D
 
'un-fun' i don't think that word even exists :) hahaha
 
@ircmaxell yeah, you can tell ...
 
@AnmolRaghuvanshiVersion1.0 heheh
 
8:13 PM
evenin Wes
PeeHaa :D
 
hey so
 
@JoeWatkins i personally don't know any assembly language programmers or where to meet one
 
I have a User object, with ->hasUserId, ->getUserId, ->setUserId methods
I want ->getUserId to throw an error when $userId (internally) is null
 
i don't think they're even on SO
 
@danidee it's a thing you don't admit too ... like writing in Java ...
 
8:14 PM
any suggestions as to what exception class to use?
@JoeWatkins oh come on, assembly is AWESOME :D
REWRITE THE ZEND ENGINE IN ASSEMBLY. WITH AT&T SYNTAX JUST TO UPSET ASM PROGRAMMERS.
 
we talked about a lot of things, including Rust and GoLang. So I'm sorry if I've lost you another core contributor :-P
 
@Andrea /s/ZEND ENGINE/LARAVEL & JQUERY/
 
@ircmaxell is kicked by PeeHaa
 
/me rejoins
 
@ircmaxell he's so far in, I doubt he can even see a way out ...
 
8:16 PM
I know, I was just teasing about losing
he's not going anywhere
 
@JoeWatkins. i disagree java programmers are very proud of their trade
there was a video i saw on youtube sometime ago where different languages had human personalities
java was a bearded pot-bellied man talking about how he has a very strong standard library and is everywhere
 
I like the guns one
 
@ircmaxell You should phrase it as liberating Anatol from the chains of darkness. Or something.
 
if you self identify as a Java Programmer, then you're obviously okay with it, but I meant the rest of us who self identify as just Programmer ... most of us probably have and or do write in Java, but we don't talk about it, or self identify as Java Programmers ...
 
8:21 PM
@PeeHaa That looks ... entirely accurate ^^
 
@ircmaxell maybe someday I'll actually create a language I like
2
 
@PeeHaa lmao
 
I especially like the backwards knife for C++
 
@NikiC even from that angle, C looks nicest ...
 
my previous attempt didn't go well because I was trying to create something in a paradigm I neither understood nor was really very invested in
 
8:21 PM
A scope on a knife is the funniest thing.
 
@PeeHaa you forgot php
5
 
ALSO TYPE SYSTEMS ARE HARD
 
hahaha
 
lol
 
8:22 PM
that belongs on a t-shirt ...
 
@JoeWatkins with the PHP logo :p
 
of course :D
 
@NikiC lol
 
@ircmaxell Are you hiring him? :D
 
8:31 PM
 
@Andrea Ha!
Alright, back to work for me.
 
yeah, you are spoiling yourself with these 40 second breaks @LeviMorrison :D
 
@Andrea Dang UTF-8 encoded paper
 
8:51 PM
@LeviMorrison nope
 

« first day (1955 days earlier)      last day (2990 days later) »