« first day (1817 days earlier)      last day (3117 days later) » 

12:55 AM
Morning's
 
1:16 AM
I new to PHP and Which tool is really lightweight and good for PHP code debugging.
 
 
2 hours later…
Abe
3:58 AM
any prediction on what will happen now that zend is rip?
 
Morning
 
@Abe probably a bit of fucktardery and drama, but ultimately nothing of note
 
4:14 AM
'morning
@Abe I've probably missed something, but zend is rip? wat?
 
@FélixGagnon-Grenier sunk by a rogue wave
 
^^
is there actually anyone here who uses zend platform (and software)?
> With Rogue Wave, customers improve software quality and ensure code integrity, while shortening development cycle times.
I feel like a child
 
4:30 AM
food morning
 
o/ food morning :)
 
morning food \o
 
what's that starship operator??
 
4:45 AM
combined comparison operator
return $a <=> $b is the same as return $a == $b ? 0 : ($a > $b ? 1 : -1);
 
thnks @Orangepill
 
i.e. a slightly more operatic name for the spaceship operator
 
starship,spaceship,tie fighter,deathstar brilliant names ^^
 
5:12 AM
@Orangepill why do we even need that?
does it work?
 
syntatic sugar
 
"need" is a strong word, though apparently people fuck up basic comparisons like it often enough to justify its existence
 
seriously <=> is madness, its more like php framework/cms thing rather than core php
@PaulCrovella basic comparison operator are really simple even simpler than <=> :)
 
¯\_(ツ)_/¯
 
5:18 AM
@Andrea Pff… I speak German… but I'm not German… pfff…
 
5:48 AM
moin
 
morning Joe
 
morning Joe,bwoebi
 
6:10 AM
Hey @JoeWatkins, could you help me figure out why implementing one of my other interfaces is causing a segmentation fault? I was blaming it on the El Capitan update but turned out it's just my lack of understanding.

I've isolated it to `register_sequence` in `src/interfaces/php_sequence.c`.
See https://github.com/rtheunissen/collections/blob/master/ext/src/interfaces/php_sequence.c#L70
 
where's collection_ce ?
 
php_collection.h
 
is it registered first ?
 
Yup, right above it.
 
got a backtrace ?
 
6:14 AM
Try..
==9117== Invalid read of size 8
==9117== at 0x82F8C8: zend_do_implement_interface (zend_inheritance.c:968)
==9117== by 0x7EDC61: zend_class_implements (zend_API.c:2675)
==9117== by 0x84E68F8: register_sequence (php_sequence.c:70)
==9117== by 0x84E9D05: zm_startup_concat (collections.c:32)
==9117== by 0x7EAF18: zend_startup_module_ex (zend_API.c:1829)
==9117== by 0x7EAF71: zend_startup_module_zval (zend_API.c:1844)
==9117== by 0x7F7F56: zend_hash_apply (zend_hash.c:1460)
==9117== by 0x7EB500: zend_startup_modules (zend_API.c:1955)
 
you want gdb to actually look at the problem
it will break when SIGSEGV occurs
"frame #num" to switch frame, ex. frame 3
"list" to show code for current location
should lead you to the problem pretty quickly ...
you should play around with gdb too ... "help" is useful, iirc ...
 
I haven't used it all yet so this is good
 
figured, now is a good time to start ;)
 
Good morning
 
moin
 
6:22 AM
what a cold, windy and rainy morning
@JoeWatkins Did you make a bug in the fetchSun(); funtion? :)
 
@JoeWatkins I think?
Program received signal SIGSEGV, Segmentation fault.
0x000000000082be40 in zend_arena_alloc (arena_ptr=0x113b0d0 <compiler_globals+400>, size=208) at /home/rudi/.phpbrew/build/7/Zend/zend_arena.h:58
58 char *ptr = arena->ptr;
Not sure if I did that right.
 
@JoeWatkins the issue with gdb is sometimes that allocations usually are internally on at least 16 byte boundaries… and thus gdb won't always help… (well, like for bad offsets etc.)
and then the failure is delayed to some unrelated place at best…
@rtheunissen also… what's there at register_sequence.c:70? (Can you show the code?)
 
@bwoebi I've added you as a collaborator so you can browse at will. Be sure to unwatch if you don't want to get spammed by notifications.
 
posted on October 07, 2015 by aliceljdc

/* by Quidam */

 
Figured that's nicer than me pasting small snippets out of context.
 
6:39 AM
@rtheunissen Uhm… Isn't syntax for string concat in defines "str" ## concat instead of "str##concat", which is literal here?
That'd explain buggy behavior if something is registered with the same name for a second time…
 
Honestly not sure, I made an assumption and it compiled. I'm very new to C still so not surprised at all.
 
The macros in common.h
 
Yup, so the ## syntax is wrong.
 
At least that's what sounds plausible as register_sequence is the second interface to be registered with the bogus name…
 
Does your syntax example imply that a ## b is the same as a + b?
Generally speaking, where + is just concat
 
6:41 AM
it's compile-time concatenation for defines, yeah
 
So instead of "Something##another" it should be "Something" ## another?
 
In C strings are generally concatenated at compile-time via juxtaposition… just for defines you need ## in between.
@rtheunissen yeah
 
By juxtaposition.. ie. "a" "b" "c" ~ "abc"?
 
yep
(Well, actually: you need the ## in defines because stringification as you pass str and not "str")
 
I have it down as "Value\\" #appendThis and it seems to be working.
 
6:46 AM
o/ Morning
 
I'll have a good read about them. Thanks for your help :)
 
42
A: C/C++ Macro string concatenation

Jim BalterYou don't need that sort of solution for string literals, since they are concatenated at the language level, and it wouldn't work anyway because "s""1" isn't a valid preprocessor token. However, for general token pasting, try this: /* * Concatenate preprocessor tokens A and B without expanding ...

 
How you doing?
 
7:06 AM
@bwoebi bit of a puzzle ...
 
@JoeWatkins hmm?
 
I need to use zend_try, but this interferes with catch() in userland and uncaught ex handler, so I set a hook to be called (in ZEND_THROW) to invoke uncaught handler, but, now I'm in the position that I need to detect in the handler if there is a catch block for the current exception ...
so it feels like I'm doing something wrong ... but I kinda need to do it wrong ... I think ...
any ideas ?
I gotta take kids to school, so you have a while to think about it ...
 
how is zend_try {} related to catch in userland?
 
it seems to interfere
 
it shouldn't…
 
7:08 AM
I'm not sure to be honest, I'm sure this wasn't a problem before ...
php_pthreads.c sets a hook, if you remove the hook it works as expected, but, the uncaught handler is never invoked ... unless I remove zend_try from the code that calls the run function ...
I can be wrong, maybe something more sensible is going on ... gotta go, back in half hour or so ... any ideas appreciated ;)
 
@JoeWatkins that's the wrong hook… this hook is always invoked when an exception is thrown at all (in zend_exception_internal)
 
When starting with Zend: Zend Framework 2.4.8 Full is that one OK?
 
@JoeWatkins github.com/krakjoe/pthreads/blob/seven/src/object.c#L445 after this zend_call_function should be the correct place to check for EG(exception) and conditionally invoke the exception handler.
but definitely you shouldn't invoke usercode with environment backupping at the exception hook.
 
7:26 AM
@Gordon, are you over there?
 
@Martin. I am over here
 
Great, I've got a question for you as a moderator, but I don't want to chat about it here, could we move somewhere else?
 
mornin
 
7:55 AM
Morning
 
8:13 AM
Something interesting : youtube.com/watch?v=kPRA0W1kECg
 
hi guys, slightly off topic question about load balancers. I figured alot of PHP folk are decent server folk so thought i'd ask. I'm still trying to figure out my drop off and whilst checking the load balancer status i noticed that it was recieving ~ 250 connections per second. BUT the two web boxes behind it only show 24 (combined) per second. Does this mean that i'm "losing" 90% of the connections as they're not being passed to the web boxes?
that's the assumption i have, but i could be confused by how it all works.
 
Abe
@PaulCrovella :D:D
 
8:28 AM
@Andy and your lb doesn't cache or handle static content?
 
Abe
@Sjon sorry if you haven't received news from me. i'm super busy with work lately
and i've been off for a week too, got a catastrophic flu -__-
 
@sjon nope, or at least my understanding is that it doesnt. I'm using softlayer and they dont allow me to SSH in and deal with anything so i dont think so.
@abe was that man flu?
that stuff takes down whole cities
 
Abe
not used to the term "man flu" :P what is that?
 
Man Flu is a crippling and debilitating disorder indiscriminately striking down male members of the human species without warning. The illness is often referred to pejoratively by female members of the species who are in fact immune from the illness as man flu is now known to exclusively attack the XY chromosome carrier. If Man Flu is kind enough not to kill the infected party it will definitely leave him weak, sick, hurting everywhere and in dire need of TLC.
 
Abe
lol
symptoms are accurate though :D
 
8:36 AM
posted on October 07, 2015 by aliceljdc

/* by Kashmir */

 
@Abe no worries; still excited to see what you come up with!
 
@sjon and everyone else, i asked Softlayer about the "issue" i'm having re: LB seeing 250 Con/s vs Web boxes of 24 (combined) Cons/s they said their load balancers "multiplex" connections. I'm trying to figure out what that means, any ideas?
 
Guys a wordpress site with woocommerce plugin attached but i couldnt find its form for customization where to find it.the files are in hook...pls help
 
8:55 AM
mogguh
 
good morning
 
@Andy the lb is used to keep connections open and send multiple requests over that connection (keepalive)
 
@bwoebi ah, so the hook is wrong ...
 
mrngn
 
when uncaught ex is thrown zend_call_function doesn't return, control returns to zend_catch block but exception already gone by then ...
 
9:16 AM
@Andy Multiplexing? Basically you have a load of inputs one side, and you compress + push them together over '1 wire' in sequence and send them at the same time, and then they are 'demultiplexed' on the other side
 
@jimbo thanks, so it keeps connections opens (That's what i've read)
 
No, that'll be some other technology
 
so the connections on the LB will always be to an order of X more than the web boxes?
ah right
@Jimbo can we private quickly, i'd like to send you some images maybe you can make more sense of them?
 
@Andy I'd rather not go private, also busy, but thought I'd answer and try and help a bit - people in this room will help if they can and have time though
 
@jimbo fair enough
so this is thes screenie of the LB connections
the other two are from my web boxes.
the connections within the LB are a large number but quite low on the web boxes, my concern is that i'm losing alot of connections and cant figure out if i am or not. With Softlayer using Multiplexing i dont know if these graphs are useful anyway
 
9:23 AM
@Andy is this an XY problem?
 
.... XY problem ... ???
 
Why are you looking into #conn/s? Is anything broken?
 
long and short, i have a platofrm that sends traffic to this cluster, yesterday 40,000 or so visits. But according to the Application on the stack loses about 20% of visits consitently each day. i want to remove or reduce this
 
so you Application says "I've lost 20% of the visits"?
 
pretty much, internal counters and the like say each day we lose between 17-25% of the visits.
as it's an ad platform, i'd prefer this to be more like 5% if anything
 
9:26 AM
@JoeWatkins ehm… uncaught exceptions don't cause a zend_bailout() ??
 
I have no idea what is going on and why ...
 
so i'm looking to see if it's a hardware issue, do i need to throw money at it with new and better boxes, or is this drop off "ok"
 
I wouldn't use a LB that loses more then 0.0000%
 
left is what i sent, right is what is counted.
last 5 days
 
@JoeWatkins or do you get an exception thrown without stack frame when removing the handler?
 
9:29 AM
my thinking is that i might need an additional server? But New Relic on the current 2 isnt complaining about anything. (CPU and RAM within ok values)
plus, it's "only" 40,000 or so per day, not that much i reckon
that being said, what setup would you have for this "much/little" traffic?
 
@Andy where do the numbers come from
 
i have 1 LB -> 2 WB -> DBM and DBS
software
 
I see what's going on ..
 
that's a useless answer
 
i.e. counters in the app. As my platform sends a visit it counts, as we recieve the visit in the app we count
 
9:32 AM
what's a "visit"? do you mean an http request?
 
no, because then i'd be counting CSS loads and the like right?
 
@Andy I can handle those numbers with a single machine with 1 Gb of memory
 
so what's a "visit"?
 
a visit is when a user arrives on a landing page, that counts 1. Each subsequent PV or refresh does not increment. So it's UU counter pretty much
 
lol, I've even got a wordpress machine that handles 600k hits/day with a single machine
 
9:34 AM
Yowza, so .... might be software my end?
 
so how would this work; your 'platform' redirects a user to your cluster; where you then 'lose' the visit
 
figured it out ...
 
aka; you http-forward them but they don't arrive?
 
@sjon yes that's what i'm seeing.
my platform is an ad platofrm, users get sent there, then redircted to landing pages.
 
Morning; i'd like to block some values from a query to find linked records.
I will concentrate on name, firstname, street, city.
Example: Fiedler, Michael, Teststreet 7, Leertown.

And i want: FIE MIC TEST7 LE.

Any Idea how to do this? I know strpos but how do i say, if i have for example "Street of the 18th october" would be SOT18 ?
 
9:36 AM
why not compare ua & ip addresses for a pattern of which you seem to lose
 
i use JS forwarding and or meta refresh, but yes.
yeah .... i havent done that but it's on the list of steps to check
the first was to see if there are obvious hardware issues.
 
and why wouldn't this be adblocker related?
 
seems that there arent. now i'll have to software it up with the comparisons as you'd said
it could be!
that's also on the list to determine how many of our visitors are ad blocked.
but that could be low, the traffic we buy is from an ad network
at @sguetsch you can handle a string as an arrayin php i think, so $address = "12 honeycombe lane"; echo $address[3]; would echo "h"
so if you want the first letter per word you could split then do a loop of sorts. Probably a better more efficient way. assuming i understood correctly?
for 3, you'll need substr() and add that in the loop vs $var[X]
 
@Andy i want the first 3 letters, yes. my problem is to add the numbers after a street, cause in germany "12 honeycombe lane" would be "honeycombe lane 12 ". and i found no way to make it to honla12, only to hon
 
preg_match maybe?
regex of sorts?
 
9:42 AM
@Andy hm, could be possible
 
well if numbers and letters work differently then i think a regex or something would work for you
that being said if it's just to get a uniq, why not use something like Base64 encoding or md5
 
@Andy okay, i take look on that.
@Andy because our atabase is completely fucked up and redundant and there no unique but many similar entries
 
@sguetsch can you add another table to normalise it
 
Hi cutiepies , does anybody knows angular + php?
 
9:57 AM
@Andy Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.
 
10:08 AM
when do you guys use caching for (data queries) ?
 
when needed
 
feeling dumb :/ i my client is telling to use memcached for website have no traffic
 
I'm guessing there's nothing in the spec saying the end result has to be able to perform at a specific level, like serve n requests per second
(just because there's no traffic now doesn't mean there's not some huge marketing campaign that's about to happen to drive it through the roof)
 
10:23 AM
morning
 
@Sjon ... true, but then i love em :D
 
10:38 AM
HEllo
all
I have integrate facebook in my website
and i have one page in facebook
if user has login in one tab in facebook
and from my website if he open that page
the page should be open
can any one telll how to do taht
@Andy
@Manulaiko
 
looks some one figured out enter key
 
what
 
Abe
@Lakhan don't ping people randomly
 
newline is the new punctuation, don't cha know
 
@Abe
ok sorry bro
any idea about my issue
 
Abe
10:44 AM
no
idea
sorry
 
L
O
L
 
Is
this
the
new
fad?
 
Abe
:D
 
> if he open that page the page should be open
 
i mean he is able to like that page
@PaulCrovella pardon my english
 
10:45 AM
why not just try facebook php-sdk?
 
i need just simple way that..user can like my page which i mentioned in my website
 
I've no problem with your english other than I don't know what you're saying.
2
 
@PaulCrovella No hable english?
 
@Lakhan ffs rtfm
 
i want that user can click on fb link of my website
and then in next tab facebook should open
 
and user can like my page
 
@Epodax si
 
@Lakhan is there any other requirement your highness!!
 
nope
:D
 
then rtfm again
 
10:49 AM
@Lakhan Make him get me a coke :D
 
can i have suggestion
 
all I wanted was a pepsi
 
please
i will buy pepsi for you
 
Pepsi isn't coke.
 
thank goodness for that
 
10:50 AM
Although some restaurants / bars seem to think that it is.
 
help me if any one have idea
 
i used to have idea network for my mobile, is that count?
 
i have aircel
 
nice then get idea
 
no need
keep it with you
 
10:52 AM
than why are you asking for idea ROFL
 
i am talking about suggestion
 
rtfm is a suggestion
 
now i think i can troll back of level 9 trolls :D
 
its not php group its just debat group
 
@lakgam rtfm = read the fracking manual. In essence, it's there you should be able to do it using the help section within FB Developers or what not
 
10:55 AM
@Lakhan This is a php group, hence the room is called "php"
 
@Lakhan you dont just come and ask dumb question which shows no research efforts
 
at the last company I worked for I made an internal doc site called rtfm. It wasn't till months later when it was already fully established that I told my boss what rtfm meant
 
:)
 
@PaulCrovella :D
 
I was frankly a little surprised I was able to get the subdomain from our sysadmins without a fuss.
 
10:57 AM
@PaulCrovella and then you were fired?
 
and to add to what @NullPoiиteя says, these chat rooms arent for you to come in and dump your questions without any thought, if you do you'l not really get help.
sysadmins probably were all over it too
@Epodax i hope he didnt
be a shit company/boss if so
internal docs and that
 
@Epodax nah, my boss just kinda shook his head
 
@PaulCrovella Sometimes you get lucky ^^
 
how can I see sometext in this?
class test{
    public $var;
    function __construct() {
        $this->$var = 'sometext';
    }
}
 
Define See?
 
11:01 AM
echo
 
@Sajad echo inside the class or outside the class?
 
outside
I want to echo sometext in the HTML page
 
doesn't look valid
 
you need to first create instance the class (like $obj = new test();) and than just echo $obj->var;
 
it's $var, not var
 
11:02 AM
@NullPoiиteя thanks :-)
 
@Sajad and as @Farkie telling its $this->var not $this->$var
 
Nikita remains as elusive as ever with no picture on his webcam from the podcast last night :P Granted we have 1 pic so far.
Good lawd that's a deep voice though. heh. Awesome.
 
We should just crowdfund a webcam for Nikita
 
@NullPoiиteя it'll bomb out as undefined var on object creation surely
 
@Fabor do we have picture of @PeeHaa?
 
11:05 AM
that is his picture, or rather one of the many forms he takes so as to not destroy the minds of mortals
 
Some from conferences in the past. He participated in the room 11 hangout too.
 
@PeeHaa did you go to PHPNW?
 
He didn't despite a free ticket
 
@NullPoiиteя so $this->var or $this->$var ? (however I think the first one is correct ...)
 
first one
 
11:07 AM
ok
 
@Sajad code.tutsplus.com/tutorials/… try that its small article so wont take much time to get idea about php oop working
 
oh good, tnx
 
Abe
isn't @PeeHaa a subsystem of skynet residing in a cluster of supercomputers in an underwater bunker in the north atlantic
4
 
@NullPoiиteя it not your group and i dont need to ask you to join this group
if knows about answer then say either do your code
 
@Abe No, that's nikita. They keep PeeHaa in the broom closet.
 
11:12 AM
heheh... but thats looks like peehaa not nikita
 
Abe
but nikita's been proven to be a human
 
that's just what they want you to think
 
Abe
ahah was expecting that
phpilluminati!
 
Morning
 
Can we changed the constructor value in a method
 
11:20 AM
yes, anything in constructor is just defaults
which get set on object creation
 
   function __construct(PDO $connection, $getDatabase)
    {
        $this->db = $connection;
        $this->useDatabase($this->getBranchDatabase($getDatabase));
    }
i want to set this $getDatabase value within a method
 
that's fine
 
not in the object creation
 
depends on the logic inside useDatabase method, but yes, it is fine to do
 
$helper   = new getConnection($dbh, empty($_GET['branch']) ? 'All' : $_GET['branch']);
this is the object
it's a connection
 
11:22 AM
I'd move your ternary the line above for readability, but sure
 
Hello. Anyone knows an impementation example in php of the Sorted Neighborhood method?
 
@Farkie do you know how ?
 
is useDatabase public?
 
    public function useDatabase($db)
   {
       $this->db->exec("USE ".$db);

   }
yes of course
 
$helper->useDatabase('something_else');
 
11:29 AM
yeah
Thanks
It's fine
working
 
Plug for those who missed it. Podcast: Checking in with PHP & HHVM internals with our very own @bwoebi and @NikiC
 
Why not using medoo?
 
Hi All
I need urgent help
 
ask
 
I need to do sqlite with php .. I have installed php5-sqlite on my machine and checked phpinfo() also
but when I run pdo::getavailabledrivers
it show that sqlite driver is not installed
where should I check now ?
sqlite3

SQLite3 support enabled
SQLite3 module version 0.7-dev
SQLite Library 3.8.11.1

Directive Local Value Master Value
sqlite3.extension_dir no value no value
 
11:42 AM
what did you tried?
 
apt-get install php5-sqlite
restart apache
 
what said google to do?
 
look for a php5-pdo-sqlite package, or something of the sort
 
@PaulCrovella no such package
 
11:44 AM
@Manulaiko I have already done what google said
 
I'm not sure google said just to install that
when I ask google for something it gives me +3 answers that actually works
 
6
Q: How to install the SQLite PDO extension on Ubuntu

wowpatrickThe default Ubuntu PHP package does not include the PDO SQLite extension. How can I install the SQLite PDO extension? Is there a package that one can easily install via apt-get?

7
Q: Setting Up SQLite3 PDO Drivers in PHP

wayneLNI'm working my way 'slowly' through the php101 tutorials and have got to number 9, where I need SQLite. I've got SQLite3 running and can access via the CLI, (see screenshot of a little test DB) but when I try the tutorial scripts in php101, I get a blank browser screen. I now know this is becaus...

all says same
 
is there a way to push to an array and return that array in the same function?
 
$array[] = ""
@alwaysLearn is the sqlite version you insalled compatible with your php version?
 
11:48 AM
so do_something_with($array[] = "new element"); will be sent $array with "new element"?
 
yep
 
@Manulaiko how can I check that ?
 
@AaronHarding no, the argument to the function will just be "new element" if you do that
 
Hi i have an array with a lot of sub arrays with name, firsname, zip, city, etc. pp.
To compare them, i worte a code to "block" them in order to make comparing easier.

Code:
foreach ($rows as $row => $values){
foreach ($values as $string){
$val = substr( $string, 0, 3);
print_r($val);
}
}
It returns;
2SinJöPraLeiDeu3PapDirSpoLeiDeu but I want an array with
[0] =>2SinJöPraLeiDeu [1] =>3PapDirSpoLeiDeu ...

Any ideas?
 
@NullPoiиteя I think I have one somewhere in either /js or /css
@Farkie I totally wanted but I hard work to do sadly :( And my pc crashed at the same time
@Abe s/cluster/clusterfuck
 
Abe
11:57 AM
:P
 
@samayo I've been wanting to have a "Room 11" episode for a while now. :) I'll have to get it on schedule for a Friday night soon. But it might be Friday night US time. cc @NikiC
 
@Manulaiko I have installed both by apt-get
 
Anonymous
@SammyK That would be great, thanks. I will look forward to it.
 
@PeeHaa Of course your picture would be in the wrong place.
 
I see @PeeHaa watched the podcast live last night. Just came to the part where you're mentioned
 

« first day (1817 days earlier)      last day (3117 days later) »