« first day (4244 days earlier)      last day (704 days later) » 

Ben
2:21 AM
@Derick I'll admit, my knowledge of PHP, JS etc is next to nil. OS the understanding of file structure is unknown to me. Is there a place someone could suggest I start in order to understand it all? Something like the msdn?
 
2:33 AM
@Ben this book might be okay and up-to-date - wiley.com/en-gb/…
I'm guessing you've inherited a site or something?
 
Ben
2:51 AM
My ex business associate has left and dumped an incomplete and as far as I can tell poorly managed PHP project on us.
Of his own creation, that is haha
 
 
7 hours later…
MGE
9:30 AM
Hello, I have this error:
PHP Fatal error: Cannot redeclare Safe\\apc_cache_info() (previously declared in /var/www/api-co/releases/20220511125824Z/vendor/thecodingmachine/safe/deprecated/apc.php:27) in /var/www/api-pe/releases/20220511125824Z/vendor/thecodingmachine/safe/deprecated/apc.php on line 27
but As you can see, they are different virtual hosts, api-pe y api-co
 
9:43 AM
strtotime('2012')
why it return the current timestamp ?
 
9:58 AM
@MGE You should use function_exists check.
 
@Mwthreex it doesn't, it is interpreted as a time rather than a year, so it returns 20:12 on today's date 3v4l.org/Lfr6M
 
MGE
10:14 AM
@Tpojka where? this is happening all project classes
 
10:36 AM
@DaveRandom Ok, Is there anyway that i can parse that as proper year ? Even the Carbon::parse('2012') has the wrong output
 
10:56 AM
@Mwthreex You can use DateTimeImmutable::CreateFromFormat( "y", "2012" );
 
thanks!
@Derick it return false :(
 
Sorry, you need "Y", "y" is for a two digit year.
 
Yeah, Now returns 2012-05-30 10:59:33.0 UTC (+00:00)
 
11:12 AM
@MGE In those two files mentioned in log of error you pasted here. Instead of plain function declaration it should be something like this so when ever second file is going to be loaded you won't get error. This applies if functions' code is the exact same. If functions are different, then you need to fix project structure and architecture i.e. how and when files are loaded/included.
 
 
1 hour later…
12:12 PM
Morning
 
You're working on memorial day?
 
Not everybody is American.
 
It's a bank holiday in the US?
 
And it is still morning at some point everywhere ;-)
@Girgias [redacted snarky comment about guns]
 
@Derick I mean @StatikStasis specifically
 
12:18 PM
@Tiffany Yep. Most of my staff have to work on the holiday so I always come in and work the holiday as well with them.
 
Shrug. I'm in the middle of nowhere on a camping trip. Barely get cell reception 😅
 
We all get another day off in lieu of the actual day it self.
 
Ahhh
 
NICE! The great outdoors!
 
it's raining outdoors.
Glad that I already did my walk.
 
12:19 PM
Not everywhere. =)
 
Yup :) though, I did some work last night clearing out the bug log.
Then stargazed
 
That's my favorite part.
 
@Girgias basically our WWII memory day. I think it's a holiday earlier in the EU/UK
 
@Tiffany You should be in for a treat if you have another clear night. There are rumours of a possible meteor storm tonight.
 
@Tiffany I don't think the UK celebrates it? In France it's the 8th of May
 
12:22 PM
@Tiffany Not a holiday here. In NL only every 5 years on May 5th, unless they've axed it completely. UK does memorial day on the Sunday closest to 11/11, and in NL remembrance day is May 4th.
 
And Germany definitely doesn't celebrates it
 
@Derick oh man... I won't be here, but the next place should have similarly less amounts of light pollution
@Girgias err, right
 
Some countries then
 
5am here, but it looks overcast and or raining all the time
 
12:25 PM
There were a tiny bit of clouds last night but I was able to make out stars most of the time. Found big dipper. :)
@Derick cheers :D
 
I can see that even in London quite easily.
 
I'm bad at finding constellations. But stargaze more, I'll learn/find more. We probably could've seen Orion, I just don't know the shape.
I downloaded a stargazing app when I was about to go back in, but my eyes adjusted to phone screen :/
 
Orion is tricky in summer.
 
@Girgias lol...
I always look at Betelguise in Orion and wonder when we'll see it lit up from a Supernova.
 
12:44 PM
Not in our lifetime.
 
1:09 PM
^^
 
every page of my site returns this response header Content-Type: text/html; charset=UTF-8'....having said that DO I need also to set the corresponding tag in the head section???
 
@Derick I've read conflicting articles that it could... not a chance?
@Tpojka Not that one. =D
 
But close. :D
 
@DimitrisPapageorgiou Maybe.. it's either your web server or PHP that does this. But, in order to make it not rely on that, it is probably wise to set them yourself in the <head> section too.
 
<meta charset="UTF-8"> OR <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
I suppose the latter
 
@Danack Three times said, but luckily in different scenes.
 
cmb
@DimitrisPapageorgiou see w3.org/International/questions/…
 
@cmb thanks
 
1:34 PM
what about json_emcode()....does care must be taken for encoding? In a SO post I found that it must ne used with the JSON_UNESCAPED_UNICODE constant
phptherightway.com/#php_and_utf8 though does not mention it
 
1:47 PM
JSON is required to be in UTF-8 - but you're responsible for giving it UTF-8
 
How do I ensure it is UTF-8....do I need to supply this constant....?
 
@DimitrisPapageorgiou probably read:
1301
Q: UTF-8 all the way through

mercutio I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQ...

 
2:14 PM
tell me this...the heder and/or the meta tag tell the browser which encoding to user...AM I CORRECT?
..to use
 
2:33 PM
@DimitrisPapageorgiou yes, but this is only one bit of encoding...
There are multiple areas where encoding matters
e.g. how data is encoded...
How a data store encodes information
There are multiple points of failure
@DimitrisPapageorgiou have you read joelonsoftware.com/2003/10/08/…? If not, do read it.
Two decades old but it's mainly explaining theory which is still accurate
 
if the browser is being told which encoding to use when reading data(with header etc)....then what tells it how to store data...this is I do not understand
I will read though what you suggest
 
2:54 PM
@DimitrisPapageorgiou e.g. database
 
cmb
@DimitrisPapageorgiou you must not assume that there is a (well behaving) browser; some malicious user might talk to your server
 
@Tiffany what is we have static text in a page....where this is stored...since no db is used
 
I used to work at a place that had to pull in data from new customers, the data we were given could be encoded twice... user copied text from Microsoft Word... which encoded it with one character set, then pasted into phpmyadmin which encoded it whichever way the database encoded it...
Made for "fun times"
(this is one example to show how setting character encoding via browser isn't enough)
Anyway bbl
 
3:14 PM
i see
 
 
2 hours later…
5:34 PM
@Tiffany well..I use VSCode and the editor's default save formt is UTF-8....so here is the answer to my question....
 
6:15 PM
@DimitrisPapageorgiou point I mean to get at, encoding matters at every step the text is handled, not just setting it in the website.
If the text is static on a webpage, not extracted from an external source, that limits points of failure
 
 
3 hours later…
9:11 PM
ops, yes, the syntax is not PHP 8.0 compatible. It
would be better to use 8.1 🙂 nevertheless, i'll will fix this tomorrow
 

« first day (4244 days earlier)      last day (704 days later) »