« first day (2312 days earlier)      last day (2633 days later) » 

3:00 PM
you are still using a global variable
 
what would I do instead?
 
inject via constructor and then use $this->db
 
read about dependency injection, seriously
 
yeah I've never heard of it
reading right now
 
@nicarpe this is why you shouldnt be trying to teach others
 
3:02 PM
haha
yeah probably not
 
Anonymous
@tereško one extreme to another
 
... blame Trump?
:D
 
Anonymous
:P
 
Evenings
 
Is generating code a bad practice?
 
3:09 PM
@tereško I'm scared.
 
awwww yeah regex crosswords :D
 
@JayIsTooCommon no that's the embedded aerys
 
wow this is smartl ol
 
if you turn github.com/Room-11/Jeeves/blob/master/config/… off you can stop it from doing that @JayIsTooCommon if you want to shut it up
 
hello world
first time in chat room. any facebook graph api guru here?
 
@Trucy looks easy.
 
Now, add PCRE control verbs, assertions etc.
 
@bwoebi oh go away :-P
 
@DaveRandom uh, why? :-P
 
3:19 PM
Because we all hate you
 
:-(
 
:P
 
pff
 
E>
 
3:20 PM
ε>
 
maybe not
 
:P
 
@tereško that's so epic
 
@FélixGagnon-Grenier I assumed it would be that
 
3:22 PM
not bad
 
yeah, it's quite impressive
 
Anonymous
@DaveRandom nah it's alright, it just stops there. So something up with my env i think
 
lol context ^
 
@JayIsTooCommon oh right I see what you mean
yes that's probably connectivity issues
Although it should give you something else, but I remember having that issue once and it was just on one specific machine, I never figured out what caused it
 
would that work?
 
Anonymous
3:24 PM
@DaveRandom alright, will have a mess with it. Thanks
 
@nicarpe why are extending PDO?
 
(I found another problem with my problem: the constructor was never called, and I called my Icalthingy in the constructor… the generated code instantiates an empty object, THEN calls every set function)
 
originally it was to store statistics of the usage
but not needed here I guess
 
@nicarpe also... preparing statement by itself doesn't protect against sql injection. you have to actually parameterize your query
 
^ that
 
3:30 PM
Dear sed: Fuck off. Also die.
 
hmm
 
session_start() doesnt delete existing sessions does it
 
whenever i refresh my page, the value of my session is getting cleared
 
ohh I understand it kinda now
 
3:31 PM
That's because either your session cookie is not being passed, or you are reassigning the value of the data store
 
nm i know why
 
1
Q: Is it possible to get 'Real Time Comments' using 'Facebook Webhooks' for a specific post?

zubicsI have setup my app in Laravel to use Facebook's Graph API. I have all the required permissions to manage a page and also have page access token. Here is the scenario : I have subscribed the Webhooks for 'feed' of the page, it sends a json object on callback url for every change that happens on p...

 
@nicarpe have a read here. everything written there is not state of law, but it should get you in the right direction
 
@FélixGagnon-Grenier thanks. I'll take a look right away and try it out :)
 
@Trucy I've seen that before, printed it out even to give a copy to a friend.
 
3:43 PM
@Tiffany Give it a shot :D (maybe try the regular squared ones before)
 
@Trucy ehhhhh I'll pass. I like my sanity.
 
alright, time to get ready for my interview
 
at least what little sanity I have left
good luck!
 
@Trucy tell them about your keyboard
 
@Tiffany thanks!
 
3:52 PM
her keyboard? what did I miss?
 
@FélixGagnon-Grenier "What can you bring to the company? - My totally rad keyboard here look at this beauty"
 
:D
I'd hire you right there.
 
Anonymous
wtf
 
3:53 PM
if it works for you...
 
we have a contender for the geekiest of r11
I'm not even sure a hand made smart phone would beat that
 
I'll try to find an english article about the benefits of the bépo layout
@FélixGagnon-Grenier speaking of phone, guess what is the layout on my smartphone?
 
@Trucy it's only good for french, with al those nasty characters like à and è and é, I already hate it ^^
 
@FélixGagnon-Grenier wrong, bépo
 
3:55 PM
:)
 
@Naruto you have un problème with le french? :D
It was made for french yes
 
pas du tout ;)
 
I'll find an article in english for you :D
 
i'm from belgium, I'm supposed to know forced to learn both languages :P
 
bepo.fr/wiki/Pr%C3%A9sentation for the français speakers
@FélixGagnon-Grenier also, I have an ergonomic (vertical) mouse
 
3:57 PM
damn. working le computer must feel good
 
and my window manager is i3
@FélixGagnon-Grenier If I don't my wrists le hurts :(
anyway, gtg
 
I dunno why people are calling sodium part of the standard library in 7.2
 
a wild krakjoe appears
 
hai
 
4:01 PM
o/
 
@JoeWatkins if we include it by default, is it reasonable to include the nacl code directly in the php-src?
 
@bwoebi absolutely not
security code in particular requires out of band patches
 
@NikiC I mean we're also doing it with ext/pcre
 
yes
no distro actually uses any of the bundled code
it's against security policy
 
@NikiC hmm okay
 
4:03 PM
apart from windows, getting dependencies is usually not the issue
 
@Trucy I want to try colemak sometime
in CSS files: one space in between the selector and the brace, or no space?
 
wat wat vacation wat wat wat
heheh =)
 
@RonniSkansing are you on vacation?
 
more to the point: why are you in here on your vacation? go enjoy your vacation
 
4:13 PM
a week of vacation
oh
hehe
 
Anonymous
@Tiffany are you trying to say R11 isn't enjoyable!?
 
I'm here when I'm at work or want to work on personal projects at home.
If that gives you any clue :P
 
any reason why this wouldnt work, it works when i do it in sql but the code runs with no errors but doesnt delete the row
$userId = $_POST['userId'];	//Get the user id of the profile that was clicked

$sql = "DELETE FROM users WHERE user_id = ?"; //Delete the user

$stmt = $conn->prepare($sql);
$stmt->bind_param("i", $userId); //Declare ? as a integer with the value of the user id
$stmt->execute(); //Execute the query

$stmt->close(); //Close the statment and connection
$conn->close();
 
do you need an i next to the question mark in line 3?
 
the bind looks strange
 
4:15 PM
I'm asking it because I'm not entirely sure, been awhile
 
dont think so, all my other querys follow this template and work fine
i havnt deleted anything before tho using a query
 
you're correct, I looked it up
 
and maybe first bind than prepare
 
ok ill try that
 
Morning
@RachelDockter Does your user have delete permissions?
 
4:18 PM
I'm sick of not doing work ._. Emails this, follow ups that. Can you do this for me please?
 
You're not actually checking the result of $stmt->execute(), so it's possible your query is failing.
 
Just let me do my job, jesus.
 
I think you need VALUES() in your prepared statement nevermind based on the first example.
 
i cant bind it before its prepered, im getting a few errors with that
@Trowski i think so
ill check the results hold on
 
Think I figured it out
 
4:19 PM
my whole computer is freezing
 
@RachelDockter Add if (!$stmt->execute()) { throw new Exception($stmt->error); }
 
ok i also did a var dump of results
 
@Sean try that when you manage three projects that affect users of all types. x_x
 
ohhhhhhhhhhhh
 
@Sean my day sometimes turns into babysitting
 
4:21 PM
Fatal error: Uncaught exception 'Exception' with message 'Cannot delete or update a parent row: a foreign key constraint fails (snake_database.posts, CONSTRAINT posts_ibfk_1 FOREIGN KEY (user_id) REFERENCES users (user_id))' in C:\xampp\htdocs\snake\functions\deleteProfile.php:37 Stack trace: #0 {main} thrown
its because the user id is a foreign key in another table
 
seems you should enable error reporting
that kind of exception should come up without you having to search for it
 
oh right
 
@FélixGagnon-Grenier Actually the issue was that she wasn't checking the result of the query, I had her add code to throw that exception. :-)
 
@RachelDockter looks like you are trying to submit a post for a user_id that does not exists in the users table sorry ... wrong
 
@RachelDockter You should be checking the results of your queries, it will save you a lot of debugging time later.
 
4:23 PM
so i should first delete every row which consists of that user id in the forein key table, then delete it in the parent
 
@Trowski yeah, exactly... one should not have to do that for every statement, the EXCEPTION param should be built in the connection :)
 
@RachelDockter Right
 
normally i am but i didnt think this one had a result since it was just deleting a row
 
@FélixGagnon-Grenier Can you do that with mysqli?
 
I hope so...
if not... mysqli is losing yet more points
 
4:25 PM
@RachelDockter you should have defined the table with ON DELETE CASCADE
that way, when you delete a user, it would also delete all the associated posts
 
the foreign key table? can i just edit it now so it does that?
 
you probably can edit it
 
i hope so i dont wanna have to make the table again
im googling it now
 
you should be able to alter the existing table
 
4:29 PM
seems like i have to just make the foreign key again
 
oh, my goodness. I just realized I can switch between meta and main from the stack exchange sites
all these years, I have been painstakingly visiting my profile, (or any profile) in which I would click on meta/main user, then click on the header
not sure how I feel
 
-1
Q: How to rid of Save As dialog and yellow box in tcpdf

Waqas BukharyWhen I generate and save a document with a link in it using TCPDF. It is always showing a save as dialog before closing in the pdf reader. "Do you want to save the changes to file.pdf before closing?" Also there is a yellow note box in the chrome browser when I hover over the link... as shown ...

 
@FélixGagnon-Grenier you can just prepend a meta. to the url.
 
can anyone tell me how to rid of yellow box in chrome
 
@littlepootis yo, that's like, FIVE keypresses!!!
 
4:34 PM
You don't have to reach for the mouse.
 
@tereško would this be the correct thing to change? im scared to click the wrong thing and it messes it all up gyazo.com/7b0e7ca5a1bf50d0704365b263aeee97
 
@littlepootis hmmm... how do you get to the url bar?
 
@RachelDockter yes
 
shift tabs might be long
 
Ctrl + L
 
4:35 PM
ok thankyou
 
hmmmm... :)
 
also, @RachelDockter, you should keep all the CREATE TABLE statements in a file within your project
in case something blows up
 
oh i get what u mean, is there anyway to get the statment that will create all my tables as they are now?
or would i have to work it out
 
should be
I havent used phpmyadmin in .. emm 5 years
 
oh damn thats ages
 
4:41 PM
you can run: SHOW CREATE TABLE tablename
 
or export your database structure as text, to get the whole schema
there's a tab for that
 
that too
/me tends to use MySQL Workbench
 
yeh im gonna export it
 
@tereško is there a safe way to store the mysql login?
or a convenient and safe way rather
 
@ScottArciszewski ping
 
4:46 PM
@nicarpe safe from what?
 
@tereško against *
 
@Shafizadeh from*
 
sorry let me rephrase
 
@littlepootis really!? I take it back then @tereško
 
Is there a safe way to conveniently store MySQL credentials?
 
4:46 PM
@Shafizadeh *against whom
 
@nicarpe I usually store them in environment config files.
 
Such as a config.ini with some info?
 
@nicarpe you should not have any significant PHP code in the DOCUMENT_ROOT. Also, you can always restrict access to the DB to only be allowed from localhost and have no password required for that user
 
Yeah I thought of making a directory and then restricting access to everything in there
through htaccess
 
oh shit i just deleted the admin account
 
4:48 PM
@JoeWatkins May I ask why did you ping him? In other word, did you ping him because of "login" topic? (Isaid that because I've seen some great answers from him about login)
 
@Shafizadeh not related to whatever you are talking about
 
@RachelDockter that's impressive
 
yeah good idea
why not require a password though?
 
@JoeWatkins ah ok!
 
4:49 PM
I mean, it's not necessary, but I think it'd be a good precaution to take
 
@nicarpe what if apache config fails?
what if mod_php fails?
 
php would break yeah
and the entire webserver I think
but how does that affect the "need" for a password? (just curious haha)
 
if mod_php fails to load, all your source code becomes readable
 
ohhh
good point
 
all your source code in DOCUMET_ROOT
 
4:52 PM
clever
thanks!
 
wat, no
 
@tereško what do you mean "document_root" exactly? where are you trying to point out?
 
Document root is the directory your web server considers the "root folder".
 
from what I understand, if the mod_php fails to load they can read your files in your document root and your password
 
@littlepootis wut *
 
4:53 PM
Morning.
 
@Shafizadeh it's what you define in apache config
 
you know where the files are stored for the website
 
@Shafizadeh it's the directory where http://localhost/ points to
 
@tereško do you mean where which is usually /var/www/html ?
 
s/usually/by default
 
4:53 PM
@tereško Ah ..! You mean "root" .. got it, thx
 
"web root", "document root"
 
Ah, they are synonymous
 
not really, but people treat them as if they are
:P
 
:-)
btw, how should I read this? "s/usually/by default"
what is "s" in the beginning?
 
substitute
 
4:55 PM
so I suppose you could do something like $config = parse_ini_file('../includes/config.ini'); and then grab the values using $config['name_of_value'];
right?
 
s/A/B : substitute A with B
 
@tereško oh oh ..! I got it now (after lots of useless attempts)
@littlepootis yeah, got it
@FélixGagnon-Grenier thx :-)
 
4:59 PM
Morning
 
@teresko how would you remove the password for localhost connections?
 
!!dad
 
Why did Google Car switch from MD5 to SHA512? They wanted to reduce collisions.
10
 
Wes
\o nings
 
O/
 
5:05 PM
@nicarpe you don't
 
guys, is "valentine's day" a special day for you too?
or "valentine" is an unknown word for you?
 
What's that?
 
the latter then !
 
5:20 PM
he knows what that means, he's lying (or being sarcastic)
 
oh...!
 
@JoeWatkins hi
 
@Shafizadeh Valentine's Day is when the PHP community celebrates the day Rasmus professed his love to Lunus Torvalds and created the first LAMP stack
5
 
:p
 
5:30 PM
Valentine's Day is another obligatory holiday where I'm forced to buy something, because even though she says she doesn't need anything, I know she'll be disappointed if I don't get her something, and eventually that disappointment will manifest itself into disgust and loathing.
 
@Machavity :D
 
@Trowski I pity those who need a "not-holiday" as an excuse :P
 
I enjoy buying gifts, but I'd rather they be spontaneous than mandated.
 
There's no mandate, it's not obligatory
 
@Trowski If you haven't been spontaneous frequently enough do you think you should get her something?
 
5:33 PM
@LeviMorrison I have been, so I know she wouldn't care if I didn't get her anything specifically for Valentine's Day, but I will feel guilty if I don't.
 
@Leigh Only if you're single :P
 
I guess that's my own problem… :-P
 
I got my wife a new towel robe for Valentine's day. Not that it's for Valentine's so much as she needed a new one and delayed it a week or so it would match the holiday.
 
@Machavity Even when I wasn't, we didn't put value in consumerist "days"
The more you buy into it, the more you have to buy into it
 
Wes
do you have faustinus' day? en.wikipedia.org/wiki/Faustinus_and_Jovita
 
5:37 PM
@LeviMorrison I keep a gift stash for when she's had a bad day or I just feel like giving her something. Holidays mean nothing spontaneous comes out of the stash near that day.
 
Wes
> Modern tradition considers Faustine's day as the anti-Valentine's Day. This is why (mostly in southern Europe) single people celebrate on 15 February.
ie, forever alone day
 
@Trowski Stash sounds... non-spontaneous :p
 
@Leigh Well, that's true. The timing is the spontaneous part I guess. The stash exists because I try to buy stuff to fill the stash around the holidays or when I see something I know she'll like.
 
pro-life-hacks.jpg
 
6:00 PM
I will no longer repin message #35473048
 
@LeviMorrison can you burn opengrok02 when you get the chance please? 01 will be live when the indexing finishes, which should be within the next half hour or so ^
 
Hello, I have questions related with PHP and HTML is better to ask them here or in HTML/CSS room?
 
I'm hoping that the load balancers will be live by the end of the night
/me goes home
 
@DaveRandom burn?
 
@LeviMorrison yeh just wipe it and I'll rebuild it
 
6:02 PM
I'm nervous about that :D
 
I'm hoping that will sort out the disk space issue
@LeviMorrison Oh OK :-P
 
But there is the disk issue so...
Just to double-check; burn 64.137.242.171?
 
hang on a sec
yes, that one
 
Deleted.
The VM will come up quickly but then I'll have to make you users and whatnot.
 
no worries, I have plenty to be getting on with
which right now is getting in the car and going home, so o/ for now
 
6:05 PM
And as a reminder we'll have a new IP.
 
Yep no problem
actually bye :-P
 
Anonymous
!!version
 
@DaveRandom Its IP is 64.137.216.149
 
I'm doing a little chat in PHP/SQL to train myself and I have a problem.
I would like to oblige people to put a pseudo and a message
In the HTML lesson I read they say to oblige people we have to put a "required" in the <input /> but it doesn't work in my PHP code
Can someone tell me what would be a good idea to do it ?
please*
 
6:26 PM
@Hexacoordinate-C You seem to be mixing up 2 or 3 layers there. Adding required to the input field only affects the HTML (Your form won't submit unless that input field if filled). It doesn't change anything in PHP's behavior
 
Well I mean in my little chat if I let both pseudo and message empty I can send something
Even if there is a required. But I don't really understand what he must do. In w3school they say "When present, it specifies that an input field must be filled out before submitting the form"
 
@Shafizadeh, btw, before I try doing some code-review, could you fix the indentation in your project?
 
@DaveRandom Should be able to login now.
 
following the semi-official standards would be nice: php-fig.org/psr/psr-2/#indenting
 
@pmmaga look at the difference (par = by and envoyé = sent)
 
6:32 PM
@Hexacoordinate-C How does your HTML (the input) look like?
 
@pmmaga like this <input type="text" name="pseudo" id="pseudo" required/>
And even with required="required" it doesn't work
 
@Hexacoordinate-C Is it submitted normally or via JS magic?
 
I haven't learnt js yet so...nothing magic for the moment ^^
And I am in last Chrome version so that's weird lol
 
@tereško why not ..! I will use tabs in all places (not both spaces and tabs). Anyway, you should be waiting for my next commit :-)
 
@Hexacoordinate-C Hmm.. On the bright side, you can use this opportunity to learn that you can't trust client data and that your server-side should do these checks as well :P
 
6:44 PM
@pmmaga (I forgot to actualise my page) ... ^^
Now it works :D
@pmmaga thank you and sorry for disturbing you
 
@tereško would u be able to reccomend a plug in of some sort that lets me display graphs and charts on my webpage using the data in my sql database? if you know any
like a javascript plug in or something
 
@RachelDockter d3.js
 
this looks very cool thanks
 
oh i like this even better
 
7:01 PM
is chartjs.org a server thing
or can i just add the js file to my website and use it like that
 
the latter
 
I used chartjs last week, it's great @RachelDockter
 
did u use it with a server shafiza
 
Jeeves-ers, what're your thoughts on moving plugin specific exceptions to Plugins/PluginName/SomeException.php?
Or moving them into composer packages
 
When deploying my application I use nohup to start some daemons before the session ends. The problem is when I redeploy the old daemons are still running and now there are duplicates. Does anyone know how I could kill any daemons which were started from the last deploy so there are never duplicates?
 
7:14 PM
@Sean ping @DaveRandom
 
@RachelDockter nope .. it's all about js codes which is client side
 
thats exacly what im looking for, did u just include 1 js file and that was it? if so can you please give me a download link , i went on their website and i have to download a big zip file with hundres of js files idk how it works
@Shafizadeh
 
@RachelDockter I can answer this question tomorrow, when I'm at work :-)
I don't remember what have I done :-)
 
ok ill keep on looking in the mean time, thankyou
 
@RachelDockter use cdnjs cdnjs.com/libraries/Chart.js
 

« first day (2312 days earlier)      last day (2633 days later) »