« first day (1178 days earlier)      last day (3996 days later) » 

user895378
14:01
The trick is making a PHP thing that's non-blocking AND exceedingly easy. That's where the win will be.
@JoeWatkins Cool. Jonathan is a nice guy. Not very imposing at all. I am not 100% sure on his ability but I believe he's very textbook.
But he's new to web dev
Also, @Suhosin is also going to PHPUK.
I was toying with the idea a while back.
Afternoon :D
applied at wikimedia too, I do like the idea of working for a company that is so open, where I can talk about what I do ...
They're local?
remote
internet is pissing me off
14:25
Thing I have learnt today: i) PHP has no unit tests for checking Set-Cookie headers are valid ii) PHP completely missed RFC 2965 and the already abandoned "Cookie2" and "Set-Cookie2" headers.
@Danack shall we fix that ?? (first part) ?
@JoeWatkins I've been thinking about Yasuo's comment in internals about adding more functionality to the session handling in PHP. While I agree it's needed I think adding more stuff to the session stuff in PHP is the wrong approach, as all of the logic needed to do things like not locking the session if it isn't needed, or advanced security handling (e.g. deciding whether to log the user out if their IP changes) all need to live in the application layer.
So I think I'm going to have a go at writing a userland session management library.
And am writing some tests for generating the set-cookies header there first.
does anyone use the builtin sessions in the wild ?? isn't that ... crazy ?
@JoeWatkins What do you use if you don't use the built-in session handler?
use apc/couchbase/memcached depending on application
file locking is painfully slow, it's a serious restriction to force every request to engage in it ...
it's useless if you are on more than one machine too
14:31
@JoeWatkins no - I don't mean just changing how the session is stored. I mean completely replacing session_open() and the other functions.
They can still be used with PHP sessions. PHP sessions != the default session handler
when I said builtin, I meant the default file based handler ...
user895378
@Danack No one uses Cookie2/Set-Cookie2 ... it was a total failure
user895378
@Danack Keep me posted on this. I was going to work on the same thing in the near-future because I have to do it anyway for Aerys. I'll be happy to collaborate when I have time.
@PeeHaa Is today the lucky day for an OAuth dreamer? :)
14:35
@JoeWatkins I hate my users and my server. My father had to wait for slow I/O, and his father before him. These kids with there newfangled mumble mumble back in my day mumble mumble 5 1/4" floppies mumble mumble not even British.
user895378
@JoeWatkins Everyone uses built-in sessions as far as I can tell -- they just specify their own SessionHandlerInterface to delegate to apc/redis/whatever (or is that what you're suggesting?)
@rdlowrey Will do. I think it may be one of those tasks that may be bigger than it seems (and why it shouldn't be done in the core) as there seems to be a huge number of config options that can be set for how the sessions can be handled. So don't be surprised if it looks like a big ball of mud.
I meant the default file based handler for sessions ... that's crazy ...
@samyb8 You dream in OAuth? So you dreams are needlessly complex and not as useful as they could be?
user895378
@Danack No worries. Everything I do looks like a big ball of mud to start. My code only starts looking good after several rounds of iteration and rewriting.
14:37
@rdlowrey And drinks. You forgot the several rounds of drinks.
there's an apcu-ps module on my gh, if apcu ever see's widespread usage ... that'll be quick, quicker than a user land impl of same ...
user895378
@DaveRandom Yes. My code is like women at the bar: both look much better after a few drinks.
user895378
@JoeWatkins I agree. But I'd be willing to bet that a huge number of inexperienced devs are using the built-in file-based sessions.
@rdlowrey You might want to find a better bar.
user895378
@DaveRandom lol that might be my problem
14:40
I usually do in user land ... and the ps mod should really be part of apcu but didn't want to rock the boat ... I still need to document apcu .... nothing is even written down ...
@DaveRandom Indeed, I've been wasting too many nights dreaming with a ready-to-use PHP OAuth library to connect with ETSY.com...
@krakjoe I'm speaking there. I don't think we've met before, but I'm friendly and I'd love to pick your brains on pthreads :)
someone friendly ...
/me thinks @Fabien should go ...
user924016
Hey guys
/mewalltet thinks @fabien shouldn't go.
user924016
It is my birthdate =]
14:47
Happy Birthday @RonniSkansing
7
user924016
Ahhh =] Thank you
Shows what day and age we live in when I type "Happy Bir" and hit Tab...
user895378
@RonniSkansing Happy birthday!
user924016
Yay, thank you @rdlowrey
happy birthday @RonniSkansing
user924016
14:51
:) Thank you Joe
user924016
Ah you guys made my day
@JoeWatkins What persuaded you to go btw?
@Fabien yeah mine thought same, I got a free ticket :)
^that
lol
Nice.
If they don't sell out they should question the affordability.
Free tickets ftw
/me thinks @Fabien should go (are we talking PHPUK?)
14:52
^yeah
The two people with free tickets trying to convince the paying noob to go :P
:D
Free ticket, free flight, free hotel, free food
Not complaining
urf, I gotta drive there and didn't think about overnight yet ...
There's a Travelodge about 5min walk away
Think that's where I'm staying
I'd be more up for a Room 11 Euro meet. USA can come as +1s
14:55
I'll probably go stay with family, whoever is closest, will have to ring around ...
@krakjoe Wear a t-shirt saying "Ask me about threads in PHP" on the back, then people will come to you to talk.
that's a good idea ...
Underneath put "The P isn't for POSIX"
@JoeWatkins I considered staying with family but Brixton is a trek from the convention
And I probably wont be sober.
And it's Brixton
14:58
I'm OK with Brixton, I grew up there. :P
they don't care ...
:)
More the choice between the dodgy taxi driver or getting robbed on the Tube ;)
Either way it'll cost me more than the hotel
(which is free)
I do a pretty good impression of a guy you don't want to approach ... so not worried about moving around in london, my main problems will be 1) I will definitely get lost, I get lost everywhere I go and 2) I don't like big crowds, or small crowds, or big spaces, or small spaces ... not really comfortable anywhere ...
I drove all the way to a meetup.com meeting, parked the car and walked past the pub they were meeting in and went home ... there was 5 people there ... pathetic, panicked ...
Yeah after dealing with Napoli, I don't think I'll have anything to worry about moving around in London. ;) Having said that, I don't plan to move around very much.
London is pretty easy not to get lost in. Take a smartphone, download Maps. If lost, locate a tube station. :D
you underestimate my lack of sense of direction, I can get lost in buidings, in my home town ... I literally get lost everywhere I go ...
15:08
Even better reason to book the hotel over the road :D
@JoeWatkins stop accessing your gps from multiple threads.
Good Morning
user924016
Morning
Might be easier for you two to meet outside the venue so you at least know each other going in? Just a suggestion.
could anyone pin point what might be wrong with this statement?
`$date = "";
$post_title = "";
$description = "";
$id = $_GET['id'];
$result = mysql_query("SELECT * FROM hire WHERE id=".$id."");
while($row = mysql_fetch_assoc($result)) {
$date = $row->date;
$post_title = $row->title;
$description = $row->description;`
user924016
15:11
Hmm anyone read "Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process" ?
oh easy, I'll be the only person in view hiding behind something ... I'll also be under a large cloud of smoke ... but yeah good idea ...
Hi,
can someone help my friend with this
0
Q: Only one row is affected for the updating of quantity PHP

user3156220I met with some error with the shopping cart. it basically, only able to update the first row in the shopping cart and not the rest. Below are an example of what I'm trying to do. Example; when I buy product A, it will be in the cart, when I buy product A again, it will be updated as qty 2, not i...

Here is the full post to my question if anyone is available to help.
http://stackoverflow.com/questions/20944588/update-post-using-php-mysql
$date = $row->date;
mysql_fetch_assoc does not return objects
you are not escaping input
mysql is deprecated
start again ...
user924016
I am going to make a big bday cloud of smoke right now.... <0
15:13
@RonniSkansing w00t, smoke a fat one for me :D
user924016
@JoeWatkins ;) i will
user924016
and if you ever end up in Denmark i will pass you one ;)
@JoeWatkins yeah thats where im getting the error. I also tried this.
`$date = "";
$post_title = "";
$description = "";
$id = $_GET['id'];
$result = mysql_query("SELECT * FROM hire WHERE id=".$id."");
while($row = mysql_fetch_assoc($result)) {
$date = $row['date'];
$post_title = $row['title'];
$description = $row['description'];

}`
but still get an error on the `$date = $row['date'];`
@DaveRandom When you heading to another phpnw monthly event? Thinking of giving a talk on Auryn, service locators and DiCs
15:19
@daugaard47 first, learn how to debug, then learn about prepared statements and pdo, there's not much point in fixing bad code ...
@JoeWatkins stop using ios maps.. =P
user924016
hehe
@JoeWatkins okay thanks for the help.
what version of php are you using and what is your operating system ?
@rdlowrey With a factory that creates and returns a different object depending on a variable passed into the build($type) method, and each object (same interface but different concrete object) has different DI typehints in their constructors, does Auryn know how to handle this if I delegate, or am I doing something wrong? It looks like I have to pass the injector into the factory in order to resolve each one correctly...
15:26
I'm on the way out the door, but seriously, you should learn how to debug, there is xdebug and phpdbg and some ide's make it easier (for some) ... when code misbehaves you can either guess and ask strangers, or you can find out for yourself why it isn't working, the only way to do that is debugging ...
@JoeWatkins PHP version 5.4.22 and my host provider uses linux
if you have a shared host that won't load xdebug or anything else useful, then setup locally a runtime environment that you can control ...
sry afk, lata all ...
Bye Joe
@JoeWatkins Okay Thanks!
@daugaard47 Joe is right, you'll learn a heck of a lot more doing your own debugging. Read about some xdebug tutorials or something.
Teach a man to fish... etc.
user895378
15:30
@Jimbo No, you aren't doing anything wrong. I've been thinking about how to handle this. For now you could just do something like ..
user895378
$injector->delegate('SomeClass', [new SomeClassFactory($injector), 'build'], $args = []);

class SomeClassFactory {
    private $injector;
    function __construct(Auryn\Injector $injector) {
        $this->injector = $injector;
    }
    function build($arg) {
        // ...
    }
}
user895378
@Jimbo I'm not happy about that approach right now. Sometime this week I'm going to patch the lib with a better, simpler way.
@Fabien okay thanks for the pointer. I will start researching that right now. Trust me I'm tierd of asking dumb questions here. Just read some books on PHP and hard for me to understand. I'll get though. Someday...
@daugaard47 Look up PDO too btw. mysql_* is deprecated
user924016
@daugaard47 are you danish?
15:31
@Jimbo Hoping to get on it a bit this year, is there a meet up tomorrow?
Come back if you get severely stuck and we'll try to poke you in the right direction.
@rdlowrey Yeah, I thought I'd have to do something like that. It'd be great if there was a patch for it. Sorry for giving you yet more things to think about... sapi framework etc xD
@Fabien okay will do.
@DaveRandom Yep, want to head down and grab a beer afterwards? I owe you about 5
@DaveRandom american but yes last name is Dutch
user895378
15:34
@Jimbo I'm still of the opinion that if you're descending into this level of detail with the injection container you're probably overcomplicating your code. Dependency Injection is simple. Nevertheless you're not the first person to ask for this capability, so I'm trying to massage it into the lib in a way that's not terrible.
@DaveRandom sorry that was meant for Ronni
user924016
=]
@Jimbo you need closure based factories I think with this and:
@Jimbo Possibly, but I still owe you a book :-P I need to check with Her In Charge, I'll text you later
$provider->delegate(Intahwebz\DB\StatementFactory::class, 'createTimerProxyXMySQLiStatementFactory');
Or similar.
@Jimbo how about creating it as an issue on github?
15:39
@Danack If I do it that way, I have to specify the dependencies when creating the object. I want Auryn to do it's recursive instantiation stuff for me
@Jimbo Can you put a concrete example up either as an issue, or somewhere else?
user895378
@Jimbo Yeah, I'm with @Danack -- it'll be easier to address in a good way with a concrete issue/feature request with a simplified example of what you want to do.
@rdlowrey @Danack Working on it :-)
Is there a reason a lot of people prefer PDO to mysqli?
I've always defaulted to mysqli (though rarely use MySQL) :/
@Suhosin can you use mysqli for other DB other than MySQL? if no, then maybe that's one
15:53
@Suhosin Sane API period
user895378
I dunno ... people cite the "makes it easier to change RDBMS because it's abstracted" argument but honestly how often does anyone actually use that functionality? If you know what you're doing as a programmer you should easily be able to create your own abstractions for the backend storage you're using.
@rdlowrey Agreed. In general bollocks
user895378
And if you use PDO you lose all the vendor-specific features of the RDBMS
user895378
Whereas if you abstract the backend data storage driver yourself you can include those things.
15:58
good morning
@PeeHaa hey, any news about that code?
@rdlowrey any real world examples ?
user895378
@tereško You can't do any async non-blocking anything with PDO.
I assume you mean it in context of single application and not two separate applications
user895378
Yes, though I'm not sure I really understand what you mean there.
16:04
@MaciejCzyżewski Hello !
What's new?
For me PDO is faster to type than mysqli
@rdlowrey no, you cannot make another query from the same PDO instance, while the previous query is still running
@reikyoushin No, but I wouldnt use PDO for the DBs I normally use :P
+ I like to avoid a lot of newbie converters from going... "Oh okay, CTRL+R, mysql->mysqli"
16:06
@MaciejCzyżewski School has begun !
user895378
@tereško No one said anything about using one connection.
then I don't see how PDO would affect it
user895378
Because you can't perform non-blocking queries with PDO.
the locks are handled at the RDBMS
morning
user895378
16:07
@tereško Completely unrelated to anything.
Hey @tereško, I hope you aren't mad about this i.sstatic.net/5gtVL.png and this raw.github.com/PHP-Chat/tsod/master/tsod.png and it being starred ?
then I have no idea what you are talking about
Morning @NikiC
@Fabien LOL
user924016
Morning @NikiC
16:08
We tend to use Oracle for anything the PHP side of our code would be accessing at work, and MongoDB for our backend stuff (stats, mainly).
user895378
Programming in the non-blocking IO paradigm is nothing like straight-line PHP programming that most people are used to ...
I am getting the feeling that you are trying to make PHP to do something unnatural
@rdlowrey it's just like writing Javascript with a good syntax.
user895378
You not understanding it is not the same thing as unnatural. Besides, it's the same logic employed here. That's something you can't do with PDO.
@rdlowrey and most PHP devs are somehow a bit used to write JS…
user895378
16:12
And I'm certainly not the only person doing these things.
@samyb8 yes. wanted to send it yesterday, but couldn't remember your address anymore
@bwoebi please stop saying "JS", when you mean "jQUery"
user895378
jQuery has nothing to do with any of this.
@tereško jQuery is written in JS.
The only thing I don't use when writing jQuery is the DOM. But it still is JS.
just like node is JS too…
yeah, but just because you can copypaste some random jquery code, does not mean that you have a slightest clue about how to write javascript
user895378
16:16
And just because you know how to write javascript does not mean you are qualified to call the programming paradigm underlying nginx and node.js (and any other socket application that wants to handle webscale concurrency) unnatural ;)
I was saying that it seems unnatural for PHP
@tereško I write my own code using jQuery… I don't copypaste it.
@bwoebi since when did we start to talk about you ?
2 mins ago, by tereško
yeah, but just because you can copypaste some random jquery code, does not mean that you have a slightest clue about how to write javascript
^ to whom was that then addressed?
user895378
In any case, I'm utter crap at JS so who cares :)
16:18
@rdlowrey hehe
@bwoebi it was not meant to be an address
@rdlowrey My brethren in JS crapness :)
We should get tattoos
I shall start another MVC discussion!
@tereško Seal of Disapproval ones.
I love it @tereško. If i was fiscally less responsible I would have tons of sticker of them printed out already.
tnx will mail it tonight if I go home tonight
user895378
@Jimbo Thanks for the issue report.
@rdlowrey No worries - when you have a chance to give it a look, let me know if it makes sense would you?
I'm writing something now...
user895378
16:23
@Jimbo It makes sense. Like I said, you're not the first person who wants to do that and I can see the usefulness. You should be able to follow that thread for updates as @Danack and/or I have time.
php loves closing questions right?
@rdlowrey Cool. Danke schon
16:38
@rlemon yep. it's our hobby
@Jimbo Short version - I think you needed to have explicit factory objects. Although they do have a slight whiff about them, they not only solve the real problem of 'how not to hard code which classes get created', they also allow Auryn to inspect their dependencies, and so insert all of the dependencies magically.
@Danack Dude, did you just suggest a FactoryFactory? :P
@Jimbo Nope.
class ActionFactory {
    public function __construct(TorrentFactory $torrentFactory, NotificationFactory $notificationFactory) {
        $this->torrentFactory = $torrentFactory;
        $this->notificationFactory = $notificationFactory;
    }
}
That sure to me looks like a FactoryFactory ;) Or maybe not as you don't return factory objects
FactorialFactory
16:42
@Jimbo yeah - it's just one factory that produces actions, that depends on other factories.
Also - I don't think you even need FactoryFactories if you are using Auryn and do magic stuff with closures.
As you can then configure a factory to produce any decorated version of an object, without inception-ing your code.
@Danack Could I use your closure example in the context of what I require
Still looks like I have to choose exactly what is being created
@Jimbo I don't think so and no.
The closure stuff is for decorating the type of object that a factory creates - but that is not what you want, as the NotificationFactory::create method must return an object of type 'Notification' or a sub-classed version of it.
But you tell Auryn what type of factory to create via the setup method:
$provider->delegate(Intahwebz\DB\StatementFactory::class, 'createTimerProxyXMySQLiStatementFactory');
And then any requirement to a StatementFactory actually gets a factory that produces objects of TimerProxyXMySQLiStatement which is a sub-class of Statement(, decorated with some code that times how long the statement takes to execute).
Am I the only person that favors the typeof() approach over ::class?
16:51
But as I said, that doesn't address the problem you were trying to solve.
@DanLugg Yes, you're the only one. If you're using PHPStorm, any typos or unresolved classes will be picked up as errors while you're editing the code.
Rather than being hit at runtime.
Hmm, I meant that I would have favored a typeof construct over the magic class static property.
typeof(Foo\Bar) over Foo\Bar::class. I know it's just syntactic, but its a familiarity consistency among languages.
oh - in that case, probably still no. ::class is obviously resolvable while editing code - typeof() looks like a function.
@Danack I see your point.
*shrug*
Anyone has a good decent free host?
@DanLugg I think typeof() is resolved after the pre-processor runs in C++ - if so , it's almost certainly not resolvable while editing.
16:59
@Danack I see what you mean. typeof() is a compile-time resolution in C# as well. JS of course supports it though; albeit, I don't know if that's a great frame of reference.
@Jimbo If you wanted to troll the Laravel people, your 'ActionProvider' object is an actual Facade isn't it? Rather than the Laravel "Lol, it's not static it's a facade".
@DanLugg true, but Foo\Bar could be a constant, class or function reference. the :: operator indicates that it's a class...
@Danack How? I don't use statics anywhere?
@ircmaxell Ah, that's another good point.
reaches through screen and slaps Jimbo
17:02
public facade $laravel;
@Danack Ohhh, yeah okay. It's actually a Facade.
Facade, not Faade
Yeah - it's pronounced Fa'ade, the c is silent.
It's actually pronounced Fake-aid since it fools you to thinking it helps you :-P
:-)
17:19
Thinking about tweeting this:
> Tip-of-the-day: "facade" is pronounced "Fake-aid". It looks & feels like it's helping, but you wind up worse off than if FEMA came to help.
8
@ircmaxell blah - leave of the Fema stuff.
They do good work for a lot of people who have their lives devastated - at least when the President doesn't appoint an idiot to be in charge of them.
17:36
@MadaraUchiha what are your requirements/specs? vps, dedi or shared? free for what purpose? i have free shared ones..
@MadaraUchiha github.com
anyone seen/used this? koding.com
What's that?
it has a free VM.. but i still dont know if you can SSH/FTP your stuff in there..
I saw that half year ago. But was very hard to use...
Maybe now is better,,,
17:51
i just registered, and i have this.. though i dont have need it.. reikyoushin.kd.io
it's the default /Web/index.html ..
though i dont really know what this is.. haha
i'm just checkin it out now..
Hello guys. I have a really weird issue with crypt().
I am working for a customer and the system I have created works perfectly for PHP version 5.5.3.
Instead, in the customer's hosting, it uses PHP version 5.2.17 (which I highly doubt can be changed at the moment).
@MadaraUchiha i saw this just now, do you happen to be in US/CA? eduvps.net

« first day (1178 days earlier)      last day (3996 days later) »