« first day (2182 days earlier)      last day (2762 days later) » 

12:03 AM
@NikiC got called out by a PHPStorm dev :p
well at least they are paying attention to who is voting, eh
 
 
2 hours later…
2:23 AM
allahuakbar
 
i was wondering how can you do sql intersect range by date ?
if for example i have date which is covered by date on the other sql
 
 
2 hours later…
4:09 AM
@Tiffany I got what problem the code had. But how to resolve it? Problem is that it looks for words maching in query suppose AC and then Machinary. Both has AC in it so it takes previous radio and works on it . Guide me to overcome this
 
morning
 
4:24 AM
yomin
 
wyoming
 
github revoked my password, anyone else ?
(was leaked/hacked)
 
nope.
 
Hi @krakjoe,

Your GitHub.com account information was potentially accessed by a third party. Read on for more information and steps to reset your password.

**What happened?**
On Tuesday, October 4th, we became aware of a publicly posted textfile that was reported to contain GitHub usernames and passwords, possibly the result of a third party breach. We immediately began investigating, and identified accounts where the username & password were valid for GitHub, including yours.

GitHub has not been hacked or compromised, but use of these credentials could have allowed access to your GitHub 
I'm not sure what "possibly the result of a third party breach" means ... why does a third party have my password in plain text ?
 
ask them :)
 
4:35 AM
I think they mean some dc was breached
 
still, I don't know why they are storing my password, and don't know why they think people steal github passwords to get into your github account, that isn't what is going on here at all ...
 
maybe it's a phishing attempt
 
well it certainly isn't to gain access to things that are publicly accessible ...
 
4:55 AM
Can anyone help:

http://stackoverflow.com/questions/39883344/new-radio-button-not-clicked-but-old-can-be-clicked-ajax-php
 
@Linus what's that ?
 
@JoeWatkins sorry that's i posted some dumb thing.
 
5:11 AM
mornin
 
mornin Ekin
 
5:30 AM
posted on October 06, 2016 by remicollet

Bugfix release for **PHP 7** - fixes #19: Hung apaches on pthread wrlocks - fixes #188: Fix Segfault in ZTS build when locking (Tyson Andre) - fixes #194: apcu_entry ttl not working - fixes #189: SegFault in apc_copy_zval - fixes #185: zend_m...

 
5:40 AM
ormin ekin
 
6:04 AM
morning ladies!
 
mornin man
 
nice you guys are still here!
 
Pretty much always
 
yeah and are you very busy these days?
 
6:08 AM
yup i am busy in doing nothing these days
 
:P
 
moin
 
moin Joe
 
Good morning! And happy Prebecca day!
 
6:25 AM
@JoeWatkins There are still enough companies with bad password practices.
 
@kelunik Such as using the same password for multiple things? :D
 
hii
 
@Epodax Those are the users doing bad things. But it's even worse if companies store in plaintext or md5.
 
@Traxstar can you please help me in:

http://stackoverflow.com/questions/39889077/save-as-pdf-fpdf-giving-error-in-php
 
6:42 AM
!!google Some data has already been output, can't send PDF file
 
Search for "Some data has already been output, can't send PDF file" (https://www.google.com/search?q=Some+data+has+already+been+output%2C+can%27t+send+PDF+file&lr=lang_en)
• php - FPDF error: Some data has already been outp… - 28 feb. 2012 - For fpdf to work properly, there cannot be any output at all beside what fpdf … has… (http://stackoverflow.com/questions/9475686/fpdf-error-some-data-has-already-been-output-cant-send-pdf)
• FPDF error: Some data has already been output, ca… - 11 aug. 2013 - i think session.auto_start is set to 1. this will start a session and sends a PHPSES… (http://st
 
@MazharIqbalRana plenty of solutions ^
 
I did search did not get thats why cam here @Gordon
 
hey @Gordon
wait where are my manners. Good morning peeps :)
I'm trying to set up an exim4 relay
 
@ArianaCarter-Weir hey
 
6:46 AM
It's giving me aids. We are running a server with rackspace. That's all fine. The A record points to our rackspace box
The MX records point to another mail server on a different IP
When i'm sending mail from command line, it's resolving to localhost, hence we are trying to set up an exim4 relay. @Gordon i know this is the PHP chat room, but I've benefitted from your wisdom on this chat room for so many years now :P I figured you were the best person to ask.
 
morning
 
:D morning @Traxstar
 
@MazharIqbalRana There is already an thread with the same topic. Have a look in there
 
ITs different. Have mentioned already
 
@JoeWatkins A breach may also just log the incoming requests and extract POST data or such
 
6:51 AM
@MazharIqbalRana It is kinda different. But you need to look at this, analyze the difference and look forward to find the solution cause it is very similar to yours
 
@Traxstar I have updated question have a look please
 
@ArianaCarter-Weir no idea sorry. never done that
I would assume there is some config file for that somewhere. maybe in an /etc subfolder
 
7:11 AM
Guys...take a look at this gem:
nvm, was deleted
 
Wes
7:22 AM
\o
 
o/
 
what does "\o" , "o/" and "\o/" stand for
here on chat
@Linus and @Wes
 
waving hand
 
ok thank you
 
Wes
 
7:28 AM
a head and a hand
\o/ wooohooo
 
mornin
 
mornin
 
mornin teresko
 
Sorry this may not be the correct room, but would it be better/easier to make a slideshow of images with user controls using css slideshows or bootstrap carousel?
 
morning all
 
7:40 AM
 
does anyone know what happens to an array pointer when you delete what you're pointing to?
It goes up! In case anyone was wondering!
So it'd point to the next element in the array if you delete the current one
 
wat o_O what is a "array pointer"?
 
@m6w6 I assume the internal position counter
 
I'm guessing current() would return null? Easy enough to test yourself
 
!!eval $a = range('a', 'z'); echo next($a), PHP_EOL, current($a), PHP_EOL; unset($a[key($a)]); echo current($a), PHP_EOL, key($a), PHP_EOL;
 
ah shit. should have been key in the unset
 
@m6w6 ^
 
fuck angular
6
 
@Gordon Yes I was referring to the internal array pointer. Should've been clearer.
Worked it out myself xD Thanks again to whoever let me know of the scratchpad in PHPStorm
 
8:05 AM
!!eval $a = new ArrayIterator(range('a', 'z')); echo $a->next(), PHP_EOL, $a->current(), PHP_EOL; $a->offsetUnset($a->key()); echo $a->current(), PHP_EOL, $a->key();
 
@Rawrskyes behaves the same with iterators if you ignore that next() returns void there
 
The array iterator stuff is a little beyond me at the moment. But at least I know if I ever visit it in the future.
 
\o
 
Wes
8:18 AM
@tereško why? premise: i agree with that
 
@Wes because it is impossible to debug
 
morning
 
Wes
that must be annoying
 
then again I also have to deal with the rest of the project's codebase being absolute shit
 
@ChaCol Bootsrap for Big Data. If you are only using like 4 images bootstrap got to much functions u dont need
 
8:29 AM
Peers over to the active members screen, spots @Ocramius, chuckles
That closing keynote was brilliant
!!rfcs
 
Wes
what, stas voted yes
 
jeez, how hard can it be to write a login with php and mysql
 
8:44 AM
@Gordon I'm thinking... if all the examples start with $pdo = new PDO();, the copy pasters will copy pasta... and code in the wild will start new SQL connections all the time...
 
Oh yea, thanks for reminder, I argued for this and then didn't vote for it.
 
mernins!
 
> for people to take
Think they're missing the point of documentation / reference if they mean that literally
@DaveRandom Sure
 
if everyone/anyone could do retweeting of my last two poll tweets, so I get some good feedback on those ... kthnx
 
Went to twitter.com/joewatkins, was quite surprised
2
You've changed a lot since I last saw you :P
 
8:51 AM
yes, I am now a large black guy ...
 
@JoeWatkins and what are your preferred pronouns
 
I think I'm supposed to say apache attack helicopter, right ?
 
mine are 💩/💩/💩
 
@Sean to be fair: the SO documentation has no point
@JoeWatkins done
 
@Gordon thankyou
 
yo alma
 
Good morning
 
Moornin
 
'nin
 
9:37 AM
we don't have anyone that identifies as data scientist, or something like that, do we ?
I suppose math boffins may be able to answer ...
so these two polls, there are more answers to the second question than the first, how do you resolve the difference ?
if you don't know and think you would if there was an answer, say something ...
anthony would have an answer ...
 
Wes
isn't it just a proportion?
 
I'm not sure
 
@JoeWatkins I have one sitting about 3 meters away...
 
are results public yet ?
 
@JoeWatkins several approaches I guess, do you know who the answers belong to? You could intersect the two and exclude people who didn't vote on both
 
9:48 AM
@JoeWatkins Of those two polls? Not unless you vote
 
you don't get access to that
next approach @Leigh ?
 
password & confirm password validation in php- mysql project - is it better to do through php or through javascript ?
 
Another approach would be to normalise, but my gut feeling is that is not a good solution
 
what does this involve exactly, subtracting the difference evenly from the second result somehow ?
I thought of that, but without the intersection, it's hard to do fairly I think ?
 
You just treat them as percentages out of the total number of voters, but that doesn't feel fair to me either
delete and start again with a single poll covering all options :D
 
9:53 AM
yeah a questionnaire is much more suitable ...
there are other questions but I don't want to ask them now because I dunno how to make sense of the numbers I got from those really ... though they give me a rough idea of what I wanted to know already ... hopefully get some more rt's over the next day or two ...
 
I have no idea what you're talking about btw, twitter?
 
yes couple of twitter polls
Speaker friends and colleagues: Would you be able to prepare talks (short video content) for 11 to ~16 year old children on CS fundamentals:
2
Speaker friends and colleagues: If you could prepare talks for children, would you charge for that material:
4
 
Do you want me to vote on the second one to even it out a bit? :D
 
ha
no but please do vote on both
 
I decline, I am not a speaker
If I was, I'd totally do stuff for children at no cost though
 
9:57 AM
I'm not asking anyone to actually do it ... I'm just trying to find out how valuable those people who say they can are, and what kind of position I am in to negotiate for the material ... so answer honestly if answering ...
I think that might be why people are answering the second that didn't answer the first, because they wouldn't if they could ...
 
Can someone help me with payment integration firstdata using PHP, I have craeted demo account.
 
What cost is there beyond time? Whiteboard markers?
 
@Leigh candy. lots of candy.
 
@JoeWatkins wait what, what's this about Github and plaintext passwords
 
10:02 AM
they got my password, see the email I posted first thing this morning
they talk about a "breach" ... which bob pointed out may be some kind of interception of my password, but that would be really lucky, because I haven't put my password in for a matter of weeks, at least
 
@JoeWatkins if you're looking for content for that, you should totally just chop up this book and present it as the fundamentals:
 
@Danack what I'm thinking of doing is negotiating a contract for someone to work with me to produce the material, and it has to be owned by me/us ... so I'm fishing for answers is all right now ...
 
Wes
@JoeWatkins time to put new class() use($foo, $bar) to votes! tnx :B if you need a second pair of eyes for the rfc i'm here
 
Really twitter...
@JoeWatkins The way I read it is, when they became aware of the list of user/pass combos it could have been the result of a 3rd party breach, but after investigating they found that it wasn't.
And remember, this data could be old, regardless of how long ago you logged in, if your browser or something has saved your password, and your computer is somehow compromised, it could have been obtained that way.
If your computer is compromised, well, shit.
 
Yo
I have a number, and that should fit into this format: NNN
For example: 90 => 090, 1 => 001, 102 => 102
How could I approach that?
 
10:18 AM
@Xatenev see below
 
[ printf() ] Output a formatted string
[ sprintf() ] Return a formatted string
[ vsprintf() ] Return a formatted string
 
So I do something like %d%d%d ?
@Gordon Im confused how that helps me sorry
 
Anonymous
mornin
 
@Xatenev please read the entire page for sprintf. make sure to check the examples. then you will know how to do it.
 
Okay on it
 
10:22 AM
In particular "Example #5 Specifying padding character"
 
Thanks a lot
echo sprintf("%'.03d\n", $entity->getId()); that works great
Yea Found it already:)
 
@Xatenev if you want to echo it, you can use printf instead of sprintf. that will output it directly
 
Nono I do this $entity->setSubmissionNumber(date("Y") . sprintf("%'.03d\n", $entity->getId()));
So Im fine :) thanks a lot
 
@JoeWatkins done some digging, I've found the original leak, there's ~5200 emails in there
 
@Xatenev you can add the date('Y') into the sprintf call insteaf of concatenating
 
10:26 AM
For some reason theres a space after $entity->getId() - Why could that be Oo?
 
Hello everyone. Has anyone used xDebug before?
 
@Xatenev it's likely the \n
 
Oh yeah im dumb
Thank you gordon, this is good: var_dump(sprintf("%s%'.03d", date("Y"),$entity->getId()));
 
looks fine
 
Anonymous
News just in: databases to be “named and shamed” if they use foreign keys without trying to train local British keys first.
 
10:28 AM
@JayIsTooCommon E_MISSING_BREXIT_HASHTAG
 
Anonymous
:P
 
@JayIsTooCommon if only the background wasn't so very very very troublesome
 
@JoeWatkins you're listed under "devforums", I'm guessing a forum was hacked, and you used the same pass between that and github
 
Anonymous
@Gordon indeed
 
Most likely PHP Freaks?
I know they were hacked relatively recently
 
10:31 AM
why do bad things happen to good people ?
 
Is any of you familiar with xDebug that could help me out?
 
Because other people (good or otherwise) are bad at security
 
I don't like
but the email says they can't see any unauthorized use
so how did they find out it was good for github without unauthorized use ?
that doesn't make sense
 
Assumption: They were alerted to the list, they tested the user/pass combos to see if they would be valid
but could see they hadn't been used by a 3rd party yet
 
I'm bad at security, there are normal people - just fancy monkeys, and then security experts, the only people that are good by the standards of security experts are security experts themselves ...
 
10:34 AM
It's like this text file was the result of scouting, finding out what they could target ahead of actually doing something.
Actually, starting to doubt that, it lists a github group that you're not a publicly visible member of, do you want me to email you what it has for you?
 
yes, do that, please
 
Anonymous
@JoeWatkins Do you use 2FA for Github?
 
nope, fancy monkey
 
Your php.net pass is different right?
 
it is now
so github isn't storing in plain text, but some dev forum probably is
which is probably run by a dev ... well, I hope the bus factor gets them ...
 
10:46 AM
I've cross referenced a bunch of the emails against haveibeenpwned, a bunch of phpfreaks, a bunch of android forums, a bunch of vbulletin. Seems like it's a mashup of a whole bunch of hacks, and they've cross referenced with github
 
Hello, i have this link <a href="C:\Users\A183429\web\beamo/flight_notes/uploads/init.txt" download> when i click on it i am getting a The address wasn’t understood message , what wrong am i doing ?
 
But I'm not sure if I trust the "hasn't been accessed" thing they told you, how did they find out about that org that you're not publicly visible in
 
why can't they just get real jobs
 
@zouza the href is missing a protocol. and download is not a valid attribute last time I checked.
 
in fact, why don't we all just do that ... I think I'll be a carpenter ...
who's with me ?
 
10:51 AM
Holly crap then if i have multiple file type i am screwed ? because each type will need a different protocol ?
@Gordon it seems it is valid w3schools.com/tags/att_a_download.asp
 
Anonymous
@Sean ^ how's it going :P ?
 
it's just not widely supported yet
 
@zouza file://, however why would you download a file from your local hard drive anyway?
 
TIL
 
@DaveRandom it won't be local, i am just testing locally
 
10:54 AM
OK well then don't do it that way, you need to set up a local web server
 
@DaveRandom basically i can have up to 6 file types, i want to be able to downlaod these via my app
@DaveRandom i do have a server set up
 
OK well then use http:// URLs pointed at your local server
 
@zouza "last time I checked" >>> html4 :) on a side note: please use a proper reference
 
it doesn't really make sense to use file system paths
 
but should i use an a tag ?
 
10:55 AM
@DaveRandom php -S
 
C:\Users\A183429\web\beamo/flight_notes/uploads/init.txt should be interpreted as a relative URI by a browser I think
@Gordon I forget that's there
 
php -S is nice
 
Actually I only discovered that PHP storm has a built in web server yesterday
I don't do front end work though
 
it isn't nice
it's bad
and destined to stay bad
forever
 
<insert maniacal laughter here>
 
10:59 AM
@DaveRandom so i need a php script to do that for me ?
 
@zouza do what, sorry?
 
download my files
a link is not enough ?
 
@JoeWatkins :'(
 
do other people use 2fa for github and stuff ?
 
nope :/
 
11:00 AM
(have too for rm stuff whatever, maybe I should for everything)
 
@zouza You don't necessarily need PHP, but if you are testing that links work then you should be serving them over HTTP - because that's how it will work when it's not local.
Your local testing/dev environment should mirror the live environment as closely as reasonably possible
Ideally you wouldn't need to change a single line of code when you put something live
 
@DaveRandom ok pardon me, but how do you serve a file over http ?
 
what's happening ...
 
@JoeWatkins Yes
 
@Leigh I meant normal people
 
11:02 AM
@JoeWatkins I use 2fa for gh and some other services
 
I've seen you do security stuff, you can't deny it ...
 
Gmail, Github, Steam and work my only 2FA stuff, don't use facebook, don't care about twatter
 
I've got this app to help me with 2FA: duo.com
 
@zouza Let's say that your HTML file is called index.html, and that it's in the directory C:\webroot. If you put a file called foo.txt in that directory, and put <a href="/foo.txt">link</a> in your HTML, that would be served over HTTP.
Your web server's document root is configured to C:\webroot in that case
 
@Gordon Got lastpass + yubikey
 
11:04 AM
oh dear, why do I need an app to help ?
 
@DaveRandom but that's what i am doing , $filesPath = _ROOT_DIR."/flight_notes/uploads/";
		foreach ( $results as $row ){
			$return .='<a href="'.$filesPath . $row['unique_name'].'" download><img src="/images/btn_download.png" title="' . $row['file_name'] . '"></a>';
		}
 
there isn't a million things to remember, right ?
 
@JoeWatkins you dont. I just find it more convenient.
 
does it do basically what the google authenticator thing does ?
 
@DaveRandom oh i understand, i shouldn't be putting the absolute path
 
11:05 AM
@zouza remove _ROOT_DIR. from that code and it should still work
@zouza yes, this
however...
 
@DaveRandom Yes i am dumb, sorry , thanks
 
in general it's a bad idea to put an uploads directory in your document root
 
@DaveRandom it isn't, it's in a filer :) this is just for my test
 
try not to be too useful chris, you're making us all look lazy ...
 
:-P
 
11:07 AM
@JoeWatkins IDK what the google thing does. Duo lets you confirm directly from within the app instead of having to enter some verification code or something into the computer
 
I should probably find out how this thing works ...
 
@zouza here's a scenario for you think about: I upload a file called haxx0r.php which contains this code: <?php unlink('C:\Windows');. What happens when I click that link?
 
I will miss the old days ...
 
@JoeWatkins that's why I am using the app, so I don't have to find out :)
 
@JoeWatkins sorry, I'll go back to making fun of @Jimbo soon
 
11:09 AM
@DaveRandom but i have limited the allowed extentions to .doc .txt .pdf .docx and .csv
 
@JoeWatkins github.com/settings/security check last logins
 
@JayIsTooCommon Just waiting on @DaveRandom fixitfixitfixitfixitfixitfixit
(#88)
 
morning (again)
 
@DaveRandom i understand that what i am doing is not good. How do i need to go on about this (the right way ) ?
 
@bwoebi \o
 
11:12 AM
@JoeWatkins Yes.
 
@zouza OK well that's all well and good, but that are a lot of much more complex attacks that you can still expose yourself to. Luckily it's fairly easy to protect yourself against them :-) In general what you should do is store the actual data files outside the doc root (e.g. in C:\Users\A183429\web\beamo_uploads) with a name that you create yourself and a different file extension, and then store information like the file name in a database.
Then when you are offering the files for download you send them through a path like /download.php?id=xxx
And you serve the file through PHP with something like readfile()
 
I'm doing it, I already feel cooler ...
 
@JoeWatkins you don't need an app, you can use SMS (pro: app can use wifi when you have no mobile signal)
 
@Leigh s/pro/pro tip
 
@Sean mergificated
will deploy shortly
 
11:15 AM
I looked at some .l files in php-src source today
I feel dirty
I think I need some eye bleach
 
to be fair, I've never seen a lexer (or parser) for something complicated that wasn't horrible in some way, that doesn't use at least some hackery ...
actually I think the more you can hack the generator, and the more widely supported those hacks, the better lexer/parser generator you have ...
 
AQU
I agree
 
Even hand-written stateful parsers are ugly
 
@DaveRandom ♥
 
it's all ugly
 
11:22 AM
@Sean active what?
 
Interface segregation and repositories/table gateways. How do you name all the damn interfaces that just contain one or more queries? :(
 
@hakre no clue - gotta ask JMikola
 
@Ocramius Oh I just saw your avatar and got flashbacks to the closing keynote at PHPNW
 
I'm waiting for the recording of that :D
 
If anyone wants to get a Yubikey btw, Github users get 20% off
 
11:23 AM
The Neo?
 
neato, need to buy 2 backup ones
hmmmmmmmmmm
 
you selected "tray of 50"
 
@FlorianMargaine Well… TBH … there's much worse things out there…
 
@Leigh yes, tempting
that would be the best conference swag, plus I could simply give away badusb instead
 
11:27 AM
Hi, anyone working in WordPress?
Redux framework?
 
@asma we don't do wordpress here
 
:(
 
@asma I'm allergic to Wordpress plugins, I get eczema from it
 
Oops ... sorry to hear that!
 
things that plug in, things that plugin that require complex explanations to justify their existence ... on some level, that's why we are all here ... we should all order at least one ...
 
Wes
11:30 AM
apple people: i'm about to buy a second hand ipod touch 6g for testing websites only, should i check something?
 
@Wes yes, if you can invoice it on the client
 
Wes
:P
 
@Wes yourself before you wreckity-wreck yourself?
Also they are called "iPeople", not "apple people"
 
:P
 
lol
ippl
 
Wes
11:39 AM
iMbeciles
 
we better stop it, we probably owe apple some money already
 
y'all forgot about iDiots:
 
@JoeWatkins They'll never take me iLive!
 
@Ocramius I'm sad that this doesn't have more views
 
Wes
i can't avoid testing ios8 anymore. people is complaining about some things i don't get (which means that a newer safari is worse than an older one -__-)
 
11:52 AM
I'm extremely good at avoiding such things
 
ping @PeeHaa?
 
Anonymous
@PeeHaa ping?
 
@PeeHee?
 
hi, is there any way to parse protocol name and version while receiving request and sending response in php
 

« first day (2182 days earlier)      last day (2762 days later) »