« first day (923 days earlier)      last day (4250 days later) » 

13:00
@Ocramius mostly .. you don't
@kaᵠ Actually something's changed I think. I tried posting a message (not reply) with just <youtube link> . in it and it still oneboxed
@Ocramius fixed the opengl thing on 13.04?
@kaᵠ don't know, didn't retry
I just stopped gaming for a bit
@kaᵠ Check out the edit history on chat.stackoverflow.com/messages/9077133/history - only the last one didn't onebox
13:01
@Ocramius your goal should be to make him specialize in one or few aspects of the application. That would isolate him from contaminating the rest of the codebase
loooooool
@tereško I'm already doing CR, but I feel like my "fix" diffs are bigger than what he sends me for review @_@
@rdlowrey actually, it might be unsupported for requests, but supported for responses.
was that the point you were making earlier?
have to run (some code :P)
Hello, anyone in here use Laravel? I need to learn a new FW to my company...
13:09
@rdlowrey In fact I'm inclined to agree with the viewpoint that the entire request body should be received before FCGI is even invoked. For a start there may be a 413 condition, also a 408 may occur before the body is completely received - both of these are the server's responsibility, not the CGI script's.
Replacing broken Umlauts like a Boss … with a hex editor
That's how you spend your holy friday?
@TillHelge yes!
Rëpläcïng Brökën Ümläüts lïkë ä Böss … wïth ä hëx ëdïtör
So pretty. ;)
13:18
@NikiC @ircmaxell Do you have an idea why, when using a function with reference, you cannot simply directly pass a value, but have to store it first in a variable? function test (&$var) { var_dump($var); } should make no difference if you're passing $variable or "constant value" to it. For example when I want to pass the value, but I'm not interested in a return value in form of a changed variable? The & operator should only indicate that, if possible the value should be passed by ref
(in my opinion...)
Uby
Uby
@bwoebi reference means reference, not "reference only if possible"
Hello everyone
Uby
Uby
if don't have the value stored in a variable, you can use test($var = 'value')
@Uby What's the sense of a reference when you don't use the variable?
13:23
@DaveRandom Those are the metros... the center of all the attention in India... and they have a lot of pollution... with development comes pollution... sadly. I haven't been to those places. But where I live its a lot more greener.
Uby
Uby
@bwoebi if you don't update the value then it shouldn't be passed by reference
@Uby It's about bind_param I tried to call by call_user_func_array. And the array is not full with refs when I receive it...
@bwoebi reference implies that the passed variable will be changed. Which is not possible if you pass a value. If you are going to pass values, then chances are high that you got something wrong and you don't really need a by-ref pass
@Uby I cannot choose my function here ...
Uby
Uby
@bwoebi then use bindValue?
13:25
I need to update meta from dom element runtime .. is it possible ?
@NikiC Then explain me please where in mysqli_stmt::bind_param the variable is changed... Anywhere, but it's by ref!?
@Uby this is PDO.
So far I tried
@bwoebi The purpose of that function is that you can change the variable that was bound from the outside
$xpath = new DOMXPath($domObject]);
$contents = $xpath->query('/html/head/meta[@name="description"]/@content');
Uby
Uby
@bwoebi I know, use PDOStatement::bindValue() instead of PDOStatement::bindParam()
13:26
In PDO there are two methods, bindValue() [which does what you want] and bindParam() [which does a by-ref bind]
But Mysqli sucks balls and as such it does not have something like this
Obvious solution: Don't use mysqli.
@NikiC I know this. But this implies some workaround which is not agreable.
Uby
Uby
@bwoebi sorry, I just read about mysqli
Hi hakre , thank you for your input on my question
@NikiC It sucks balls? Should male programmers place it under their desk to get a lift?
13:27
To be honest with you I don't understand the difference between: All children, or all children of a specific namespace?
:)
@hakre No he means gobstoppers
@NikiC But PDO only supports synced queries...
@bwoebi It only implies that mysqli's API is total shit, which is a well known fact and the reason why I would only recommend my worst enemies to use mysqli. (Not that I have any enemies, obviously ^^)
I suppose I would want all children (not just of spec. namespace)
@hakre That's the influence from the C++ room. Everything "sucks donkey cock" there ...
Uby
Uby
13:28
@bwoebi synced queries?
@DaveRandom Ah okay, that was not clear from the context.
@NikiC I've never had problems with mysql, this is my first problem I've ever encountered with...
@NikiC uuuh. those C++ guys must be having a hard time. Rough life they face.
I also think it is not as bad as you just outlined it. Yes that function (and another one in the past was) is still missing but you can also work-around that easily.
@Uby See the MYSQLI_ASYNC option to mysqli::query
However PDO is not bad either.
13:30
i can't test it out, what does this script does?
php -S localhost:3000 -t .!!!!
@okok what specifically are you wondering about?
@hakre about what that shell script do
if i run
@NikiC And what's the problem to simply add bindValue also to mysqli? (and support named prepared statements there?)
@okok That is no shell script but the webserver: php.net/features.commandline.webserver
13:31
@okok if you run php -h it should explain all of the command line options
@bwoebi go ahead, do it :)
Although frankly, dafuq is .!!!! about
oh ok
alternatively google "php command line options"
13:32
@NikiC Shouldn't be too complicated, a bit copypasta from PDO...
@webarto remi!
@rdlowrey streaming response should still be possible, since most requests are quite small, this should be ok-ish in practice.
@webarto lol quality
@bwoebi I see you've got the right attitude to fire-up a patch into PHP-internals list :)
/me suspects that a bit copypasta from PDO is vastly underestimating the task
13:34
But I wonder if Johannes will let you pass with that easily.
@hakre right. You'll hear in a few days from me I suppose
Maybe not, but I'm will to bet that if it were that simple, someone would have done it already
@DaveRandom I don't underestimate it, I only joked.
@bwoebi Talk with Johannes first. I think he will give you some good directions before you start.
@DaveRandom Fracking? I completely missed this! :P (Late to the party)
13:35
@hakre About what? How to do the patch or what?
@bwoebi About the mysqli extension.
@hakre the mysqli ext shouldn't be the problem. What's worse to deal with is the mysqlnd driver
@bwoebi well also for that, talk to Johannes.
Hello all
13:37
yes, very very welcome.
The lxr.php.net gives me now a "HTTP/1.1 500 PWC6117: File "/search.jsp" not found" !?
i want suggestion from you, till now i developed in core php now i want to switch over framework but i am so confused which one should select?
@bwoebi Java crashed again
or not, it's back
@ircmaxell And works again...
13:39
@YadavChetan Write your own to learn the basics of what you need and why. Then pick a framework for what you require.
i just want to learn framework but which one i should select ?
@hakre Ok, the driver is also implied. But what should I ask exactly? I think to find myself through the code makes it easier to understand than being guided?
lols
13:41
:-D
You went for the followup first
I went for the first one first (either way)
@ircmaxell okay
okay
O.K.
Dokay
Rao
Rao
13:45
can I register a url in HTTP_REFERER of $_SERVER through php code?
@ircmaxell thanks for the suggestion
Rao
Rao
anyone?
@ircmaxell he should just see two of them cc @YadavChetan
@Rao Try it.
13:48
@Rao can you explain what you mean by that statement?
@ircmaxell thanks for the suggestion
@webarto which?
Rao
Rao
i mean i want to record a url as referrer url when a page is visited. so that when I use window.location.href = document.referrer in JS it should go to my url
No, you don't want to do that. It will open a massive security vulnerability
you should never depend upon the referer
Rao
Rao
actually im doing this when a user tries to access a page which is restricted for a logged in user <?php
  if(! wp_get_current_user()->data){
		header('Location: /user/login');

  }
so before i do header('Location: /user/login'); I want to record his url
so that when the user logs in i shall redirect him to that url
13:52
store it in the session
Rao
Rao
how do i do that?
happy friday
God, that was hard work...
uhmm... CISPA affects people not in the USA?! :o
13:54
6 hours ago, by DaveRandom
Hey wait a minute, it's Friday!
$num = "'".$_GET['num']."'";
if(!require('../juice/wp-load.php')){die();}
$args = array(
'posts_per_page' => $num,
'order' => 'DESC'
);

anyone know what might cause $num to not be passed properly?
@DaveRandom Ahhh, there we go ;)
@TheSnooker The fact that you're putting random quotes either side of it?
@webarto clap clap clap
@Jimbo it's a string though..they have to be quoted.
right?
13:56
@webarto Nice!
@iroegbu I suggest moving all data centers to pakistan
@Jimbo lol .. ty.. it was the quotes.
@Ocramius I'll just get a public IP and host my stuff from my machine :D
We0
We0
Hi everyyone
quick question
@bwoebi You should not ask but tell; communicate what you are planning to do. That's all.
Just talking before coding. Can make wonders.
There is no problem implied, was suggesting you that, that's all.
We0
We0
14:04
does anyone know of a good resource for using php with rabbitMQ
21
Q: Best PHP client library for accessing RabbitMQ (AMQP)?

dkaminsThere is a list of PHP clients on the RabbitMQ site. I'm asking this question in hopes that people who have used any of these can share their experiences here. E.g. Did you have any trouble installing? Is it stable? Were there any performance issues? How is the documentation / support? Even ...

We0
We0
@hakre didn't help much
@We0 have you also tried second link on google?
1
Q: RabbitMQ Implementation

Phill PaffordHere is a little about the setup I have currently. REST API to push ( POST ) data into a queue The Queue has a Consumer that's always running and Produces to en Exchange The Exchange routes to several other Queues ( like 20+ ) Each of the ( 20+ ) Queues does a specific task ( The Consumers alwa...

Does anyone have an idea on the best method to round a DateTime down to the closed 5 minute interval ?
@damienovereem where does the 5 minute interval start?
We0
We0
14:09
@hakre Thanks
Bad explanation on my account... Basically: 16:11 has to be round down to 16:10 ... 7:08 should be round down to 7:10, 8:01 should be round down to 8:00
and then i mess up .. 7:08 should be round down to 7:05
I assume you want to base it to the minutes starting at the same hour.
Which should be the minutes value.
(i have netflow data traffic files on my filesystem that are generated in 5 minute intervals, resulting in files like nfcapd.201304261425 .. i need to generate a command line string for a tool called nfdump, which need the start and end file
so in example instead of: nfcapd.201304261428 .. (last int an 8) I would need file nfcapd.201304261425
14:14
Just substract the modulus of 5 from the minute value and you should get the starting minute of the current period. It's more a mathc question than a datetime one.
Didn't do math since highschool.. but I do understand your solution in a "why the hell didn't i think of that" kind of way :)
thx :)
s/\xc3\x83\xc2\xa4/\xc3\xa4/g #ae
s/\xc3\x83\xc2\xbc/\xc3\xbc/g #ue
s/\xc3\x83\xc2\xb6/\xc3\xb6/g #oe
s/\xc3\x83\xe2\x80\x9e/\xc3\x84/g #Ae
s/\xc3\x83\xe2\x80\x93/\xc3\x96/g #Oe
s/\xc3\x83\xc5\x93/\xc3\x9c/g #Ue
s/\xc3\x83\xc5\xb8/\xc3\x9f/g #sz
s/\xc3\x83\xc2\x94/\xc3\x9f/g #sz
this did it
this did what?
replace the umlauts in the sql dump
are you fighting UTF-8 here?
14:19
@Gordon that's totally readable !! lol
@hakre not fighting but trying to make it
I think mysql ships with a tool for that in their extras folder.
actually works quite well: $StartDate->modify('-' . ( $StartDate->format('m') % 5 ) . ' minutes');
also you can say when you read in the dump which encoding to use (or to transpose)
@hakre that approach was the last resort already. nothing else worked unfortunately.
14:20
should i scan you the article from linux mag? they just had it this or last edition.
@hakre you are an evil person to suggest such a thing on World Intellectal Property Day
@Gordon Oh I feel sooooooooooooooooo sorry.
@hakre send it tomorrow please :)
I wonder with so much crap that says it is copyrighted, how could you name it Intellectual after all?
4
@Gordon If that's better for you heart, I can send it also tomorrow in a different timezone. I would do that for you, no problem. :)
@hakre i dont care about the timezone but thanks
user895378
14:25
@igorw Yes, I was specifically talking about requests.
hmm. it doesnt replace the ß
user895378
@DaveRandom I think you're right. I hadn't thought of those scenarios.
WTF? I am sure I used the right hex code
is there a free hosting service where I can create a url and parameters for it? I need this for testing an API
user895378
@DineshVenkata like this?
user895378
14:27
Not sure what you mean by "create a url and parameters for it" ...
@rdlowrey I think that is what I need will check it thank you
user895378
@DaveRandom actually on second thought you could send the FCGI server a FCGI_ABORT_REQUEST at any time so those 413 or 408 scenarios shouldn't make a difference. If an error occurs on the web server end like that you simply cancel the request to the FCGI server.
user895378
So it seems to me that FCGI's failure to stream a chunked request entity body is still a fail.
hmm. the hex code is supposed to be c3 9f but I get an Ã. anyone why?
user895378
14:31
They should have implemented a key-value pair packet style specifically for entity bodies specifying the length of each chunk terminating with a final empty chunk (or something). Requiring a CONTENT_LENGTH environment variable is a fail IMHO.
@rdlowrey OK so what, you want FCGI to block until eof if the program tries to read from stdin the request body, but otherwise just process the request based on the headers? I guess that could work. But then you'd have to buffer the response - it doesn't really make sense to start sending the response until the request is completely received
@rdlowrey can I post data to that url?
user895378
@DineshVenkata I think so.
user895378
@DaveRandom No, I'm suggesting that you should be able to stream the request entity body to the FCGI server without knowing its content length.
@rdlowrey when I post it throws "method not allowed"
user895378
14:34
user895378
@DineshVenkata Use the /post endpoint.
user895378
I'm pretty sure the method is allowed.
@Gordon à is U+00C3 - are you sure you are doing raw bytes and not unicode payload bits?
@DaveRandom no. I have no clue what I am doing :)
it worked for the umlauts.
@Gordon u+00DF is ß
user895378
14:37
@DineshVenkata As I'm not sure what you're trying to do I can't really say whether or not that site is appropriate.
U+00DF 0xDF ß ÃŸ %C3 %9F
0xDF is on Windows 1252
@rdlowrey I need to be able to give a url to a service provide who's going to post the data to it
AND u+A7 is §
but utf-8 is c39f
user895378
14:39
@DineshVenkata So what are you trying to test? That your endpoint behaves correctly when someone posts data to it?
no idea also, don't remember seeing a ß in latin1
let me try to replace with Windows 1252 and then import that to the db
@rdlowrey actually its more about testing whether the service provider's API is working correctly or not
have a small pain in my elbow :P
user895378
So why can't you just use your endpoint and POST data to it with the service provider's API?
user895378
14:41
And see what happens?
user895378
$ curl --data "foo=bar&baz=bat" mysite.com/post
@rdlowrey I don't have access to any hosting service where I can host my url
user895378
@DineshVenkata Host it on your own computer.
I reckon it will be local then the service provider can't push the data to my pc
user895378
14:43
@DineshVenkata Why not?
user895378
your computer is no different than the computer a hosting service would use.
anyone know of a quick tutorial to teach proper documentation?
@rdlowrey then I need to have a public ip right?
user895378
@DineshVenkata If you're on the internet you already have a public IP.
file -i mysql_dump.sql
iconv -f usw.
14:45
@rdlowrey gotcha
user895378
Assuming you're at home behind a router just use the router configuration tool (usually browser-based) to open port 80 and point it to your computer's IP address.
And then.. weekend has arrived!!
and mysql ... --default-character-set=utf8 ... < dump.sql
Time to stop programming and start working on my little sailboat.. yay me!
user895378
Then host the site on port 80 on your computer. Then go to whatsmyipaddress.com and that's your public IP.
user895378
14:46
Just like that, you're hosting your site right there from your computer.
user895378
It's fine for testing, but you don't want to do that for production obviously.
I want to use arsort() to sort a 2 dimensional array by date, how do I go about setting date as the index so this can be accomplished?
@rdlowrey sure thank you but it would have been great if there was an online service for this
user895378
@DineshVenkata Do yourself a favor and learn how to host it yourself.
user895378
Don't skate by not understanding how your technology stack works.
14:49
@rdlowrey sure :)
Actually I think usort might work best?
hang on! That works?!
I'm on a proxy server... what address am I to use?
user895378
@iroegbu "on" a proxy server?
user895378
You need to be able to tell whatever routing apparatus is between your computer and the internet to forward traffic on your port of choice to your computer.
user895378
You need to open that same port in any firewall software you may have on your computer as well.
user895378
14:53
@iroegbu But yes, that's how it works.
I have:
MyComputer -> ProxyServer -> Internet
I have a small LAN
user895378
I assume the proxy server is simply proxying your http requests, right?
Isn't this the PHP chat? (kidding, lol)
@Daniel this is the Personal Home Page Tools chat
15:01
lol
Plesk Home Page ?
lols... I put the IP... it's routing through the LAN
I did like: `http://<ip_address>/project_name`
At any rate, anyone have any suggestions on sorting a 2 dimensional array?

$my_array[0]['create_date']
$my_array[0]['ip_address']

is an example of what my array looks like, I'm hoping to sort it desc by create_date
@ircmaxell I hate when you "blah". you always do it out of context
15:03
:-P
usort($results1, "create_date"); doesn't seem to work
well $my_array instead of $results1
user895378
@iroegbu As long as you can tell your router to forward incoming traffic on the relevant port to your computer's IP address then it should work regardless of the existence of the proxy server.
@rdlowrey ok, thanks. I'll talk to the sysadmin :D
15:10
@igorw Noice.
I can see where this is going. Okay, let's say I have a router with incoming traffic, and I want to sort by IP address. How would I do this using a 2 dimensional array and php?
just got a reply to an SO comment I made half a year ago
@igorw "You suck" ?
@Gordon root... :-X
15:15
@webarto I wish
Ah. That makes sense. Thanks. — Jules 56 mins ago
@igorw It made sense half year ago too :D
user895378
@iroegbu If you're at work it's unlikely that the sysadmin will let you host a site/application on the work IP :)
user895378
But you should try it out at home.
@rdlowrey I have a similar setup at home, if he explains it to me properly. I'll do it on my own.
user895378
15:18
It's really simple ...
user895378
(1) open the port in any firewalls on your computer
(2) tell your router to forward incoming traffic on that port to your machine's LAN IP address (192.168.1.123, or equivalent)
(3) host your site on that port
(4) find out your public IP address
(5) PROFIT!
@rdlowrey That's too easy.
user895378
It sounds simple ... sometimes the garbage consumer-grade routers create problems though
That's true mate. Or lose config sometimes.
@rdlowrey ok, thanks. Will try that out @ home
15:29
Happy weekend folks :)
@NiekBergman Enjoy
@NikiC prepared for Jam Round 1 ?
@kaᵠ Nope. When is that again?
15:46
morning everybuddy!
@Ocramius I was pinged?
Something about FIG and collections?
@crypticツ hello
Good Afternoon
@Baba is it afternoon where you are? /:-|
@iroegbu lol .. only said what my PHP script outputted
16:02
@LeviMorrison lol, yeah, wanted to ask if something like what is proposed is even possible in your opinion
Link to proposal?
@Baba hehehe
@Ocramius Solution: use my library.
Of course, it's not even 1.0
I've gone through a lot of the same API decisions they are going through.
Collection
    add($value)
    contains($value)
    remove($value)

Map
    set($key, $value)
    get($key)
    contains($key)
    remove($key)
^ This isn't really an issue unless you want to add/remove specific items.
@LeviMorrison you wanted to add generic appendAll? :)
16:09
Things like Collection->map() can work on any Collection. The question is really: what return type do you give?
@LeviMorrison collection again imo
@Ocramius That's what I decided as well.
@LeviMorrison I don't have problems about using other libraries. FIG is mainly about convincing a larger group to normalize an implementation :D
or well, THEIR implementation
Well, I don't think they're going to get anything significantly better than what I have.
I still have bits to clean up, etc, but overall it's pretty solid.
The real problem is that the SPL data structures are garbage and unusable for a lot of cases.
@LeviMorrison yes, it's the shared interface that matters. If you can push your stuff, do it. Would be nice to see it in there =D
16:12
In all honesty, I think this proposal shouldn't be needed but still more useful than PSR-0 and PSR-1 :]
lol
"Map" can be many different things
and same goes for "Collection"
maybe they should normalize interface for "Object" too, while they are at it
@tereško Especially "map" because it is both a noun and a verb.
i use collections for managing groups of domain objects ... this means that collection contains some domain logic
and it also , means that contains() is an extremely useless method for me
@NikiC it's not again, it's the next round 27apr@1:00UTC that's 8 and 1/2 hours away...
lunch and such, bbl
16:41
@LeviMorrison Good luck with that
argh, gmail stinks of too much JS
@ircmaxell With which part of "that"?
the email you sent, and getting sanity there
@ircmaxell Eh, I probably won't spend much more effort on that if any.
16:49
:-D
@kaᵠ Looking at a screen like that ... dash cam, sigh.
17:05
@webarto 'dash cam' ?
does anybody know of a decent uml modelling tool that builds php classes?
17:56
Hello !
yellow !
actually.. it's not really good :P ^
@kaᵠ That's a pretty bad time for me. 3 in the morning...
@Ocramius no, afaik there isn't one
@NikiC it's 4:am for me too :(
hoping to be able
18:10
@kaᵠ maybe just pick a different round?
I guess that's the reason why the have three, at different times, right?
@NikiC i guess so
i'll try anyway
@kaᵠ you'll stand up at 4am for this?
@NikiC i'm half way down on a cola drink not sure i'll fall asleep till then
@kaᵠ Even worse. Solving that kind of stuff being tired :D
18:13
@NikiC that's how i passed the qual's :)))
@ircmaxell you have a black-fiber welded in your pc?
:-D
nope, just an ethernet cable
gbit ether+gbit sw @ isp
@ircmaxell how much do you pay for that?
that's a bit too much
it's my work connection
18:22
good for you
gige to switch, gige to router, fiber to backbone in datacenter... :-D
black magic
ping: 97ms | download: 1Mb/s | upload: .4Mb/s :(
i'd post the fancy picture but i don't want to waste my limited bandwidth sending the "share this result" request
18:42
lol
18:52
hi
hello!

« first day (923 days earlier)      last day (4250 days later) »