« first day (2685 days earlier)      last day (2256 days later) » 

2:00 PM
(ini setting)
 
@DaveRandom that will work with getTraceasString?
when Find Usage works in phpstorm, it's a lifesaver
 
The issue is not that the trace string is cut off (afaik that never happens) rather that not all of it is being logged
btw I much prefer (string)$e to that
!!> echo new Exception
 
[ 7.0.0 - 7.2.2 ] Exception in /in/WVklQ:1 Stack trace: #0 {main}
 
here's an example by what I mean: #0 [internal function]: notify_error(2, 'array_merge(): ...', 'C:\inetpub\wwwr...', 126, Array)
 
[ hhvm-3.22.0 ] exception 'Exception' with message '' in /in/WVklQ:-1 Stack trace: #0 {main}
[ hhvm-3.18.5 - 3.21.3 ] exception 'Exception' with message '' in /in/WVklQ:1 Stack trace: #0 {main}
[ 5.6.0 - 5.6.30 ] exception 'Exception' in /in/WVklQ:1 Stack trace: #0 {main}
 
2:05 PM
parts where there are the ...
 
ahh right
I vaguely remember looking into that once
tbh you'd be better with a custom trace printer for that I think
!!docs exception.gettrace
 
[ Exception::getTrace ] Gets the stack trace
 
so something else I need to refactor
adding it to the list...
one thing I have written, "change error reporting to log errors and send an email that a new entry has been added, check that SMTP server is up before sending email," would I log the errors in the database, or somewhere else?
 
That depends, but probably not
 
where would be the test best place?
...
lol
 
@Tiffany Have you looked at Monolog?
 
or that, but that's probably going to be an enormous change I would guess
 
@Tiffany Are you using FPM?
 
I could probably do error_log in the interim, and work towards using Monolog
@Machavity FastCGI...yes
 
not fpm
 
2:14 PM
thought it was?
probably isn't considering it's whatever goes with IIS/PHP
 
no, fpm interacts with web servers via the fastcgi standard but the cgi sapi and fpm are different things
fpm only runs on *nix, it's fork() based
 
ah
 
Dave's right. That's not FPM sadly
But FCGI should have its own logs. I think you could trigger it to write there if that's what they're after
 
well, rather you can hand off the errors to the web server's error logger
> If this directive is not set, errors are sent to the SAPI error logger
i.e. that's the default behaviour for error_log()
 
hmmm
 
2:18 PM
and IMO it is good behaviour, in general it makes sense to keep PHP errors and web server errors in the same place, because in general there shouldn't be anything in either of them unless something is wrong
 
if that's the case, why would someone write an error handler that would send an email?
yeah
 
poor man's monitoring/alerting
 
I am not a fan of that approach
 
@Tiffany Our error handler notifies us of fatal errors via email. Get a full stack trace and everything. It's saved our necks a few times
 
@Machavity but I'm guessing that isn't the only error handler you have, yes?
 
2:20 PM
it's too easy to miss, to easy to get used to ignoring, and email is too generally fragile to be relied upon for important things
 
@Tiffany Correct. We still have logs
 
my goal would be to have it log the entry, if logging is successful, send me an email that there's a new entry and to look at it.
 
And other monitoring, etc (i.e. pingdom)
 
yeah, we use pingdom and siteimprove to check if the website's up/down
keep considering dropping pingdom, but it works and it's free, and it doesn't hurt to have a second source to double check against
 
With Monolog you can have multiple handlers, so you can log notices and warnings to the log fil, but send and email or something for fatal errors.
 
2:22 PM
interesting
 
@jjok in general I don't like this, that sort of thing doesn't belong in the application logic, it belongs in monitoring tools. Application-level logic for logging should just be "log", i.e. pass the event off to some store as fast and as simply as possible. Then use some external, purpose-built tooling to manage that data, and alerting on it. IMHO.
Personally I use datadog and get on with it quite well.
ymmv
 
Yeah, makes sense.
Can Datadog handle the different error levels?
 
Ladies and gentlemen I give you an absurd amount of laptop storage
 
@Jeeves disturbing?!
 
> Why did you sat it? Must I use local stylish rules to view php.net normally?
 
2:29 PM
lol
did you look at the damn upvotes on the comment? ....
what I want to say to him
 
He's already using PHP. No need to kick him while he's down
 
@DaveRandom try Instana :)
 
worse, he's looking for guidance in the user notes. even worse, on the downvoted ones..
 
@pmmaga that's the scary part
 
@pmmaga Should just close it as a duplicate of Laravel
 
2:32 PM
:P
 
lol
 
@Gordon I will do later this year when I have enough hosts to monitor that the free tier of datadog is no longer enough. Unless you have a free tier I'm not aware of?
 
@DaveRandom nope. won't compete with free.
 
fair enough. right now my requirements are only basic monitoring of 3 hosts, but (if all goes to plan) that will go up considerably around jul/aug
 
I noticed this on a line of code $body .= 'Date: '. $this->event->start_datetime . "\n";, $body isn't defined/initialized elsewhere in the scope of this function, should I write something like $body = ''; at the top of the function? The .= has me worried.
 
2:38 PM
why not just make that line $body = ... ?
that will provoke a notice right now
 
I thought about that, but I'm worried that it might break something else that I'm not aware of...
 
but first, make sure it's not meant to be appended to $header(s)
 
if you aren't seeing that, turn your error reporting level up...
 
smells like headers
 
@JoeWatkins send_mail($to, $body, $headers);
alright, will just try removing it and see what happens
 
2:39 PM
eeeew
 
shotgun debugging ftw!!
 
Also eeeeeek
Also stooooop
 
yeah, I dunno what send_mail does, but it looks like it's meant to be appended to headers to me
 
@PeeHaa I would star all of these if it weren't considered spamming...
 
You are vulnerable to header injection @Tiffany
 
2:40 PM
you should use \r\n as a line separator in text email body btw
notably, old outlook sometimes screws up with \n
 
@PeeHaa how so?
 
@DaveRandom huh? Doesn't it all fail with just \n?
It totally should
 
only if you care about windows, and if you care about windows, then I think you should stop coming to r11 ...
 
@JoeWatkins No
It's defined to be crlf in the rfc
 
@PeeHaa most MIME parsers will forgive it
 
2:41 PM
Nice guys mime parsers
 
okay, til, I still hate windows
 
:p
@Tiffany Say you put something else in the headers Some-Thing: {$this->event->name}
And $this->event->name is Name\r\nyay-extra-header: foobar
Now suddenly you have two headers
 
@PeeHaa up for a code review? :P
 
@PeeHaa what's way more stupid is that old mac OS used to sometimes misinterpret \r\n as two line breaks (or so I have read)
 
@Tiffany Sure
@DaveRandom lol
 
2:44 PM
I hate mac too ...
 
Probably the same mac's that did \r as line delimiter
 
gist always screws up spacing -_-
 
It does?
Are you one of those tabs weirdos?
 
I bet it's mixed tabs and spaces satan
 
Yeah
GET HER!
!!alias
 
2:47 PM
6 messages moved to Trash
 
I have phpstorm set to convert tabs to spaces, but I'm sure I have something set incorrectly
 
What does send_mail do @Tiffany?
 
I'm going to guess that it receives an SMS
 
:p
 
Wes
2:50 PM
how would you call the increasing randomness of a e.g. deck of cards after each hypothetical consecutive shuffling of it? :B it's like randomness but not quite :B
 
huh?
 
@PeeHaa I updated it with the send_mail function
 
@Wes entropy?
 
Why would the randomness increase?
If the shuffle is proper random it is... random?
 
Wes
@Sjon maybe. i kind-of know the scientific entropy definition, not sure about the CS one
 
2:51 PM
$mail =& Mail::factory('mail');
holy shit @Tiffany how old is this code??
is that PEAR::Mail??
 
yes
 
Holy crap, I can't remember the last time I saw PEAR code
 
I think that's another item on my to do list... to switch it to a mail library that's sane
 
@Tiffany PHPMailer ftw
 
Wes
@PeeHaa i want to emphasize on the fact that it's another random sequence that is not equal to the previous one
 
2:53 PM
@DaveRandom the code base was given to us in 2011, but I suspect parts of this code is from like '05-'09
 
Wes
not because it's "more random"
 
@Tiffany the =& is a PHP4 affectation
 
I thought you didn't use a mail lib at all so this is at least... something I guess :P @Tiffany
I shouted too soon
 
it's actually not on my to-do list... so adding that too...
 
BTW what I would do first with that piece of code is split of things over several functions / methods
 
2:56 PM
@Wes Entropy is hard to explain, I try and avoid using the word these days
 
PEAR is PHP's own personal Frankenstein. It's big, bulky and won't die
3
 
@Leigh leave it up to to the Chaos Gods
 
E.g. crypto-random streams are going to be based on environmental entropy, but one does not equate the other
 
Something like this would make a simple method instead
Also all that mail stuff should probably just in its own method
 
yeah
at one time I wanted to write a mail wrapper, but failed miserably
 
2:59 PM
@Tiffany PEAR still uses mail() at its core. PHPMailer (and other modern libs) open a socket and connect to the mail server directly. Makes debugging mail failures so much easier
 
@Machavity "modern libs"
 
I plan to take another crack at it when I have a better understanding of how to write a good class
 
I mean they certainly get the job done and you must use them, but modern they are not :P
 
@Machavity also it's green
 
@JoeWatkins green is one of our primary colors :S
 
3:00 PM
evenings room.
 
@PeeHaa PEAR still talks about the "good ole days" of PHP, when kids registered globals and type hints weren't so strict
 
@PeeHaa I'll add a comment for a TODO
 
@Tiffany I have something for you in a few
 
Does anybody know a resource (website, book, etc.) about parsing a PDF file in PHP? While a parsing library might help, I rather do the parsing myself.I've been searching the net, but I couldn't find anything useful.
 
@akinuri I would suggest the bible because you are going to need it
2
 
3:09 PM
@PeeHaa you suggest to parse the bible with php? heretic..
 
@Tiffany I didn't actual fix things, but did just split it up a bit gist.github.com/PeeHaa/36f02e4b309726e1363c13f2ee6d0477
 
@PeeHaa Does that mean it's rare to find, or hard to do? Didn't get it :)
 
@AlmaDo Parsing the bible would be a lot more sane as trying to parse pdfs
@akinuri Why do you want to do it yourself?
 
@PeeHaa thanks, didn't have to do that :P
 
is just for illustration purposes
:)
If it sets your cats on fire (as you are a crazy cat lady) -> not my fault
:p
 
3:12 PM
@PeeHaa even if it's in pdf format? hm...
 
hehehehe :P
 
@PeeHaa I'll be updating a page with information from a pdf that is served by a government institution. So I thought parsing might need tweaks to get the data structured.
 
But why do you want to roll your own?
Parsing != output
 
@PeeHaa that's what my test server is for... which is basically a smoldering mess right now anyway
 
hehe
 
3:13 PM
@Tiffany Stop storing your cats in there, then
 
one of my cats knocked my glasses off my nightstand over night :|
 
Maybe he didn't see it
 
woke up, didn't know where the fuck they were... and I'm essentially blind without them
 
how many cats do you have>
 
@PeeHaa I'm a very very curious person and I always look for a challenge. This seemed like a good one :D
 
3:15 PM
It is not
 
there's a clear distinction between challenge and waste of time
 
@akinuri Speaking from experience, PHP is probably one of the worst languages to do anything with a PDF in
 
Nothing to do with php in this case
The formats are just painful to work with
 
True, but the libraries designed to make it easier can't even dent it
 
Unless you mean the available libs. In which case I kinda agree
 
3:17 PM
@PeeHaa code isn't working in test... something with recaptcha isn't going right. I'll add your code to a branch and debug it at some point. I need to get what I'm working on right now wrapped up... need to put out another fire in the code somewhere else ;_;
 
@Machavity Yeah
@Tiffany yeah sure :)
 
I'll be updating the page every 30 mins (can vary). So I need to download and parse PDF constantly. I'm already doing something similar to get data, but it's a web page, so it's easy to parse. With PDF, I've hit a wall.
 
And a self imposed one at that :P
Also surely you didn't write an HTML parser yourself
 
What surprises me is that while there are some apps (desktop, console), libraries in different languages, there are no resources/tutorials on the net.
 
your browser is also an app which can do some html.. but yeah, nothing specific about that in the net
 
3:25 PM
True :)
I'll do some more digging...
 
Good luck. You will fail. But good luck nonetheless
 
once you are required to answer the question about "parsing pdf with php" you should really think if you're solving the right problem here
hell, it's easier to parse php with pdf than pdf with php
.. I think (:
 
hell, it's easier to parse php with pdf than pdf with php
 
3:29 PM
PEAR is PHP's own personal Frankenstein. It's big, bulky and won't die
 
@akinuri ...nope.
 
!!nope
bleh
 
you might as well be asking if you can get PHP to cook your dinner
 
@DaveRandom That's actually pretty easy in comparison
 
say again, how does the elephant meat taste?>
 
3:31 PM
> Today, all species of elephant are hunted specifically for their meat.
 
@AlmaDo Psst, closing tags generally discouraged
 
!!wiki elephant meat
 
Elephant meat refers to the flesh and other edible parts of elephants. == History == The consumption of elephant meat has likely been a source of food for humans during the entire time of their coexistence. By the beginning of the Middle Palaeolithic, around 120,000 BCE, African societies were hunter-gatherers proficient in exploiting herds of elephants for their meat. A specimen of the now-extinct straight-tusked elephant was discovered in the Ebbsfleet Valley, near Swanscombe. The 400,000-year-old skeleton was found with flint tools scattered around, suggesting the elephant had been cut up by...
 
PDF is very specifically and intentionally a format that does not contain computer-readable structured data, this isn't a PHP problem, it's a domain logic problem.
 
@Leigh I'm lying on my back with laptop somehow attached to my shoulder...
so I hit > near my ?
 
3:32 PM
I know, was trying to be funnyish
 
Now back to the glorious process of debugging why something doesn't work on production, but works on test just fine. killmenowplease.
 
i.e. either you are solving the wrong problem, or the problem you are solving has been deliberately designed to be unsolvable.
 
@DaveRandom Elephphant with a side of dolphin (or seal)
 
maybe a bit of rabbit
 
I recently read somewhere (no idea where) the seal is actually really terrible
 
3:33 PM
@Tiffany logging, monitoring? worst case, remote debugging?
 
I now want a Seal cuddly toy, which I shall name the Seal of Approval.
 
not disapproval? lame..
you should name it @tereško
 
Everybody of my age just to watch that right? RIGHT?
 
watch what?
 
Unrelated, related :P
 
3:36 PM
sir, you're speaking bullshit (:
 
I want whatever drugs that thing is on
 
@AlmaDo I guess it didn't get past your censorship telecom department back home? :P
@DaveRandom hahahah
 
@PeeHaa I left when there was no censorship (yet). more precise - I left because it all begun to happen :p
 
Good call :)
 
3:39 PM
I will get a toy ship that the Seal of Approval can sit in and call it the Censor Ship
 
:D
 
try better, @DaveRandom . Buy a sheep and when it "beeeees" you tell "now the censor sheep speaks"
 
@AlmaDo It's called French in the rest of the world, btw
 
@Machavity true
 
@PeeHaa Was on HBO. In the 80s. Meant you had to have cable AND HBO. I remember marveling at my neighbors having it.
 
3:43 PM
Nope. No HBO over here. We had cable though
 
Meant in the US. Sorry
Never heard of that series
 
@DaveRandom Meanwhile I still don't have a nginx version which supports http2 on centos
 
@PeeHaa 6 or 7?
 
@PeeHaa wait wat?
 
3:45 PM
@Machavity 7 I think
 
I wonder, why has nobody complained, that the movie wasn't named "Panther of Color"
 
Oh wait
It actually runs http2 now :|
Weird
I remember trying to add the directive and finding out it wouldn't work
 
..and forgetting to reload conf :p
 
No nothing like that
Actually checking the version and reading and crying
 
eh.. I knew it. the reason is always within the layer between the keyboard and the chair
 
3:47 PM
:P
 
(:
 
@PeeHaa probably you were running the epel version and not using the nginx repo
epel is ridiculously out of date from basically everything
 
Yes
 
@tereško I'm more surprised nobody has labeled it "cultural appropriation"
 
I very much dislike adding random repos :(
Wouldn't be the first time I had to dick around with dep conflicts
nix sucks
 
3:50 PM
inb4 Debian superiority fight
 
Win98 4 Lyfe
 
@Machavity Debian and centos are basically the same with regards to their official repos :p
 
I have been considering switching to Fedora lately, I must admit
a lot of people just don't seem to give a crap about centos
 
I have been considering letting somebody else manage my machines :D
 
@DaveRandom I've found Ubuntu and its clones to be better desktops, but CentOS a better server
 
3:53 PM
I'm already not giving a sht about managing my machines.. SRE do it
 
SRE?
 
yeah
 
!!urban SRE
 
[ SRE ] SRE is sex relationship education
 
3:54 PM
ah makes sense
 
lol I should tell them :D
 
@DaveRandom :D
Seriously though wth is SRE?
 
site reliability engineer
 
lol
 
you can google it
 
3:55 PM
So a sysadmin
 
wouldn't it be hilarious if I accidentally left that window as-is and then hit enter in it by accident
 
Those titles...
@DaveRandom I think I have a virtual kvm, but let's not try it :D
 
not precisely.. they do a lot of stuff. including machines management.. but not infrastructure as that is for devops
 
@DaveRandom you forgot the sudo
 
@AlmaDo Oh, you mean this guy
 
3:56 PM
@AlmaDo so not a network admin, but a sys admin
 
@PeeHaa devops != network admin
 
@bwoebi no I didn't, because @PeeHaa lives so dangerously that I don't need it :-D
 
and devops != sre
 
@Machavity I don't do linux desktops
I have better things to do with my life
 
37
Q: What is the difference between SRE and DevOps?

jcolebrandWhat is the difference between SRE and DevOps? Site Reliability Engineering and Development Operations seem to overlap a lot in detail. How do I know which group is responsible for what, and how do I know what jobs would be appropriate for my skillset? It seems like SRE is about maintaining ser...

 
3:57 PM
@AlmaDo I know. Imo the entire title scheme is laughable nowadays
 
not many, but some
 
It's just full retard
 
@PeeHaa yeah, but when the entire company insists on that.. I have to cope up
 
@AlmaDo Push back. Start by changing all Engineer with Donkey
 
@DaveRandom just checked, either you have some special config, but I do seem to need it
 
3:59 PM
@PeeHaa it's monkey actually. devops are donkeys
 
:P
 
@DaveRandom sudo needs no password though, yes.
 
@DaveRandom I've been using Ubuntu Mate on my laptop at home for about a year. I like it.
 
@DaveRandom I had an old laptop I loaded Mint onto for the kids (VLC can play DVDs and it runs Chrome fine)
More importantly, it's harder to get malware onto it
 
19 mins ago, by DaveRandom
Win98 4 Lyfe
seriously though, I know how to fix windows, and for the most part I know how to stop people from breaking it in the first place
...and I'm very much not interested in anyone else's opinions on the matter (as is probably the case for everyone else) :-P
 
4:13 PM
That's the only Linux desktop I have. Win10 on everything else
 
@DaveRandom my start bar crashes and restarts itself, if it hasn't been touch in about ten minutes. Any pointers for how to fix that?
 
as in, explorer.exe crashes?
I haven't seen a single explorer crash in Win10, I would imagine it's some application you have installed which has fucked around with shell extensions
 
@DaveRandom here's my opinion: noob (:
let's holywar d:
 
I will invite you to take a voyage on the Censor Ship
 
.. which I will Kindly decline (;
anyways, I also don't run linux...
 
4:22 PM
@DaveRandom the icons on the desktop don't flick, so I'm not sure it's the whole explorer, unless that behaviour has changed. And yeah, I guess it could be the gigabyte software that adds shite to handle the audio settings.
 
hardware manufacturers typically can't software
@Danack no that hasn't been the case since XP (iirc), but what will happen is it will take any open explorer windows with it
it was "active desktop" that was part of explorer, they binned that because it was a massive security hazard and also pretty useless
Generally I don't bother with supporting utils for mobo etc, they usually cause more problems than they solve
 
poll: do you pronounce "wget" like "wa get" or "double-u get"?
 
something like "eww-get"
 
audio shipset is probably some bog standard realtek thing, just use the realtek driver and be done with it
 
> "double-u get"
 
4:26 PM
... that is, how I mentally pronounce it, I never actually did
 
I pronounce it "luxury yacht"
 
@Tiffany "ve get"
 
@Tiffany now I am somehow relieved I live in Germany d: where answer is easy
 
@tereško interesting
 
@tereško nailed it (:
 
4:27 PM
@Tiffany "double-u get"
 
I was going to pronounce it like "wa get" to a coworker, but it felt weird. But she wouldn't know what it is regardless of what I pronounced it as.
 
Just say "curl" then.
 
ph.. what's the point then
 
@AlmaDo to sound like I know what I'm doing :P
 
4:29 PM
sigh
 
:D
... someone probably pronounces "wget" as "vee jet"
 
@tereško Meh. It's not over 9000g
 
@tereško that's dangerously close to widget
 
4:45 PM
@Wes What do you mean by that?
 
5:00 PM
Hello , can anybody help me with uploading an xml file to phpmyadmin i have mysql DB PLEASEEEE
 
Write a script.
 
How do you guys organize your emails? Do you create folders per client?
(mail question)
I'm starting to lose track of emails, and looking at how to be more productive.
 
what's the USA standard datetime format?
 
I take it you can't create instances of non-native classes while in a code break using xdebug?
 
5:17 PM
@tereško m/d/Y
 
I was looking for something like DateTime::ISO8601
 
ISO8601 seems to be fine to use.
 
no
 
why not?
 
you don't need to know that
 
5:21 PM
Here in the US, even manufacturers switch between output, food for example sometimes goes d/m/YYYY or m/d/YYYY, or F d, Y, we can't make up our mind.
google expects us to use 8601 iso format if that helps.
 

« first day (2685 days earlier)      last day (2256 days later) »