« first day (1128 days earlier)      last day (3814 days later) » 

4:00 PM
Guys, I am receiving a bounce notification from the mail delivery system, but the email is sent from an address I never use. The reason I receive the delivery failure notification is because the email is a catch-all one. WTF is going on with it?
So lamephp.com is catch-all and I get mail failure email saying I sent messages from Alverez@lamephp.com. Messages look like spam too.
 
@Fabien um someone is spoofing email headers in spam to look like it came from you, and the emails are bouncing back to you?
 
@crypticツ That was my guess but wasn't sure if it was how it was working
A spoofed email addy would still bounce to the correct address?
 
grep -ir 'mail(' .
 
dunno, I expect the mailserver the email was sent to will be like ok xyz user does not exist send message back to sender giving error?
 
@ThomasWeinert awesome
 
4:04 PM
I don't know how email works, I know there is a Send and Reply button, that's all.
 
@webarto huh?
@crypticツ heh ;P
 
@Fabien Check if there are any scripts on your server that send spam.
 
Well I used lamephp as an example but it's actually the wifes shared hosting.
 
Yeah, even worse.
cPanel?
 
Will check
 
4:06 PM
@Fabien Someone will be sending spam with the sent from as your server but, 'Return to' != 'Reply to'. It's possible to have bounces go to one place, but if someone actually replies to a spam email, then it goes to the spammer.
 
Hmm not sure how to proceed.
 
@Fabien If the bounce notification shows the original email headers, just check that it's not actually sent from your server. If the headers aren't attached, just delete it.
 
@Danack Yes it's a different header address
 
@Fabien Get rid of the catchall. Why would you want to receive emails sent to the wrong address? They're probably spam :)
 
4:13 PM
Much you can do about spoofing?
 
@Fabien yes
check last address in received-from
 
Received: from virus-20.livemail.co.uk (virus-cluster.livemail.co.uk [213.171.216.10])
 
(:
 
Received: from virus_13.livemail.co.uk (virus-cluster.livemail.co.uk [213.171.216.10])
 
4:15 PM
So what/how can we do to help fix this?
 
cPanel? :)
 
fasthost
 
wow it worked
 
there's an SPF record help thing about spoofing
They have their own custom control panel it seems @webarto
 
4:16 PM
I see, thanks, no idea then.
Check that you don't have malware on your website :)
 
testing
 
@Doorhandle What are you testing?
 
oh nothing
 
oh ok
 
Just in the javascript console so when someone says something like '1+1' i will automatically say '2'
Wait - are chat bots not allowed in SO? got to read the rules
 
user652649
4:19 PM
has anyone ever thought about this for scalar type hinting/autoboxing ? pastebin.com/KfVFpE4V have a look at it, no idea if it can be useful
 
window.location = 'http://';
 
well i got the sayit-button has a click() function and input is the textbox
ok i read and i guess i can make the bot!
 
You need auth, and there's a bot already.
 
okay then
1+6
...
 
@Doorhandle 7?
 
4:20 PM
So where would i get authorization?
 
$.ajax({type: 'post', url:'http://chat.stackoverflow.com/chats/11/messages/new', data:{text: 'jQuery rules', 'fkey': $('#fkey').val()}})
 
Eh who cares though
 
jQuery rules
 
Wait, is Madara a bot or something?
4
 
Please feel free to abuse 213.171.216.10 <-- Mail spammers
 
4:21 PM
Oh no just answered my question
 
You're new to this internet thingy?
No reason not to... just don't spam...
 
@Wesabi Nice try. Infinite loop detected. You may not use commands for 20 more seconds.
 
@Wesabi What did I doo to deserve that ping?
 
So from a non-shared hosting solution is it possible to 100% fight against email spoofing?
 
26 messages moved to bin
Please don't spam. Go to the sandbox for that
 
user652649
4:25 PM
@PeeHaa sorry, didn't you write a rfc about type hinting?
 
user652649
you trashed a serious question, but since i made it i guess trash bin is the right place for it aha
 
user652649
nvm sorry it's still there xD
 
@Wesabi nope I didn't. @ircmaxell did I think
 
$a = new \stdClass();
$b = new $a;
^^ is valid; produces another stdClass.
 
I am a supporter on the thing though
 
4:28 PM
function f()
{
    return new \stdClass();
}

$a = new f();
^^ is not valid (per se) as it tries to create an f; which is a function.
$a = new ${f()}; doesn't produce the desired result, as the interpolation (?) will try to __toString the instance of stdClass, which doesn't work.
 
ATO
 
user652649
@PeeHaa ops sorry yes it was ircmaxell playing with type hinting right. have a look at it though, don't know if it can be helpful
 
@JoeWatkins ?
 
rly ?
nobody responding to the AT command ?
call urselves geeks !!
 
@JoeWatkins protocol mismatch biatch!
:P
 
4:34 PM
For me it was E_WTF_NO_CONTEXT
Anywho, is there any syntax voodoo to make new f() () work, where f returns an object?
(f())() doesn't; ${f()}() I covered with interpolation poop. I'm brute-forcing alternatives.
 
HELO
 
test
oh my
 
Hi everyone
 
well
 
ACK
 
4:45 PM
DAN
 
Okay people
somebody type 3+6
or something
 
@Doorhandle if you want to test go to the sandbox
 
okay good advice
 
@DanLugg call_user_func
 
@crypticツ i'm not sure what has any of this to do with templates
 
4:49 PM
@igorw Nah, I'm trying to do some magic, encoding stuff into the class name.
 
automattic.com/work-with-us no pun intended, but from pics, looks like a bunch of malnourished hipsters.. ?
 
Actually, hmm. I think I'll sort this out.
 
Pardon me, healthy :P
 
@webarto see also: every startup ever.
 
:)
 
4:54 PM
Okay it was tested so putting here
 
curl -siL --head automattic.com | grep hacker
X-hacker: If you're reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.
 
Completely tested, tries to eval text. well have fun
 
Dear automaticc, everyone knows about this. (spelling intended)
 
"Want to make the web a better place for more than a billion people each month? "
How can they say that when they are using Wordpress!
 
:P had to get last: var j = document.getElementsByClassName("username").length; var curUser = document.getElementsByClassName("username")[j - 1].innerText;
var i = document.getElementsByClassName("content").length; var evalText = document.getElementsByClassName("content")[i - 1].innerText;
Can you guys believe this is the only chat room on?
 
4:55 PM
@vascowhite It's really contradictory :D
 
@webarto They haven't even tried to disguise it.
 
You can also just type in quotation marks the word and it'll repeat it
 
> The class name [...] As a regular expression, it would be expressed thus: ^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$.
 
That isn't correct, I don't think.
 
4:56 PM
La la lahalalaaa
 
@vascowhite I wouldn't mind making web a better(?) place for them, for 100k :P
 
The part that seems to be incorrect is \x7f-\xff
 
@Doorhandle I prefer css selectors for fetching nodes from the dom (in JS)
 
@webarto Per year? And you would have to work with WP?
 
@PeeHaa Customer support, WP (VIP)... deepest circle of hell.
 
4:58 PM
since "\xFF" isn't a valid classname.
 
@webarto lol
 
Muuuuuuultiping.
 
@ThomasWeinert good advice
Anyways it evals the whole message :P
I want so desperately to try it but i had to tweak it a lot to make it work once for me
 
Can you guys give average on salaries in US and A? I lost track.
 
Because it doesn't work if your name is Doorhandle :P
 
5:00 PM
@webarto Use the A List Apart data.
 
@LeviMorrison Didn't know that, thanks.
 
I didn't fix the loops so nobody type while(1)
please
I should, right now...
Ill be back going to sandbox
 
hmm, I don't remember installing grep on my windows box, but it is there. It isn't bundled is it?
 
@vascowhite git shell?
 
@vascowhite cygwin?
 
5:02 PM
git has it bundled
 
@PeeHaa That's it. My memory is going :)
 
:-)
 
@vascowhite gnuwin32 :)
 
UnxUtils
 
lol I probably have all that crap installed. CLI on windows is sadly lacking and needs that *nix boost :)
 
5:06 PM
It sort of works, but really it doesn't :)
For basic usage, it's OK.
i.e. pipes, stdin, etc is flaky.
 
@JoeWatkins You should steal borrow this and ship it as an example with APCu.
 
>echo <<< 'stuff'
<< was unexpected at this time.
 
@webarto guess what ... github.com/krakjoe/apcu-ps
 
@JoeWatkins Oh - didn't know about that...
@JoeWatkins Hmm, I can't see any locking in there...how does it prevent concurrent modification of the session?
 
all in apcu
apcu provides an api, you don't have to care about locking ...
 
5:18 PM
@JoeWatkins :D where to put it?
 
@JoeWatkins I mean, the default file based session handler in PHP locks access to the session data, so that it is only being modified by one process at a time. Although APCu will be doing the locking per read/write, it doesn't seem to be locking the entirety of the $_SESSION object, so individual writes could be done in different PHP requests, leading to odd data in the $_SESSION object.
Unless apcu-ps is reading/writing the whole session object each time, wouldn't that be an issue?
 
it does read the entire object
 
those keys passed to session handlers are session identifiers not element names
 
if your session data is sane, not only is it not saved to disk but it is also not serialized or formatted, just copied ...
apcu by default uses an rwlock, if you do much more reading than writing you will benefit from it, definitely ...
 
@PeeHaa Now accepting delvotes.
 
gracias
 
I like people asking "Can you give me the code"?
 
ok i used web worker so if you type while(1) or something it won't freeze
Oh yea, easy rep
 
I just have to reload it
 
As if we developers keep a database of all possible codes in the world that we collect over the years, and just need to give him.
@Doorhandle eval? You must mean evil().
 
18 messages moved to bin
 
Noo's
 
@PeeHaa stop binning too much :o
 
5:35 PM
eval() :P
 
I hate taking out trash, I always forget it when I go outside, and I remember I didn't take it when going to sleep.
So, infinite bin like @PeeHaa has would be nice.
 
@bwoebi can you give PeeHaa ownership of the bin?
 
Now he can be king of the bin!
 
@PeeHaa 5.3 is EOL, but receives security fixes until 11. July 2014
 
5:38 PM
@MadaraUchiha I am owner there and the above is getting pretty old
 
Hello World
 
@NikiC hmmm. Say that when I have a library which currently supports 5.3+. Would it make sense to start the deprecating process yet?
 
Heya @Baba
 
@Baba yo
 
5:39 PM
@MadaraUchiha he's already owner?
 
@MadaraUchiha How are you doing ?
 
@Baba Good! How are you? :)
 
@PeeHaa hey..... whats up
 
Basically I have found a use for traits so I want 5.4+ :D
 
@MadaraUchiha Am ok .... busy lately but am fine
 
5:40 PM
@Baba chilling, drinking and stuff like that :)
 
@Baba Busy's good :)
 
@PeeHaa Nice ... what have you been drinking lately
 
@PeeHaa It traits is what you want to use, no :P
 
@MadaraUchiha yeah
 
@Baba oban
 
5:41 PM
There are very respectable reasons to drop PHP 5.3, e.g. [] looking much nicer than array(), but traits are not one of those ;)
 
@NikiC Hey. I am in your camp, however I think I actually have a decent use case for triats
:-)
 
@PeeHaa nice .. very good for object oriented drinking
 
@PeeHaa please elaborate so you can be convinced of the contrary
 
@NikiC what is wrong with traits?
 
@NikiC v2 Oauth services are mostly the same, however most are not exactly the same in their implementation github.com/Lusitanian/PHPoAuthLib/tree/master/src/OAuth/OAuth2/…
So that results in lots of duplicated code
 
5:44 PM
@PeeHaa you already got an abstract class, why not put the duplicated code in there?
 
... however most are not exactly the same in their implementation
 
@PeeHaa ...so?
 
oauth implementations are different for different methods in different services
 
how does traits change anything about that?
 
I've googled but I just need to a simple tutorial on how to set up a form to submit to a database and can't seem to find a "simple" one
 
5:46 PM
@NikiC It solves the problem of not having 10 abstractservices because there is something different in a single method
 
@PeeHaa why would you need 10 abstract services?
can't you just have different methods for different implementations and just forward to the appropriate one?
 
@NikiC because service 1 does method1 different, but service 2 does method2 different, but servie 3 does method 3 different
However both service 1 and service 2 have the same impl of method 3
And service 3 and 1 have the same impl of method 1
@NikiC So have a abstract class with all possible methods with all possible differences?
 
@PeeHaa that's the same as what you want to do...
just not spread out across ten classes
 
make 3 method objects (or even functions) and compose
 
Exactly, but with traits I can make any combination I need @NikiC
 
5:49 PM
or what @igorw said, not necessary to actually stick it in the abstract class, could just as well be normal functions
@PeeHaa you can make any combination you need in any case...
 
@igorw What do I gain by doing that instead of traits?
@NikiC Not really. When just sticking it in a class it will get huge.
 
@PeeHaa functions are not forced to be a member of a class
 
@PeeHaa you keep the implementation details inside of the class. Traits break encapsulation.
 
@Fabien want a match?
 
@igorw Yes but what do I gain by that?
 
5:54 PM
(Also @crypticツ and @AlmaDo)
 
@toscho Says the person working for WP :P
 
@PeeHaa I don’t :)
 
@MadaraUchiha sure, I'm down for a match
 
You have KGS?
 
@igorw Is the tight coupling the issue?
 
5:55 PM
@MadaraUchiha I played yesterday with @Fabien I just login as guest, don't need anymore online accounts =oP
 
@PeeHaa your objects rely on an external state with traits. when you change one trait, you have to find all using classes and update them too. that's bad
 
@crypticツ Heh, alrght, I'll be creating Room 11
 
@toscho Uhhhm no
 
@crypticツ created, join (under New Rooms)
 
@toscho have you read the entire discussion (i.e. start of discussion where I linked the problem code)?
 
5:57 PM
no
 
@MadaraUchiha there
 
Soooo you just start saying things?
 
I have read about traits last week to find a valid use case and arguments pro and con. all in all they are a kind of multiple inheritance, probably hard to maintain.
 
@JoeWatkins I'm pretty sure APCU PS doesn't behave the same as the file based session handler. I made a simple example where two requests are modfiying the same value stored in session.
 
@PeeHaa you clearly can solve it by implementing a nonlinear scala gui interface with sub-interface injection
 
6:01 PM
The files based session prevent concurrent access, so the values always increase. With APCU they are repeated.
 
@toscho I agree with that. I have never had a use for traits. However I have the feeling (may be wrong) it solves a problem for me. So I really want to await @igorw's answer / telling me I am stupid instead of some blanket statement
@tereško Nice description for my next framework!
 
Hello all. This is not exactly a php discussion i am starting. But something just got into my mind. Suppose I have a long list of words. and I searched a specific word, which unfortunately was not listed on my wordlist, Now, I ned to create a 'Did you mean' thing. What would be the best way to do that? I don't think we need to iterate through each words and calculate levenshtein distance between each of the words and the search string?
 
Imma be rich!
 
sounds like homework
 
@cipher solr does pretty awesome stuff like that
 
6:05 PM
@PeeHaa this example from Zend was the best I could find so far. the trait doesn't dictate implementation details of the using class.
 
ServiceLocatorAwareTrait...
 
on unrelated note: omg, I found KitKat, while looking for a shopping bad
 
@PeeHaa : What would be the optimised way you would do that, without using solr?
 
How large is the list?
 
btw, what are you trying to figure out @PeeHaa ?
 
pce
6:06 PM
hi @webarto phpdbg.com looks very good, but i need some margin-top to see all of the content in firefox 25: i.imgur.com/ywtSPV1.png
 
@PeeHaa might be about 5000 words and increasing
 
@tereško I have this list of oauth services. With lots of duplicated code. Some methods may be the same across some services while others might be different
I'm trying to find a sane way to prevent duplication basically
 
oh my ... I'm gonna make a quick shopping run and then take look at it .. maybe some solution pops out on me
 
Don't forget to get some beers :)
 
of course
aside from that: without opening any of the files, traits actually sound like legitimate approach in this case
 
6:10 PM
I Think i should try my question on SO :)
 
That's what I thought (before @igorw told me OMGWTFBBQ TRAITS!?!?! :P )
;-)
@GoogleGuy Is that really you? :)
 
@PeeHaa my only objection to traits is that they're bound to a class instance, behave like inheritance and therefore don't compose cleanly
 
@igorw I do agree with that sentiment, I just don't see a sane / clean other way.
/me sips whiskey to get his brain working
 
@PeeHaa functions compose. :)
@ircmaxell ok, ran into a little roadblock. the FunctionData for Closure::__invoke() has hardcoded arguments as array(). not sure how to make it dynamic, since $ci->getProperty('functionData') is only available when execute() is called. :-/
this works: $f = function () { return 42; }; var_dump($f());
this does not: $f = function ($x) { return $x + 1; }; var_dump($f(41));
 
6:47 PM
@pce It's because screen width, I'll add media query to hide that "social" thingy, thanks.
 
what kind of type would I choose for a select drop down with multiple options in my database
 
wat
 
like VARCHAR etc.
 
clearly it depends on what is type is the <option>...
 
the options are text
 
You can use varchar, I assume it's not greater than 255.
 
@igorw what are you doing there?
 
@NikiC let me push my changes...
it's quite possible that I'm on the wrong track completely
this line hardcodes the args of closure: github.com/ircmaxell/PHPPHP/blob/…
 
uh
long time since i last looked at that code ...
maybe implement a custom FunctionData class for that?
 
7:08 PM
can text types also store numbers since they are characters or are numbers not characters?
never mind
 
@Danack sorry I missed that you wanted locking ... try maybe cas ... tbh if you want locking why not stay with files, if you worry about speed just mount a ramdisk at /tmp
 
@NikiC tried that, problem is you only get the $ci when execute() is called
at runtime
not sure where I'd need to make a change to get a Closure FunctionData at compile time
 
7:26 PM
basically, unsure where to make the incision
 
Someone has implemented this XKCD
3
 
@Fabien you on?
 
7:48 PM
@igorw Like the term.
 
can any one help here?
http://stackoverflow.com/questions/20035191/php-file-uploaded-but-update-query-does-not-execute
 
@MadaraUchiha Can I go with you on private for a second?
 
@rdlowrey Been looking at NativeReactor again. I keep looking at the $garbage, array, and think... why is this here. Is it for some sort of dirty hack? Why do you need to collect items you're unsetting in another array, which you then unset later?
 
user895378
@Leigh IIRC it prevents fatal errors if you cancel a closure watcher from inside itself.
 
7:56 PM
hmmmmmm I'll have to test that case
because I just deleted all references to $garbage :p
 
user895378
@Leigh Yeah -- you better test it thoroughly with cancelling closure watchers from inside themselves. It's a PHP bug that has to be worked around.
 
user895378
I'm pretty sure that scenario will fatal if you remove the garbage array.
 
help please
http://stackoverflow.com/questions/20035191/php-file-uploaded-but-update-query-does-not-execute
 
Anyone has the link to clean code's watch list?
 
8:09 PM
Thanks
 
@JoeWatkins It's not just integers that are a problem. If you're doing something like storing a user's actions in an array in the session, and it's possible for the user to make two separate actions that could be processed simultaneously, then the session needs to be RW locked per request, to prevent data being lost. TBH I think I just want to stop using the magic $_SESSION, as it's far too magic.
 
8:34 PM
@rdlowrey Not able to reproduce it...
 
"Works for me." ™
 
Jay
Guys would any of you know why this function returns '' after a few page clicks?
function read($id) {
global $db;

if(!isset($this->query_read)){

$this->query_read = $db->prepare("SELECT data FROM `".TABLE_SESSIONS."` WHERE id = :id LIMIT 1");
}

$this->query_read->bindParam(':id', $id);
$this->query_read->execute();

if($this->query_read->rowCount() > 0){

$row = $this->query_read->fetch();
$data = $row['data'];

$key = $this->getkey($id);
$data = $this->decrypt($data, $key);

return $data;
}else{
 
@Jay global $db? The tutorial is crap, get rid of it.
 
Jay
global db is the db connection
 
@Jay Don't use global
 
Jay
8:41 PM
@MadaraUchiha I know but I have some many classes too change if I inject it
 
Well, you should've thought about it earlier, right? :P
My suggestion for you, deal with globals like a leech.
Tear it out, it'll hurt, you'll have some editing pains, but you'll feel better afterwards.
 
Jay
what AY WOULD YOU INJECT IT?
oops caps
 
Hi all, I need to add some validation to a form, but it's got method="Array" as one of the form attributes. I thought you could only have "get" or "post"...?
 
@Dan sounds like PHP <= 5.3 and method="<?=$array; ?>"
 
@Leigh I've not seen this before.
<form name="name" action="url" method="Array">
Anyway, that's only part of my confusion. This posts to a URL that's provided by a company who deals with this form. All validation happens there, but the form is utter rubbish.
 
8:56 PM
Really odd actually. I had a problem with a test at work, to do with what was output when printing an array.... and I found behaviour different between 5.3 and 5.4, however, when I chuck it into 3v4l ... 3v4l.org/UpGJA
 
I'm going to add some client side validation, but really I need to vet this with PHP before sending.
I was wondering if I can do PHP_SELF as the action, then update this to the original action when the form is ok. Do you know what I mean?
 
With HTML5, action is optional, leaving it out defaults to the page the form is on
HTML < 5 in most browsers treat it like that anyway though
 
@Leigh So, if the form validates ok after posting to itself, how could I post to the other action?
 

« first day (1128 days earlier)      last day (3814 days later) »