« first day (2924 days earlier)      last day (2027 days later) » 
00:00 - 17:0017:00 - 00:00

12:00 AM
(I've read a lot of tutorials)
I would like to give you an overview of what I've tried
 
Maybe start by saying what doesn't work?
 
Ok. What I'm trying to achieve is pretty simple. I want to add a breakpoint in my code and trigger it by navigating in a browser.
However, the Browser and PHPStorm are not connected
It's a WordPress plugin using AJAX, etc - I mean, I don't know how to replicate the conditions to run it outside the browser
That's why I'm not debugging in Console
Does it make sense?
I have to take actions as a user to replicate the request
so I need breakpoints that stops in a real application
 
Yes, but explain in specific what doesn;t work
 
In the topbar, before you can click in "Run (F9)" or "Debug", I have to configure the Run/Debug Configurations, right
 
Douglasbep – #77029
 
12:08 AM
There, I click on "Defaults" -> PHP Web Application and configure the server as my host, such as myproject.localhost:80 (Debugger: Xdebug)
Omg, I'm lost - just realized that it's still greyed out
I mean, how do you learn PHPStorm?
 
How do you learn any random application?
 
Just realized it seems to be trying to fetch data from my computer outside Vagrant environment and failing
I'm gonna read some stuff about PHPStorm + Vagrant
I mean, trust me, coming here was a last resource already
Been bashing my head with PHPStorm for a while now
 
Setting up xdebug can be annoying
 
12:36 AM
setting up phpstorm to work with xdebug and a server on a LAN is next to impossible
how effectively can I do this? on the production server, I have git set up behind the public_html folder, so when I clone to my development server, it clones the public_html folder inside my development server's web root. This causes me issues with css/js files when I include them to pages because in the development environment I have to add public_html to the path, but when I push my changes to production, since public_html is the web root on production it screws me up
is there a way I can set up apache or nginx to look at public_html as the web root, so that I don't have to add it to my css/js paths? I tried setting DocumentRoot for apache but didn't have luck
 
1:00 AM
well, I don't know, but I was able to solve my issues - after understanding the key concepts and messing around
basically, for me there were three things:
File -> Settings -> Language & Frameworks -> PHP
File -> Settings -> Build, Execution, Deployment -> Deployment
Run -> Edit Configurations -> Add new "PHP Web Application"

And messing around a lot with paths, interpreters, etc
 
1:21 AM
@Wes you still looking for css PRs? :P
 
Wes
?
i hoped i could do php prs
 
Will be mostly finished tomorrow with the new version of feedr (the thing that used to drive the releases feed). Needs some love
hmmmm not sure if I have more php stuff on it
 
Wes
can try with the css tho
 
Will ping you when it is done. Fine either way by me whether you want to do it or not
 
Wes
can do something. i have 4 PRs done and about 2 weeks left to do better prs :B
btw i need help with git before i make a mess @PeeHaa
i have a PR still open, meanwhile it got obsolete... how do i keep it updated?
 
1:36 AM
@PeeHaa did you get to try the potato chips?
 
2:31 AM
Night all
 
 
1 hour later…
3:39 AM
How can I force PHPStorm to completely ignore wp-admin and wp-includes folder during debugging?
Even though my function calls a function inside those folders, just skip those
I have Skipped Paths configured, but that doesn't prevent it from entering
 
Wes
all phpstorm or the debugger?
right click on the folder > mark folder as > excluded
 
 
2 hours later…
5:42 AM
Morngins
@Wes Sorry was afk
@Wes Rebase it
@Tiffany yep! was good <3
 
6:00 AM
Thanks @Wes, gonna try it out tomorrow
Hmm, actually it still stepped into
It's WordPress. Such a mess. Would like to ignore functions stepping into wp-includes folder
I mean, even if you step through, it calls so much crap that it gets hard to debug
Perhaps I'm being unfair, gonna give it a try with a clean head tomorrow. See you guys :)
 
@LucasBustamante Not unfair. WP is terrible :)
 
 
1 hour later…
7:09 AM
Morning
 
hoi
 
7:23 AM
 
yo
 
Wes
morn
 
wesison
 
8:00 AM
How do I teach dad jokes?
 
Teach jeeves?
 
Yes
I've given up on teaching you.
 
:P
 
Something unexpected went wrong with the WOTD service: Allowed transfer timeout exceeded: 120000 ms
 
!!dad add name / setup / punchline
 
8:02 AM
!!dad add zippo / What is the difference between a hippo and a Zippo? / One is kinda heavy, the other is a little lighter.
 
@MadaraUchiha Ha ha ha! Brilliant! I'll save that one about zippo for later!
 
Awesome
 
Something unexpected went wrong with the WOTD service: Allowed transfer timeout exceeded: 120000 ms
 
You already said that bro
We got it
 
@Jeeves Must be a long-ass word.
 
8:20 AM
@Allenph you wat?
 
It's an extremely new stage 4 (a.k.a. in the language) proposal to make JSON a complete subset.
That's why U+2028 works in Chrome, but not in Edge.
 
8:52 AM
Mornin'!
 
@MadaraUchiha ooooooh, very nice
That resolves the mystery :)
And also seems like a very reasonable change to make
 
!!dad add duck / Why does a duck have feathers? / To hide its butt quack!
 
@Sean Ha ha ha! Brilliant! I'll save that one about duck for later!
curl_multi_select() return value is inconsistent – #77030
 
9:31 AM
o/
 
9:53 AM
ATTR_EMULATE_PREPARES and multiquery – #77031
 
Wes
@MadaraUchiha wtf. so weird that it is not already
but it's js after all, i shouldn't be surprised :B
 
morns
@Wes I remember that one, it was posted once before
@Jeeves Why is this happening @PeeHaa? Is this timeout from the dictionary.com's side or is this from the bot itself?
 
10:09 AM
holy shit .. guys, do you know ajax requests will not be known as pageview ????
why ??! the most of my website pages are loaded by ajax :-(((
 
@mega6382 Possibly a missing Connection: close; header, If that's not it I don't know
 
bug in enum – #77032
 
@Shafizadeh what are you on about?
 
@mega6382 do you mean "what I'm talking about" ?
 
yes
 
10:16 AM
ok, open this and click on one row of the result-set
See? The content loads through ajax .. google cannot crawl that content :-( ..! and it will not get counted as a page view :-(
 
10:32 AM
@Shafizadeh you can use JS to dispatch additional "pageview" events to GA
 
!!urban GA
 
[ GA ] Short for General Admission. A [ticket] you buy for concerts or other events that do not have [seating] assignments and generally use a first-come first-serve [policy].
 
google analytics
 
thanks @jeeves.
 
also, you should have your links should have two behaviors: simple click and "open in new tab"
the simple click is triggering an event listener in JS
but if you do an open-in-new-tab or middle-click, then it only uses href attribute
 
10:36 AM
well currently we have those two kinds of links, in other word, two kinds of target (inittial and _blank)
@tereško can you please give me an example of this?
 
<a href="http://pornhub.com" onclick="alert(1); return false">example</a>
2
I am at work and have no time
 
11:05 AM
@Tiffany wait, wat? .....why would someone do that?
 
@Shafizadeh Yes, you need virtual pageviews
But IIRC, Google Tag Manager should be able to track URL changes through the browser's History API
@Danack Because they're mad at the company?
For example, here, the company is obligated to give you a month notice in advance when they terminate your employment, but most would rather pay you to sit at home and do nothing than have you work for that last month, in fear you'd do damage.
@Shafizadeh How do you do navigation?
 
@MadaraUchiha that's an example of poor thought processes though......"I'm going to get back at a company in a way that makes the people I work with never want to work with me ever again".
 
@Wes Oh excuuuuuuuuuuuuuuuuse me mister "what-is-this-Unicode-thing-you-speak-of-PHP"
@Danack And how many people do you know who have calm, rational thinking when they're upset?
I know a few. Not many.
 
Wes
@MadaraUchiha js is funded and developed by google, microsoft, w3, mozilla and dozens of other giant companies. despite that it still sucks. php is just as successful but is kept together by nikic bwoebi and a couple of other guys. tell me who is doing a better job now
 
@Wes the go lang people?
 
11:17 AM
@Wes All languages suck. But JS sucks much less today than it did 7 years ago.
PHP sucks slightly less today than it did 7 years ago :D
 
11:32 AM
@MadaraUchiha PHP 7 years ago was still better than JS now :D
 
JS has TypeScript tho
 
@PeeHaa :)
@Danack I think he was feeling spiteful. I guess there were some people in the department he didn't get along with? I got along with him fine though.
apologies for spam, but I can't figure this out, tempted to post on main
how effectively can I do this? on the production server, I have git set up behind the public_html folder, so when I clone to my development server, it clones the public_html folder inside my development server's web root. This causes me issues with css/js files when I include them to pages because in the development environment I have to add public_html to the path, but when I push my changes to production, since public_html is the web root on production it screws me up
is there a way I can set up apache or nginx to look at public_html as the web root, so that I don't have to add it to my css/js paths? I tried setting DocumentRoot for apache but didn't have luck. Or maybe using a git hook?
 
@NikiC so? you gotta invent TyphpeScript next?
 
Wes
so amazon contacted ebay sellers though ebay telling them to sell on amazon instead
 
11:51 AM
@Gordon I don't like the word Script in there, just Typhpe, what do you think?
 
@MadaraUchiha I send a ajax request, get the new content, push it in the dom using .html() and then use window.history.pushState() to change the URL. But google doesn't understand it is a new page
@tereško heh .. do you think I'm that much newbie?! :-) ..!
 
it was the example that you asked for
 
Right now I am working on a project that I started from scratch a few weeks ago, I was given a choice between Laravel or Node.js, so, obviously I chose Node.js and persuaded them to let me use typescript, and it is going quite good so far.
 
\o
 
12:02 PM
 
12:22 PM
hello. does spl_autoload_register load just used or all classes in the folder?
 
@BikerJohn Well, it allows you to register an autoloader, so whether it does one or the other is up to your autoloader implementation
Although the implementations I know only load the specified class
 
@BikerJohn it can be written to load all classes in a folder
 
12:58 PM
 
@Sjon my first dev box was Apache, and I had DocumentRoot set to use public_html, but that didn't change how the js/css was loading. I'll try with an nginx box when I get home.
 
@Tiffany there's also always the magic of symlinks
 
I might switch to using Docker at home, haven't decided
@Sjon oooh, didn't think about that
I think I've only successfully done a symlink once, I need to learn how to do them
 
@Tiffany sysadmins hate them / developers love them
 
@Sjon I am a developer who fucking despise them :P
 
1:04 PM
@PeeHaa You are the exception that confirms the rule :P
 
:-)
 
trying it out on one of our test servers in my user directory, symlinked one file in a folder into another folder , but the symlinked file gets added to Administrator group :( not actually the problem, the original files are in Administrator group as well
I don't have sudo/root access on this server
 
I meant something like ln -s public_html/css/ . which would enable serving css from public_html in the current dir
 
@Sjon if I do use symlinks, will they get uploaded to the production server?
I see
 
@Tiffany it depends, do you upload symlinks to the production server? :P
 
1:09 PM
@Sjon no
I guess it's a question of if they show up in git, then just add them to ignore
 
Incorrect exception message for diagnostic statements w emul prepares disabled – #77033
 
Wes
that is actually way more disturbing now
why don't they just put a face on it
 
@Sjon Why doesn't it shows php error, instead of saying "Oops, something is wrong" 3v4l.org/5XCRK ?
 
Wes
it's toooooooo uncanny valley
 
1:22 PM
morning room
 
@mega6382 weird.
 
Yeah
 
I'm up to 40 something tabs... means I'm getting close to finishing.
 
1:41 PM
\o/
by removing a bunch of code I wasn't using, and adding a couple of issets, I think my code is warning/notice/error free
 
@Wes that would just get it deeper into the valley.
 
I'm an idiot.
 
Wes
@Danack maybe you are right
 
are there any php variable and mass file renamers out there that anyone knows of?
 
Working with dates based on week ranges. Wondering why my test isn't occurring... not that current week it is looking for to trigger. sigh... such a moron sometimes.
 
1:55 PM
I cannot post on other sites like stackoverflow etc. says I can only post once every 90 minutes whats the point of single login if it just prevents me from asking a question this is worse than yahoo crap. Had to VENt THAT!
 
@Punkroku That normally happens if you have a few questions that aren't well received
 
if you have a file in git that's showing up as having unstaged changes, but there are no differences, what do you do with this file? stage/commit it, or discard changes? ...or leave it?
 
@tereško You just inject the mappers straight into your view classes, right? No services like on controllers?
 
@Punkroku I don't see any rate limiting on your account.
 
"well received" well that can be ambiguous no?
 
1:57 PM
@Punkroku I think it means if so many questions you've asked recently are downvoted to a certain threshold
how is that ambiguous?
 
its with stack exchange in general all the site prevent me from asking 1 question on other sites. like here I must wait 90 minutes to ask this. which isnt PHP askubuntu.com/questions/1084898/…
 
Do you guys add anything to variable names to indicate if it is a string or an object?
 
In PHP i wanted to learn how to make an XML repository and PPP Periphery Password Protocol like dongle.pw
Also I encountered a bug a while back with &bs;&gt; or something similar for password or other input entries that crashed servers
 
@StatikStasis depends on the language. Sometimes do it with C#, but for objects in a Windows Form, like text box, command button, label. I haven't done it with PHP though.
 
@StatikStasis Yeah. A type hint.
 
2:01 PM
I have a DateTime object. Formatting it to a string object for use in a query and just wondering if anyone ever labels the new variable name something to indicate it's a string type for the sake of clarity.
smacks forehead
@Allenph jeez... yeah.
ty
 
I wanted to add timestamp hash to filename and make a fileSystem more like PeerGuardian with blocklists.
 
@StatikStasis lol, thought you were already doing typehints
 
I do- I'm not thinking.
 
tiny.cc/codethis
 
@StatikStasis NP.
 
2:02 PM
haven't hit my caffeine high for the day yet.
@Tiffany Time for another dose of my limitless pill. =p
 
can I use PHP for a chat interface or do I need sockets and someother language I would also like to access USB?
 
@StatikStasis I feel bad for your heart
 
@Tiffany My heart loves me
 
@Punkroku No wonder you got rate limited
 
@StatikStasis is yours stimulant or non-stimulant?
 
2:04 PM
later
 
@Tiffany Stimulant - adderall 20mg
 
If you want ideas openInvent.club
 
@Punkroku that looks like spam...
 
#SOReadyToKick
 
Hmm... this is reminding me of a long lost forgotten five ten...
 
2:06 PM
Yeah was thinking the same when it started right away with incoherent nonsense
 
I was waiting for "Learning to code the PHP is like a building. First, you have the foundation. Then you have the framing... but wait you have to have a retention pond first... then there is zoning ordinances... so you have to meet with county council and have schematics... then the workers stand around and watch one guy work... wait what was I saying? Oh yeah- see- coding is hard and confusing."
 
@Allenph are you trolling?
please don't, I am too pissed off today
 
@tereško Nope. I don't remember this part.
If you don't want to explain it that's fine, what I've got is plenty good enough for what I'm trying to do.
 
@tereško Why you pissed?
 
@Allenph in that case, the answer is "no, have understood nothing"
 
2:17 PM
So you do use services to get formatted data I'm assuming instead of doing that work in your view class?
 
70
A: Understanding MVC Views in PHP

tereško Note: the MVC and MVC-inspired patterns are advanced constructs. They are meant to be used in codebases where ordinary object-oriented (that follows SOLID and other guidelines) code starts to become unmanageable. By introducing this pattern you would impose additional constraints, which then l...

 
@PeeHaa big luv
 
@tereško Thanks.
 
@Allenph please stop assuming
 
> RubyOnRails prototyping framework
A+ trolling
 
2:41 PM
@tereško In my case it's just a REST JSON API, but that's interesting. From reading your comments and that article on presentation objects...is it saying that you have an object that represents the info that will be displayed that's generated by a service-like thing (you compared it to a data mapper), then the views' job is pretty much just to put that data object on its scope and then render the template?
 
3:06 PM
@NikiC > Now that immutable classes have landed, we can no longer do this.
What did I miss? This is an internals-only concept right?
 
@Leigh yes
 
Hi Everyone!
 
phew
 
I would like to talk briefly about PHP MVC, if that would be ok
Is there anyone here who would be willing to do that?
 
What would you like to talk about?
 
3:16 PM
Hi Sean
Well, I'm writing a small app right now
 
@Leigh It's about classes in opcache SHM which cannot be changed
 
It's just a form with some javascript enhancements
 
Roger, cheers
 
And I wonder where I should put the javascript
Do you think that would be part of the controller?
 
3:18 PM
When you say "put the javascript", do you mean.. registering a javascript file to be added to the template, or the actual javascript code?
 
This js script just hides certain areas of the form, depending on how the user chooses a group of radio buttons
I'm not using any framework, I'm just organizing the app's files into the MVC pattern
So I mean I wonder where the best place is to put the actual js code
 
based on your previous statements, you are not organizing it into anything
 
I'm going to say that your javascript code shouldn't really have anything to do with your PHP. It should be tucked away in a Javascript file in an assets folder and included in the template / view / page
 
Hmm, ok.
Right now I have a folder called "controller", and inside it, a file called "scripts.js"
 
I don't think composer's autoloader is detecting my namespace
 
3:20 PM
MVC has nothing to do with folder structure
 
in that scripts.js file, I have this little code:
function showIllTasks(id) {
$(".ill-tasks").addClass("d-none");
$("#" + id).removeClass("d-none");
}
 
if ($e instanceof egt\UniverseException) {
switch ($e->UniverseExceptionType) {
This should match to a file but alas it does not
 
hmm ok
 
@JustinKaz, have you told composer to regenerate it's autoload cache?
 
3:21 PM
@JustinKaz would egt need to be preceeded by a \?
 
composer dump-autoload (or composer update/install would do it)
Anything which makes composer say "generating autoload file" or something similar
 
@tereško If I am not using a out-of-box framework, how should I organize my code to fit a MVC pattern?
 
@Sean I haven't need to do that like ever, but I will give it ago
 
@Mark you organize it by the application layers
also, the clientside logic and serversite logic are two separate applications
where clientside app uses the backend as a "data source"
 
Ok, thanks
Is there a good place you can recommend for me to research this?
Or maybe a good textbook?
 
@Tiffany I liked it like 30 min ago .. based on @Allenph, it did not actually help
 
@Sean No cigar
PHP is like... NOPE... Not here... Try agan
 
@tereško It's good, I'm just an idiot.
 
I'm AN IDIOT
 
@Allenph if you are making REST API, then you should not separate the views and controllers in the UI layer. Because there is no point. And you do not need presentation objects.
 
3:27 PM
Lol, I keep writing my main page outside of my namespace, the line of code for each case doesn't have a namespace qualifier... :shamed:
 
@tereško Yeah. I know that. I was just curious. I didn't retain much of the view stuff because I never really practiced with it.
Did my description of how that works make enough sense I should give it a go when I get home or research some more?
 
it did not make sense
 
Okay. I'll reread the article later.
 
Does anyone else make stupid mistakes or is it just me :(
 
20 hours ago, by Tiffany
it's PEBKAC, ignore me
did another PEBKAC thing this morning...
 
3:37 PM
lolz
Thank you that warms my heart.
#wishIwasPerfect
Anybody use this? platesphp.com/v3/templates
I was wanting a template engine but I didn't want to learn something new
 
hey guys, i want an advice. let's say you need to parse some html from some link. where would you put that code? definitely not in a controller, but neither does model sound right. so where then?
 
3 messages moved to Trash
 
!!canon html
 
1929
Q: How do you parse and process HTML/XML in PHP?

RobertPittHow can one parse HTML/XML and extract information from it?

 
Oh I didn't read because I'm an eager beaver
You'll want that in it's own class or set of classes. Bearing in mind "Controller" and "Model" are not just a set of models or controllers, but are layers in your application.
 
3:47 PM
how would you call a class that does that? RedditParser (e.g. if reddit was parsed)?
 
I'm attempting to start using a CDN at another domain but I'm getting this error Access to CSS stylesheet at 'https://cdnsecure.4egtv.net/css/bootstrap.css' from origin 'https://secure.egtuniverse.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://secure.egtuniverse.com' is therefore not allowed access.
What do I do to fix that?
 
@JustinKaz It sounds like you're trying to AJAX your CSS file... why?
 
Nope chrome just banned it becuase instead of coming from secure.egtuniverse.com its coming from cdnsecure.4egtv.net
so I think it doesn't like that at all
It loaded the image tho
 
Are you mayhaps on https and the cdn link is not?
 
@Sjon It seems to have been fixed now, what was the issue btw?
 
3:58 PM
Because you're requesting it using the crossorigin="anonymous" attribute
 
the CDN and the main forces HTTPS across the bord
I am
lol
is that bad?
I actually like the idea of blocking requests to cdn and javascript recourses outside of any known domain that has access
 
Then you want to look at your access control policy for the page
Er, your content security policy*
crossorigin seems to do something different
257
Q: What are the integrity and crossorigin attributes?

New userBootstrapcdn recently changed their links. It now looks like this: <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" integrity="sha256-MfvZlkHCEqatNoGiOXveE8FIwMzZg4W85qfrfIFBfYc= sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/i...

 
yes... that... I've been googling all of that and I can tell you it gets complicated and not as easy to understand
 
There's some CSP generators out there
 
so SO chat markup includes single tick marks to indicate code now... chat.stackoverflow.com/messages/44312921/history
 
4:06 PM
@Tiffany It always did ;-)
 
@PeeHaa it did? I thought it was ``` stuff ```
 
Just don't try to let it span multiple lines because that's too hard for the devs
@Tiffany That is github flavored markdown
 
ah
 
As you know we call them UV coordinates for Vertical and Urizontal.
@mousefountain Right, just like the L*a*b color space is lightness, amaranthitude, and bluelessness
 
@Tiffany As @PeeHaa said, its always been there, just like on the main-site, either use backticks or 4 spaces in the beginning of the line
 
4:08 PM
@JustinKaz I spent a couple months last year forming up a CSP... it was a pain in the ass, but well worth it
 
@Tiffany "spent a couple months yesterday"
wat?
 
@mega6382 yeah, knew it worked on main, but thought it didn't work in chat thought I read somewhere that it requires three ticks
@mega6382 my brain can't multitask
 
@Tiffany 3 ticks actually doesn't work
 
@mega6382 yeah it does... ```try this```
try this
wat
 
SO devs also cannot handle spaces?
 
4:11 PM
@Tiffany But that's pointless cause all it does is `` and `try this` and ``
@PeeHaa Only in the beginning, I beleive
 
@mega6382 huh?
 
@mega6382 After some time it starts working? :P
 
Yeah... look forward to time warping 3 months into a day.
:D
 
@PeeHaa what do you mean?
 
secure.egtuniverse.com - it works, refresh twice and error!
 
4:12 PM
@Tiffany As in it becomes 3 separate codeblocks
 
Now of course... I need to figure out why it does that... debugging is so much fun
 
@mega6382 My awesome joke went over your head.nvm. The moment is gone
:)
I don't want to dissect that frog
;-)
 
@PeeHaa I got it
:D
English is a crazy language
 
It is. We should all just switch to Dutch
 
4:23 PM
@PeeHaa Dutch is worse, isn't it?
 
Hell yes. It's one big pile of exceptions and hard to explain made up bullshit rules
 
@PeeHaa Are you talking about Java?
 
:)
 
4:43 PM
In Yii 1 framework I had some queries earlier which I have removed recently, yet they are showing in the browser causing error. What I have done wrong? how it is possible in the server side?
 
@masud_moni have you cleared your browser's cache?
 
yes
tried it in incognito as well
The query code is nowhere in the controllers
how it is possible to stay?
I am buffled
Never seen nothing like this in my life
:'(
 
opcache?
 
have no idea about it
let me check it out
tried clearing opcache
not working
while I am trying to load it first time, it is executing the old code
but if I somehow load it corectly once,then everything is fine
@PeeHaa could you please tell me any other way?
 
@masud_moni I am quite certain that the problem is probably very simple, just probably something you overlooked, but I don't think we can be of much help if as we don't have the code.
 
4:58 PM
thanks anyway, although I have learned about opcache
:)
 
00:00 - 17:0017:00 - 00:00

« first day (2924 days earlier)      last day (2027 days later) »