« first day (1707 days earlier)      last day (3241 days later) » 

8:00 AM
@tere
@teresko okay...i will but can you find the bug...
 
what does that bug actually do ?
 
10 hours ago, by salathe
@Jimbo http://i.imgur.com/vpsWcKV.png
 
you were saying something about session, but that code doesn't have $_SESSION anywhere
 
@salathe I want that on a tshirt for next PHPNW :P
 
I don't think the tech will be there before PHPNW
 
8:09 AM
That's pretty cool stuff, E-INK newspapers on the way...
 
@Jimbo emm ... that's like air-conditioning for your new saddles
 
@teresko Now please do a look in gisthub
 
Is it normal/accepted to answer a question yourself when an answer led you to the correct answer but didn't include something vital?
 
@Amelia If most of the work has gone into the other answer that already exists but something tiny is missing, just edit it
It depends how large the vital part is
 
@Amelia that, or edit the existing answer, whichever makes... yeah what @Jimbo said
 
8:13 AM
@user12688 and how the "it doesn't work" actually looks like for that code? What is the issue that you are seeing?
 
Well, wondering whether I should edit and delete mine: stackoverflow.com/questions/30866187
It doesn't exactly have the answer in it, but it did lead me to the right one :p
 
@Amelia Meh, it's your call. The aim is to help users, which do you think would be more helpful? Moral decision (this is like choosing the little angel or devil on your shoulders)
Will you set the goat free, or will you throw it off a cliff?
 
Lol
 
@teresko When i select duration from the 3rd select box , a confirm box appears ,if the answer is 'yes' then the tour.php page is loaded in home1.php...
@teresko you can find the ajaxcall for 3rd select box in home.php file from gits
 
and what should be happening instead?
 
8:18 AM
@teresko in ajax_data.php file i tried to store all the selected values of starting point in a session variable but it doesnt work..
 
did you understand, what I was asking you?
 
> If you see a bunch of output that ends with an ASCII cat picture, you're in business.
@SammyK this is possibly the best way to indicate a successful operation
 
@teresko i need the values of the 1st select box to be stored in session variable that is in ajax_data.php
 
why do you keep ignoring my questions ?
besides, I don't care what you "need"
I asked you what is the current wrong behaviour and how it should be acting instead
 
@tereško: does throwing bread at ducks make them less likely to come back for more?
 
8:22 AM
Apparently you're not supposed to give ducks bread.
 
Hi.
@Fabor since when?
 
@Jimbo: I'm too nice, which is probably why I'm the lowest-rep freelancing mod (I keep letting the other mods answer)
 
@Amelia depends on whether you can aim for an eye and hit
 
They offer some alternatives anyway.
 
8:24 AM
@HassanAlthaf yup. I like that.
 
@FlorianMargaine Like what? xD
 
that they offer some alternatives
 
yh
Finally, I am going to finish that stupid project.
:D
 
@HassanAlthaf we have reportedly told you to not say this kind of thing.
 
@teresko Array ( [0] => nagercoil [1] => kochi ) these are the two starting points in array....when i select other place the array index 0 and 1 gets replaced repeatdely ..Array ( [0] =>Chennai [1] =>nagercoil )
@teresko i want the entire selected values to be stored in array rather than repeating by itself
 
8:27 AM
@FlorianMargaine Sorry, once again. I forgot. I have edited my line.
 
sorry, @user12688, but cannot understand what you are saying
please ask somebody else, because my eghlish apparently is not good enough to decipher
 
@teresko okay ...any ways thanks for spending muuch time on it....
 
It's not your English @tereško
 
@teresko s ...its not ur english....
 
@user12688 You need to outline your question better, you won't get help if people don't understand you. Write it out properly showing code examples somewhere and then share it. Like pastebin.org
 
8:31 AM
@Fabor he already posted some code on gist
 
@tereško I came in halfway through this and I still have no idea what on earth is going on :p
 
hey guys any code editors to post the image ...other than stack overflow
 
All this time, do we still not have someone in here who works high up in a data centre or something?
 
Also, the urge to slap people who make their (non-controller) classes dependent on a container/service locator by not using dependency injection is rising rapidly while going through a zend framework 2 project I just upgraded to 2.4. >.<
 
@Fabor we're developers, not sysadmins
 
8:36 AM
Fabor: I have root access to company hypervisors if that counts? :p
 
@FlorianMargaine Yeah but we have connections -_-
I want free powerful servers.
 
sockets only go so far
 
I cant post my questions in stack overflow now thats why??
 
@Fabor: just get everyone to share digitalocean referrals around :p
@user12688 are any of your questions deleted?
 
@Fabor depending on the purpose, I or @rdlowrey can get some, iirc.
 
8:38 AM
You may be question-banned.
 
Friday lol (Not Rebecca)
@FlorianMargaine Really? I thought he worked for himself. He has the best looking boss in the world.
 
@Amelia yes...Is that the reason for blocking from posting my questions
 
How many are deleted and what are their scores?
 
@Amelia only one....-2
 
You should answer some questions and get some rep; eventually you'll be able to post a question~
 
8:41 AM
@user12688 Follow the instructions presented to you. If you can't read simple instructions it means the ban process works imo
 
^ that too. In addition, edit your deleted question and flag it for undeletion once it looks good.*
(Good being subjective; spending more time on the site will lead you to figure out what's a good question)
 
@Fabor I don't know about high up, but I still have limited access to Tumblr's data center.
 
C i'm a beginner n php...I will try my level best to answer to the questions...
 
@Sherif Can I have a free powerful server? :P
 
@Amelia but for now what is the possible way out?
 
8:44 AM
@Fabor Nothing in this world is free my friend.
 
2 hours ago, by tereško
please use full length words
 
Okay, I will trade you friendship for it.
 
heh
 
See you cannot ffing follow directions. You're hopeless
 
Hey @LeviMorrison can the PHP.net page about mysql_query and mysqli_query warn against SQL injection and explain what it is? (Or, for the very least show how to use parameters). I'm very surprised to see it doesn't do it yet.
 
8:45 AM
I wish I could walk out of there with some of that hardware, but unfortunately between the five gated security doors that each scan the rfid tags on the boxes, and the biometrics scan, there's just no chance :)
 
@BenjaminGruenbaum Our SQLi prevention page reaaaaaally sucks ATM. It's been on my list for loooooong
 
@BenjaminGruenbaum suggest that on the documentation mailing list, and then after the flame war ensues, go and edit it in yourself :p
 
It sounds so important to do.
 
Yeah it is and I feel bad
 
@Amelia No, I have no interest to invest more time in it. It's just really important, a lot of PHP's bad rep is due to SQL injection etc.
I'm very surprised there is no big red "WARNING:" on these pages.
 
8:47 AM
@BenjaminGruenbaum Well, we do actually have an entire security section that I'm sure no one reads. It does include a dedicated section on SQLi. I'm sure we could link to it.
 
2 mins ago, by PeeHaa
@BenjaminGruenbaum Our SQLi prevention page reaaaaaally sucks ATM. It's been on my list for loooooong
 
@Sherif well, then link to it.
You guys (and gals) worked so hard to make the language better - this is a super low hanging fruit.
 
@Sherif I've never seen that. :P
 
It's not a bad idea actually. Should be added under related section for all DB functions.
 
Like, absurdly low hanging, as in a 2 line change.
 
8:49 AM
cc @salathe ^
 
Why discuss? It's a one-liner change really :p
Someone just has to want to commit it and I don't have svn on this computer so ...
 
@Sherif there's the online docbook editor
 
And I'm definitely not touching that wonky thing called edit.php.net
Yea, you couldn't pay me to use that thing. I don't trust it.
Awww, I miss the kitty in ./configure.php :/
 
@ircmaxell you should write a tool that scans mysqli_query and mysql_query in code bases for not using prepared statements (that is, a pattern `mysql(i)_query, followed by "(", followed by string literal, concat to something that is not a string literal and then ")". Given you already know how to parse PHP it's super easy to write, would make for a nice blog post and could be a nice linter
 
8:54 AM
There's nothing inherently wrong with using mysqli_query in and of itself.
You just probably worked with a lot of people who aren't diligent
 
@Sherif of course not, I'm explicitly talking about _query("SELECT ..." . $var . "...) or _query("SELECT ..." . $var) .
 
Even that may be fine given that you escaped properly. The real worry is thinking that a catchall and the sole notion of using prepare* is what saves you from SQLi.
 
@Sherif it might be fine, but I would not pass it code review in a million years.
 
There is no turn-key to security. You just need to learn some due diligence and that usually takes time.
 
hi
 
8:56 AM
Yea well, code review is another matter entirely.
 
Of course it's not a silver bullet for "security", but it's a surefire way to avoid SQLi
 
hello
 
That's more of an internal process that differs from one place to another.
 
Right, which is why I suggested Anthony writes a linter.
 
@BenjaminGruenbaum I wouldn't say surefire way. You could still get screw up prepared statements the same exact way and infact many people that make the switch often do.
 
8:58 AM
I am good harsimer sir
 
They just repeat the same methodology using prepare
 
@Sherif What is infuriating when doing code reviews is that I see novice developers getting angry with PDO/prepare throwing errors and instead passing in raw user input and falling back to copy-pasted mysql_query code from a blog
I have actually slapped people for that
 
:)
 
@Amelia Point in case
Understanding why is usually a lot more valuable than being told one way is bad and another way is good.
They can both be equally as effective so long as you understand what you're doing.
 
If I see an experienced dev doing that, I usually ask what the benefits of not using PDO are and make sure they escape properly
 
9:00 AM
> I asked. The answer was: based on usage numbers, we’d drop desktop Linux before we drop Windows XP. --(why firefox supports xp)
 
Novices? Assume they're doing it wrong and explain the right way.
 
I mean simplifying is great, but don't confuse the benefits of preventing failure with learning from failure.
 
@harsimer @SoniaSarangal please talk only in english here. unless you want to get ban..
 
Anyone else getting a security warning from php.net
(with a www. prefix)
 
sorry @mr_green
 
9:01 AM
What security warning? Malware? Or ssl? @Amelia
 
@PeeHaa TLS
 
@Amelia no, just "address unreachable"
 
www. seems to be self-signed here
 
Oh yeah. It's down for me, but they are using a cert with a weak sig
 
@Sherif how would you screw them up?
 
9:03 AM
@BenjaminGruenbaum $query->prepare("SELECT foo FROM bar WHERE baz = $qux")
 
@FlorianMargaine that would error in the linter.
 
regular php.net is fine but with a weak sig, www.php.net throws this: i.imgur.com/j3jVq4o.png?1
 
@FlorianMargaine I have actually seen it in live code
 
@BenjaminGruenbaum sure. He's just saying that in usual conditions, prepare can be fucked up too.
 
@Amelia lol wut?
 
9:04 AM
@FlorianMargaine and the linter would catch that
 
(Question is: am I being intercepted or is this happening for others?)
 
@BenjaminGruenbaum also, you were saying that your linter should just scan mysql[i]_query, not prepare :P
 
@BenjaminGruenbaum what linter ?
 
who is flagging here?
 
9:04 AM
It's funnier because it's the security link :p
 
@FlorianMargaine sure, what I'm saying is that @ircmaxell is pretty damn good at parsing and processing PHP and that it would be a really useful and popular tool.
 
I wish I had mod access to chat.so as well as chat.se D:
 
I can't open php.net but i can php.net
 
I love how www. is stripped, makes this entire conversation confusing
 
@SulthanAllaudeen What's the error you get?
 
9:09 AM
@kelunik Can't even opening : This webpage is not available

ERR_CONNECTION_REFUSED
How about urs ?
 
What's with https://php.net?
 
@kelunik read what I said above
8 mins ago, by Amelia
regular php.net is fine but with a weak sig, www.php.net throws this: https://i.imgur.com/j3jVq4o.png?1
Also, I just pressed cmd+6 in phpstorm...
> Found 1,720 TODO items in 838 files
 
@RonaldUlyssesSwanson BWAHAHAHA
 
LetsEncrypt has a launch date! (September 2015) letsencrypt.org/2015/06/16/lets-encrypt-launch-schedule.html
 
@Amelia The fact that even with a massive effort behind it, it takes that long to get going indicates to me that the technology choice is just not a great one......also a single point of intrusion to infect a huge number of websites? The NSA must have a party booked for that date.
 
9:22 AM
@Danack you have to jump through a webtrust audit, which is no small task (and costs around $500,000)
Which is why so many CAs opt to be under a trusted root
LetsEncrypt is cross-signed by another trusted root, but is a root CA
Which means you need to manage the entire infrastructure of operating as a root CA (and the massive audits for it). The fact that their issuing servers are open-sourced is also going to be an interesting one.
 
HI guys
 
@Amelia I didn't know that last part. That is kinda interesting
 
@PeeHaa iirc it has never been done so far by anyone who has passed a webtrust audit
 
from past one day I was working on OOPS concept in PHP and stuck at this point .... what is ? parent::__construct(); while googling I knew that it calls parent constructor but why?
as we know that parent methods and veriables are inherited
implicitely
 
@John parent is the class that the current one extends (Foo extends Bar will call Bar's method)
 
9:26 AM
so why and when we need to call this method?
 
parent::__construct would call Bar's constructor in this case
 
but why?
as we know we are extending parent class
 
@Danack I'd recommend you pin your certificates with HPKP
 
so no need to call explicitely
 
@John Because if you override a method in php when extending, you may sometimes need to call the parent method. The parent method is overwritten and not called unless you use parent::method().
 
9:30 AM
And there may be useful stuff done in the constructor that you want called.
 
If anyone has knowledge on the yahoo php sdk... please take a look at this, driving me insane! stackoverflow.com/questions/30919089/…
 
so you mean that this is all done for important stuff in parent constructor that need to be overriden in child
 
@John No
@John Let me give you a code sample to explain it.
 
please...
 
Trivial examples that are pointless, but it shows that you can choose whether or not to call a parent method of the class you are extending
 
9:41 AM
if ($_SERVER['PHP_AUTH_USER']=="104739207691671@Accounts.Google.Com")
{ do something }

Whats wrong with this syntax, although
echo $_SERVER['PHP_AUTH_USER']; gives me same 104739207691671@Accounts.Google.Com
 
@Silver89 You're calling getContacts with two arguments, the first of which is 0, are you sure you meant to do that? According to their github, that method expects expects $guid as the first argument and the offsets as the proceeding two arguments.
 
@Sherif I'm not sure why I hadn't noticed that, will give it a try thanks
 
@Silver89 Based on the fact that they check $guid == null and not $guid === null, my guess is that $this->token is what's available some of the time when your code doesn't fail and not other when it does fail.
Because 0 == null of course
 
@Sherif but if I var_dump($contacts) when it fails then I get FALSE which is what's returned when the query result is null?
 
@Silver89 Looks like they try to fail gracefully here github.com/yahoo/yos-social-php5/blob/master/lib/Yahoo/…
My guess is if the yql query failed, it just doesn't have a result and thus they return false from that getContacts method.
Though I haven't bothered digging too deep here so do test for yourself.
@Silver89 I mean, you don't set the token in the construct when initializing the YahooOAuthApplication object, which is where it appears to be initialized github.com/yahoo/yos-social-php5/blob/master/lib/Yahoo/… so yea it'll be null there.
That would make sense.
 
9:59 AM
@Sherif still get the same issue when passing the guid and setting the token on initialization
 
@Silver89 Hmm, maybe there's some network issue when talking to yahoo. Have you checked your error logs for any timeouts/connection problems?
Yahoo is not exactly known for having the most reliable of services :)
I can't tell you how many errors I've seen show up in the error log when working with their ad server, heh.
 
Tell me about it, the documentation is none existent as well. Would you expect these to be in the access or error log?
 
I'd expect them to be in the error log if they are errors.
 
Nothing at all
 
Interesting. Perhaps check to make sure error_reporting is turned all the way up and validate the error_log path in phpinfo()
 
10:05 AM
Oh, ssl error log has 1000 milliseconds yahoo timeout
 
Other than that I have no idea.
Ahh
SSL timeout is pretty common. Try adjusting it maybe.
 
Guys, you see the @foreach($round as $player)
 
1 message moved to bin
 
Use a pastie service? You have been vamping in here long enough to know that by now
 
10:06 AM
Guys, in that code snippet,
On line number 11
@foreach($round as $player)
The array $round contains 16 elements
Meaning, index 0 to 15.
However,
When I fix it to iterate only 14 times,
It works fine.
But on the 15th it throws up this error:
 
You do know you can type more than 3 words before you hit enter, right?
 
ErrorException in 29773b47272cff1a517646ba231c3262 line 17:
Trying to get property of non-object (View:
@Sherif Oh yeah, I'm sorry about that. :P
 
@HassanAlthaf That just means that $player is not an object on line 17 when you get to the last element in the array. Use var_dump to figure out what it is.
Lines 13 or 17 I guess.
 
@PeeHaa you're looking a little pale there
 
Its line 17 in my code which is
 
10:10 AM
@Amelia ?
/me looks outside. Nope no @Amelia stalking me from the outside :P
 
@PeeHaa Could be the fang marks on the neck
 
@Sherif Uhh, then how does the foreach even reach it then? :/
@Sherif I used print_r and checked all elements
 
Is there a reference for how conditionals are processed in php? I've gotten into the habit of never ever trusting php to work it out itself when giving more than 2 conditionals and using parens for literally everything
 
@HassanAlthaf What do you mean how? $round is an array of elements. It just so happens to be that the last elemetn in $round wasn't an object. Has nothing to do with foreach.
 
10:13 AM
but that leads to php that looks like lisp.
 
@Amelia Are you talking about operator precendence?
 
@Amelia There's the operator precedence table php.net/language.operators.precedence
 
@Sherif OH I SEEEEEEE I GOT IT OMFG
 
Also @Amelia you most likely have a design issue if you have to use "parens for literally everything"
 
@PeeHaa I've been working with PHP for around 5 years and yet I still do not actually know the operator precedence :p
 
10:15 AM
@Amelia I also have to refer to the table sometimes
 
Precedence for most operators is pretty universal. Very few change from language to language.
 
@PeeHaa Most of them aren't needed, I just ended up paranoid. Also, I'm doing reports for a company. Lots and lots and lots of conditionals.
 
@Amelia Create a sql view?
 
@Sherif You are a genius.
 
@PeeHaa I'm doing something that should really be done in a hadoop cluster on a 1GB PHP server with mysql on it, which contacts a remote azure SQL server.
45 second processing times. It hurts.
 
10:18 AM
@Amelia "and using parens for literally everything" - I fail to see the problem.
 
@Amelia lisp > php
 
creating a view is actually slower, because the views cant be indexed.
It cant be fully done with inner joins only, so SQL server cant index it
 
Bet it could be done faster with a temp table...
 
@Danack probably could, lol
 
10:21 AM
Also have you people looked at a nosql solution?
 
ignore poohaa....
 
hehe
 
it's not a bad idea
 
That is going on my personal wall of fame :)
 
@PeeHaa If I was in charge we'd be using redis for indexing commonly hit records, but this is all inside the firewall on company servers
 
10:22 AM
but it depends on your requirements, really
 
I am using oauth2 which sets my $_SERVER['PHP_AUTH_USER'] = 12356@Accounts.Google.Com
is there a way to find this number 12356
I will then give access to only certain google accounts who have logged in through oauth2
 
I cant even get PHP 5.5 installed :p
We have no cache server at all :|
 
@user1977867 WHat does oauth have to do with a PHP_AUTH_USER header?
 
@Amelia If you post the query (or a general overview if it's secret) I can suggest how to do it as a temp table thingy...
 
@Danack We have a hive engineer here who could probably batch-update another table with that view on the cluster they manage for us, but pretty much everything we're doing is outside the current scope of work from the people in charge :v
 
10:25 AM
well, now
is 45 seconds for the report to be generated an issue?
 
if it's done a couple times a day, really, it's fine
if it's more recent, than I suggest you to tell your managers to invest in BI, because that's what it is
 
@FlorianMargaine: this is something the board directors use on a very regular basis, and they've started complaining :p
We're moving to PowerBI, but this is still legacy
 
tell the board directors to invest in BI :)
 
previously i used php login, in that case the username became PHP_AUTH_USER, but now when shifted to oauth2 , this is getting set to somenumber@accounts.google.com
@PeeHaa
 
10:28 AM
Can someone just debunk this? It's a user going "omg vuln!" for a misconfigured install
4
Q: Laravel 5 Exploit and Vulnerability

John CargoI just found in laravel chat , some user just posted one of the biggest vulnerability in laravel 5, which leaks sensitive data and can lead to further exploitation in many host. https://www.google.com/search?q=intext%3ADB_PASSWORD+ext%3Aenv&gws_rd=ssl I want to know the way to secure my ".env"...

(by "debunk", I mean hit with a large trout)
 
@user1977867 Will the user always be in that exact format?
 
@Sherif Solution to the issue stackoverflow.com/questions/30919089/…
 

Don't put logic in your webroot yo!

Dec 16 '13 at 22:05, 2 minutes total – 16 messages, 5 users, 0 stars

Bookmarked Dec 16 '13 at 22:12 by PeeHaa

 
10:44 AM
@Amelia thank you for your detail explanation now I understood the use of parent::
 
@John No problem~
 
@PeeHaa yes till now I have found that it is unique for each id
 
No no no. I am not asking about uniqueness. I am asking about the format
 
@Amelia hey , can you suggest me any GOOD link for clearing my doubts in OOPS OR for study in OOPS
 
yes we are using google oauth only so every account has to be something@accounts.google.com
ideally i shud find a way to ccess username but I am unable to find it yet
 
10:49 AM
@John phptherightway.com for a basic overview (it cant make up for experience, though)
 
ya know ... I must stop watching commentaries on Eric Hovind's video .. I am starting to get a headache
 
@Amelia thank you , but that doesn't seem to be OOPS concept webpage...
 
@John general purpose. also it's OOP
 
I am tempted to start treating creationism as a disability
 
10:52 AM
Finally,
Completed the project
WOO ;D
 
moin
 
Morndom
 
@Amelia yes its for general purpose but not OOP , it will redirect you to php.net site and I know that site ,it looks a little advanced level
 
is it possible to inject things from the service locator in the controllers' constructors in zend framework? It does ->setServiceLocator() after constructing it. :|
I'm spoilt by doing this all the time: gist.github.com/ameliaikeda/d196b3cb2c5f5f6f7f3f
 
2 hours ago, by Sherif
It's not a bad idea actually. Should be added under related section for all DB functions.
 
10:59 AM
@tereško You just got me to start the first YT video that turns up
 

« first day (1707 days earlier)      last day (3241 days later) »