« first day (1755 days earlier)      last day (3419 days later) » 

00:00
Parallels = wish I had the money for that
haha
I use virtualbox
and vagrant
*spent my money on my laptop ;-p
@Andrea What does parallels do better? (compared to e.g. virtualbox or vmware)
@bwoebi tons of guest integration, it seems
3D graphics passthrough
@DavidGraham I don't, I've tried the trial though
00:03
@Andrea with passthrough you mean direct access to GPU?
@bwoebi I don't know exactly how it works, but I can run Final Fantasy XIV (a 3D DirectX 9 game) in a Parallels Windows VM inside OS X, and the graphics work
@Andrea that makes sense. But I suppose thats good for more GUI type interactions
@Andrea ah okay
I'll give you that!
but practically speaking, most of us don't have those type of use-cases
This is a PHP chat, after all
sure
I've only used Parallels for that purpose, to try it
It was slow enough I just dual-booted instead
I use virtualisation primarily to try OSes and partition USB sticks
and pretty much nothing else
00:07
@DavidGraham right. And the C code powering PHP needs to work on multiple platforms and compilers! ...
sadly
technology is generally quite awful
@Ocramius is this what you were talking about earlier, thinking they didn't capture the discussion? youtube.com/watch?v=vS0Nn_ncH-8
youtube automatically recommended that to me on the side
when watching Matheus' talk
00:22
@DavidGraham that's a different topic
But it is kind of connected to the discussion earlier
code the interactions
that's sort of defensive
Abe
Abe
@Ocramius was expecting you to have a super mario accent, but no :P i mean, considering your avatar :D
(i'm italian, too)
@Abe yeah, I'm a disappointing Italian and Austrian, and I'm happy to disappoint both nations
Abe
Abe
:P
@DavidGraham the fact is that state is your enemy. Bugs come from state changes most of the time
/me cries looking at 50k expenses this year @_@
what the actual freck.
Abe
Abe
00:29
we are not aggressive drivers though, just wannabe schumachers :D
I drive defensive even when I drive fast
Abe
Abe
:P i didn't know about defensive driving but in italy you learn it the hard way :P
Yes, especially south of the Rubicone
hrhr
Abe
Abe
lol, yeah northern italy drivers are slightly better :D
i never had a car crash ever. i must adopt defensive programming too, then
@Ocramius how do you profile code?
xdebug?
kcachegrind, xdebug, appdynamics or similars, sql logs, measuring iops
Abe
Abe
00:39
and you profile on the actual app running or you set up some specific tests?
depends. App first, then test once you isolated the bit of code that needs to be enhanced
you can also write performance tests for some code
then compare the changes to previous results to prevent regressions
Abe
Abe
what you are saying shouldn't be "extremely defensive" but just "the norm" :)
Abe
Abe
01:00
clone would be much better if it was just
public function clone(){ $x = new static(...); return $x; }
public function clone(){ return $this; } // immutable
@Abe there are enough reckless people driving around. Take the example with those that don't use "la freccia" ;-)
@Abe it's one of PHP's WTFs
Abe
Abe
@Ocramius yeah :(
Hi all, I have a very quick and silly question... If you have an url like example.com/index.php?event_id=27&red=xyz , can't you just retrieve the event_id like $_GET['event_id']; ?
it's giving me undefined index error
var_dump($_GET);
array(0) { }
ok, it's not being passed to you script
are you trying to read a remote URL or is this the URL in your web browser?
it's like, I have a form that succesfully sends me to the location header("Location:index.php?core_event_id=".$core_event_id."&red=thankyou");
on that page I can get the core_event_id like above or with request
but on index.php?core_event_id=27&red=thankyou I can't
01:22
if (isset($_GET['core_event_id'])) { /* put code here */ }
ok
did that too
hmm
what's your webserver?
apache on dreamhost
if(isset($_GET['core_event_id'])) { $core_event_id = $_GET['core_event_id']; } tried like this
just doesn't give the error undefined index but nothing else
var_dump($_GET) ?
array(0) { }
01:26
is complete result ? than your get is empty and $_GET['core_event_id'] is not set
you are not getting error because you are checking weather its set or not before using
I am checking it with isset
but the url is like this: example.com/index.php?core_event_id=27&red=thankyou
so I guessed it would be possible to just get it like that but it's empty
your $_GET is empty :)
just try var_dump($_GET) at the top of page and see what are you getting
with above url
yep the same result, I'm definitely doing something wrong somewhere.

The process is like this: user fills the application_form.php - action='submit.php' - submit.php does all the sql and sends me to example.com/index.php?core_event_id=27&red=thankyou --- on index.php I have this code to ajax load thankyou.php : http://hastebin.com/juqokolufi.xml
I think there I do something wrong
mornin'
01:38
morning
01:57
morning
mornin
anyone knows whats going on here..?
var_dump(isset($permNames['securityUser'])); // return false
var_dump(in_array('securityUser', $permNames)); // return true
php v?
5.5.9
"5.4.0 Checking non-numeric offsets of strings now returns FALSE."
hmmm, not that I guess
ah nvm i think i found it
the isset is checking the key, instead of value
02:10
oh, yeah :D
tq for ur help neway
but..
on some threads they implement it like that to check it
02:33
curious what other's here do to combat the mental strain from fast paced /agile development?
I think I might start answering SO questions everyday. sort of as a hobby you know?
seems like a lot of people are here to do that or because of the opposite.... they are the only developers at their place of employment.
02:53
@r3wt work for 9+ month, then leave the job an binge on audiobooks for a week
@tereško your weeks up isn't it :)
yeah, now I am just dicking around and doing some light learning
I'm gonna start to look for a new gig next month
03:10
@assertchris Hey Chris, haven't see you here before!
@Trowski I don't come here often
03:53
Is there any known issues with ipv6 and fsockopen?
user895378
@Orangepill not that I know of. But you do have to wrap IPv6 addresses in square brackets when using them with php networking functions.
@rdlowrey I was looking at this
user895378
e.g. $uri = "tcp://[fe80::1]:80";
its not for me... I leave the low level socket shit to the experts :)
user895378
I'm not sure if PHP is capable of resolving IPv6 names with the built-in functions actually.
04:02
is there a way (on linux os) to specify a resolution preference (ipv4 over ipv6)
user895378
looking at ext/standard/dns.c it appears AAAA (IPv6) records are supported
user895378
I don't personally ever use php's built-in dns resolution functionality because it blocks
so you build your own dns client?
of course you did
user895378
yup
user895378
It delegates much of the work to @DaveRandom's excellent LibDNS, though -- I didn't descend into the gory details of the DNS protocol myself.
user895378
04:05
As for the question answer you're trying to answer ...
user895378
gethostbyname() is incapable of resolving IPv6 records and this is what PHP uses if you pass an actual domain name in a URI.
user895378
The user needs to specify the IP directly in this case. This means they should:
user895378
1. Try gethostbyname() first to see if it can resolve an IPv4 address.
user895378
2. If that fails (and it will in this user's case) they should manually use dns_get_record() with the DNS_AAAA constant to indicate IPv6
I'll let him know.
user895378
04:10
@Orangepill get those internet points!
okay if I site you as the source?
user895378
I don't care if you cite me (you don't have to unless you just feel like it) -- you can cite the php manual about gethostbyname() only resolving IPv4 though.
user895378
And you can cite php-src here: lxr.php.net/xref/PHP_TRUNK/main/network.c#253
user895378
where it shows that gethostbyname() is used internally to resolve the name (which makes automatic IPv6 resolution impossible)
user895378
Someone should really update gethostbyname() so you can have it optionally make an AAAA query. I would do it but I have exactly zero use for it since I don't rely on php's dns resolution functionality anyway.
04:16
I cited you mainly because I don't want to be confused with someone who knows what's going on there
user895378
lol that's fine
hi
anyone on?
hi
@rdlowrey so they will have to use dns_get_record($hostname, DNS_AAAA) ... read the ip from the returned result then construct a connection string with the square bracket notation using the address
user895378
right
user895378
The problem is that this is only necessary if the host doesn't have any IPv4 records (which you won't know until you try to resolve it).
user895378
04:23
@Orangepill I edited your answer for formatting and upvoted -- hope you don't mind
how costly is the double lookup... is it something that should probably be cached?
not at all
user895378
Well, it's a network roundtrip -- if you expect to need that IP again in the life of the same process it's definitely something you should keep on hand.
user895378
In my DNS lib I automatically cache all lookups using the TTL returned with the DNS response
just for the lifetime of the object or are you stuffing it in a longer term cache?
user895378
It's a good idea to store DNS responses in a redis cache (or some other persistence layer) because usually DNS TTL values are on the order of hours and days.
user895378
04:27
Those are values that don't change very frequently
user895378
So any time you can avoid a network roundtrip out to a DNS server it's a good idea.
user895378
If my lib weren't still unstable in terms of API I would give you a code snippet and suggest using that. But alas, the current master branch is going to be changing in the next 1-2 days.
user895378
Anyway, I'm off to bed. Hope that was helpful. Have a good one :)
that's what I had done in the past.... felt like a good idea at the time. My caching was a little more meat head though.... lifetime was until I timed out on a connection then it would attempt another lookup and die hard it that failed.
you too ... thanks for spoon feeding me the points :)
04:42
Hi Guys. My friend has a question.
It seems
the suspense is killing me .... what's the question
@Orangepill - let me ask my friend
0
Q: Modifiying data in array

Another_Oneforeach($contacts['feed']['entry'] as $contact){ $return[] = array( 'name' => $contact['title']['$t'], 'phone' => isset($contact['gd$phoneNumber'][0]['$t']) ? $contact['gd$phoneNumber'][0]['$t'] :false, ); ...

Guys, got the question now
Please help my friend . Thank you.
@Orangepill - got the question from my friend
@KnowMe Just so I can make sure I understand where you are going you want to make an edit form for your google contacts?
I should think there would be some unique value in the returned $contact.. that would be something helpful to stuff in your return array.
04:57
@Orangepill - there is already a bootbox dialog box - and when the user clicks save - the function for editing google contacts will be called - u can say that am making an edit form maybe
What data elements are required on the put request to allow for an update?
@Orangepill - I think data elements required are the name and phone, not sure
@KnowMe do you have a link to the documentation of the api you are using
yes
@Orangepill yes
@Orangepillhttps://github.com/google/google-api-php-client
@Orangepill - will be back in an hour
05:13
i have a question in Yii framework
@Orangepill - am back
looks like this is the guy you need to call Google_Service_Mirror::update($id, Google_Service_Mirror_Contact $postBody, $optParams = array())
construction of the post body is going to be done using the 2 fields you specified on your form I would suggest adding a hidden field to contain the id that you get from the query request
@Orangepill - which query request
the one where you get all of the contacts... on of the fields in that feed should be the contact's id
@Orangepill - what do u mean - am a bit confused
@Orangepill - oh ok
I understand now
05:24
foreach($contacts['feed']['entry'] as $contact){
    $return[] = array(
    'id'=>$contact['id']['$t'],
    'name' => $contact['title']['$t'],
    'phone' => isset($contact['gd$phoneNumber'][0]['$t']) ? $contact['gd$phoneNumber'][0]['$t'] :false,
    );
}
@Orangepill - what is hidden field
^ I think that will get you what you want...
oh ok
<input type='hidden' name='id' value='<?= $contact["id"] ?>'/>
@Orangepill - haha yes i know
@Orangepill - thanks for ur advice - I will work in in after an hour and get back to u, - thanks a lot
@Orangepill - I will work on it after an hour and get back to u, - thanks a lot
@Orangepill- where to find out more about Google_Service_Mirror::update($id, Google_Service_Mirror_Contact $postBody, $optParams = array())
05:29
morning
@KnowMe this should provide a reference on how to create the $postBody resource from you data attributes
morning
@Orangepill - ok - thank you
05:44
o/
ok, peeps, I'm off to a market .. don't do anything interesting
I am going to go to sleep... night all
i have a question yii framework
answer is: yes, it's piece of crap
is it possible to see the query that is being run, which is defined through cDBCriteria
aanybody?
can anyone help me?
06:09
moin
@tereško lol

Framework advice

28 mins ago, 39 seconds total – 2 messages, 2 users, 0 stars

Bookmarked 29 secs ago by Sergey Telshevsky

06:31
hi
06:46
@Orangepill - sleeping ?
@KnowMe different timezones ;-)
@kelunik - yes
Hey
Yo @Patrick
Good morning
07:24
morning
Hey.
weird, weird, im trying to do the tutorial again: but im a bit stuck at this part: github.com/PatrickLouys/no-framework-tutorial/blob/master/… the latest part. Wheny ou actually have to run it. I just get a blank screen, no error, nothing returned.
@Duikboot error_reporting?
That's already on :) ( No errors )
07:42
Morning
07:53
Morning
yeah ... it is ...
I just plucked up the courage to submit for phpnw and the cfp is closed ...
moin
@Duikboot Echoing works? I would guess that either you are missing the code that echoes the response content or that it is placed before the controller is executed
anybody made an ebay shop cusotm template before?
*custom
08:08
How is this related to php?
it's not. I just didn't know where else to ask.
Try JavaScript lounge, they're largely off-topic irrelevant anyway.
08:25
When I do an echo in my contructor it works yes @Patrick It has to be something with: $this->response->setContent($content);
Fixed it.
Happy friday \o/
@PeeHaa Don't say that.
@Duikboot what was it?
"echo $response->getContent();"
Like you said.
This is the second time I am doing that tutorial and everytime it makes more sense. :)
08:40
Hi Guys
I want to ask how to concatenate 2 php variables into 1
@KnowMe did you try to google it or look in the docs?
@Duikboot nice
@Patrick - Finding in google at the moment - I think I found the solution - thanks
@Patrick - going to try it out
does anyone know how long an instagram access_token lasts for?
@AaronHarding It didn't used to have an explicit expiration
08:45
@KnowMe always google before asking.
yeah, i didn't think so and now there docs like are like ¯_(ツ)_/¯
@Epodax - ok thank you
@AaronHarding Yeah those docs tend to do that
@KnowMe That way you avoid people being grumpy.
@PeeHaa "Even though the access token does not specify an expiration time, your app should handle the case that either the user revokes access, or Instagram expires the token after some period of time."
08:46
@AaronHarding Yeah sounds about right
like i understand the user revoking access, but.. lol
are they just saving their backs or something?
@Epodax - yes thanks
Has someone experience in something like this:
A) I signup for an event
B) I print my ticket with a barcod / qr code
C) When the event start I'll enter the conference or what else it is, and someone scans my ticket.
D) When the ticket is valid a 'batch' is being printed automatically.

I was thinking about EventBrite but I don't think they have a link to setup prints for batches.
@Duikboot Why not print the badges in advance?
filter_var($titlel,FILTER_SANITIZE_SPECIAL_CHARS);

Is this secure for sql injections? I'm only saving title with a small discretion. If answer no, what is the easiest way to filter back slash, qoutes, commas ect
08:49
@VarunaLex no
@VarunaLex Just use prepared statements with bound parameters
The thing is now they want to do it 'on-site'. Because then they don't have spilled 300 batches when there are only 100 people attending.
@Duikboot Why?
2790
Q: How can I prevent SQL-injection in PHP?

Andrew G. JohnsonIf user input is inserted without modification into an SQL query, then the application becomes vulnerable to SQL injection, like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the us...

@PeeHaa so?
@VarunaLex So what?
08:50
@PeeHaa Because then they don't have spilled 300 batches when there are only 100 people attending.
@Duikboot People already paid for the tickets / badges right?
No, free tickets. free enterance, see it as invitations for a confrence which is free.
On demand printing is going to be hell when everybody enters at the same time
That was I thinking as well.
Hmm
@PeeHaa eventday.com seems to do what im looking for. ( Sick pricing wow )
09:06
Damn that is expensive
It should be nice to have a application between : EventBrite and Evolis printers so they can connect and print it out.
@Duikboot Perhaps the best thing you can do is build a webpage (assuming there is an internet connection) which displays a single badge for printing
But printing badges from the web is hard so you will probably have to tweak it exactly for said printer + browser combo
Indeed, but you mean without eventBrite? You mean a list with all attendees and you check if someone is attending then data got parsed into a 'template' and then the printer does the work?
Hii Everyone, How r u ? May i know your valuable suggestion on this stackoverflow.com/questions/31850052/…
Yeah
Although I see they also supply something to print specific badges help.eventbrite.nl/customer/portal/articles/…
09:14
yup, saw that too.. :)
Hi Guys - I would like to ask what is Google_Service_Mirror
@KnowMe It's something with - Google Glasses no? - https://github.com/google/google-api-php-client/blob/master/src/Google/Service/Mirror.php

https://developers.google.com/glass/v1/reference/
@Duikboot - is it - so can it deal with google contacts
@KnowMe yes, and I only know the answer is yes because I clicked the api - developers docs

https://developers.google.com/glass/v1/reference/contacts/list
@PeeHaa I hope your Git hosting will be awesome, first steps in Phabricator suck.
09:27
@kelunik Yeah it will awesome :) Good to hear from you what sucks about Phabricator so I don't make the same mistakes
@Duikboot - can i use it to update google contacts from a codeigniter application
@KnowMe I don't know. It has update, and insert options... so probably it's possible.
@Duikboot - ok thank you
Seriously, I don't have many phone apps but it feels like they need updating daily.
@Fabor Since a few weeks, I hate my phone... I don't like it. I'll just using again texting and calling options only.
09:29
@Duikboot recently swapped back to a phone that can only text and call :P waaaaaay better :)
@Naruto do you have to delete all your texts regularly too?
Also. Facebook... I like the chat options for multiple people group chats... but that's the only reason I have FB.
@PeeHaa We just set it up at work, you have to create a project first and add a repository then in "Diffusion". I really want to have a quick button "New Repository" like GitHub has, creating a new org / team / project could be on that page then.
@Naruto with a number keyboard?
09:30
@kelunik Yeah that is how it works now in my project
\o/
Really strange, as far as I understand it yet, projects should actually be teams...
@FlorianMargaine yes
@Patrick no, went back to my nokia c3 ^^untill I found a worthy replacement :P
@Naruto Should have gone all the way
is that the 3310?
Unfortunatly i don't have that anymore :( and yes that's the 3310
09:34
yes it is... didn't remember the buttons being like that
I somehow expect taht buying a new 3310 on ebay would actually be quite expensive
And I get emails for my own actions.
...
jsut found em for 40 euro
especially since manufacturers price is something like 100 euro per ton
09:42
per ton :D
+ shipping costs, they need to protect everything it might be able to touch, or it would break it :P
@PeeHaa I know there are people wanting that, that's the actual problem. Not only people on the PHP mailing list, because it's one interface where they can search everything then.
Ok, I can disable it, but there are settings that are so annoying, they should be asked when signing up...
problem with that is that people just click next, next, next @kelunik
Anonymous
Monin! o/
Anonymous
09:51
\o
@Naruto Not in good interfaces. You'd just have "Start now" and "Configure important settings" with no default option selected.
true
They actually did that for creating repositories, but I didn't need it there, because there were no settings which I would have to decide about before activating a repository.
10:12
Hi guys
Morning
What do you guys think about the following approach boyan.in/mvc-components ?
Oh, Moustache is not made do to template exenstions or inheritance :(
Abe
Abe
10:34
morning
Hey @Abe @HamZa
Abe
Abe
o/
@HamZa You've been out of the country?
10:55
good day room. is beta3 OK for trying out? i don't see it's announced on the news page
not sure
wait for announcement ...
people (outside of internals) will be mostly ignoring it till 7.0
I've had a lot of requests to get apcu done, because people want to test with 7 betas ... whether they would actually do it is another matter ... +1'ing a thing doesn't take effort ...
okay thanks
11:01
@PeeHaa For a few days, I went to France... I'm just not active any more around SO...
11:15
hello! i need a help with PHP regex... i have preg_match with "/:[\s]*(?:([\d]+)\.[\s]*page|Pages[\s]*([\d]+))/i" but the problem is if I have string like "Total: Pages 11", there are zero match and 11 as result. how can i get rid of zero match?
@user1257255 "zero match"?
@Patrick I won't be at hackzurich
For sake of simplicity, you're using too much unneeded character classes: :\s*(?:(\d+)\.\s*page|Pages\s*(\d+)) would achieve the same
@HamZa zero-length match... it's empty string
with preg_match i get three values:
array (
0 => ': Pages 11',
1 => '',
2 => '11',
)
@user1257255 That's only natural, because it gets matched by the second group
11:21
yes, i know that, but it's possible to get rid of this empty string somehow?
thank you very much :)
welcome
Abe
Abe
11:41
@PeeHaa just wrote you on twitter :P check it when you have some time
@Poowho?
user924016
mornongs
mongonongorings
mongonongonongorings
eskjhfsedkjfesjkdsfhkfsdlhkflsdhfhkls
@Abe Will check it out
11:56
DAMN
I am already slightly drunk
@tereško noʎ ʞɔnɟ
3

« first day (1755 days earlier)      last day (3419 days later) »