« first day (1677 days earlier)      last day (3496 days later) » 

14:00
posted on May 20, 2015 by kbironneau

/* by Ruan M */

@TechWisdom: to be clear, my workhorse db is oracle (sigh) because that's what the codebase I work on has been based on since the 90's. but we've done a bunch of experiments with other databases. I haven't used VoltDB, so I can't speak to the quality of it, but I believe in the concept, and so do microsoft and oracle because they both have added in-memory column-oriented engines to their products (sql server hekaton engine, and oracle 12c in-memory engine)
column-oriented?
the data is laid out in columns instead of rows in memory, allows faster aggregation
that's what enables vertica and hana to do live analytics queries that used to have to run in batch jobs at night
everything is done in-memory
14:02
that's really interesting @JoeriSebrechts
in-memory tables have existed for a long time though
@JoeriSebrechts what would you chose if you were to choose a new db?
true, but most traditional RDBMS's still use a block-based engine. You end up having to latch onto blocks, even when everything is in memory. The new engines are redesigned so they only run in-memory.
ARG
So I built a travis VM last night, it took like 2 hours. I went home while it did it. Turns out it failed, because mysql wouldn't start. On a box that won't even use mysql. And the program deleted the vm
@TechWisdom: ha, depends on the use case. I would default to postgres most likely because of the maturity, and add other databases into the mix where needed.
14:06
@JoeriSebrechts, why do you not thing NoSQL solution are a great decision, and a mix of which do you mean? VoltDB? Redis maybe?
think*
@SergeyTelshevsky the PSU list is done
by the way, I did lots of PLSQL, and sometimes wish to its simplicity
user895378
@ircmaxell lol :(
@ircmaxell if you manage to build a travis vm locally please make a blogpost about it
having an error reproducible only on travis sucks big time
@Tyrael I'm following this: github.com/travis-ci/travis-cookbooks
@Tyrael that's precisely the situation I'm in right now
14:11
@TechWisdom: i want the strictness of a schema, which excludes many nosql solutions. I'm also very comfortable with SQL as the API, so there's that, but that's just personal taste, so doesn't mean much.
@ircmaxell I think I tried that once and had some problem then solved the initial issue so I never went back to build locally
@JoeriSebrechts, I see. but why one would prefer strictness of a scheme? sounds like the only way is lack of trust in the programmers (if you are the DBA)
but would be nice knowing if it is possible
@Tyrael I bet that's what happens this time ;-)
I love not being trapped to a scheme, and ALTER statements
14:14
@TechWisdom fed?
@TechWisdom: I am a programmer, and I don't even trust myself, let alone my fellow programmers. People write bugs, roughly one line out of 40 in new code is buggy, this is a fact of life. The architectural choices we make should be based on the assumption of human fallibility. Having a schema is like having a unit test for your data.
@ircmaxell I just pushed commits into a branch and debugged it online…^^
and sometimes the scheme definition is being changed
@PeeHaa - front end
@bwoebi that's what I'm doing right now, but I can't stand that
especially since travis sometimes takes 10-15 minutes to run a job
I tried doing a travis VM too...
14:15
@ircmaxell Yeah, depends on time. Try it in late evening…
turns out there is a lot of stuff in them
@JoeriSebrechts - pungent words, +1
@TechWisdom, to be clear though I'm not saying you shouldn't use mongodb. I'm saying that (a) you probably don't need it for scaling, (b) you will need to be strict about your data eventually and will have to do it in unit tests instead of a defined schema, and (c) you will need to be aware of the tricky aspects of eventual consistency in all aspects of the codebase. Go into this with your eyes open, that's all I would say.
by the way I noticed the video link is back up
@JoeriSebrechts, thanks a lot Joeri. You mentioned smart things to notice while choosing an architecture and while developing in general.
That's great, I am taking a look
haha, they only sound smart because they were born out of years of foolish decisions. I am still a PHP programmer after all ;)
14:21
@tereško yeah, I used access actually, there is a really good integration
hahaha, they say this is the only way to become experienced
i have a three year old, i have noticed that the only way to make him learn that he shouldn't stand on things is to let him fall off those things. It's the same with programming. Bug reports are the best lessons.
@bwoebi did I say 10-15? currently at 15, and still not running...
@ircmaxell that's normal for at this time ^^
14:26
"normal" and idiotic
people in US begin their day and people in Europe still haven't ended…
I have a ferret, and the only way I thought to stop his enterance to my room is with slpashing water, but it didn't helped ;)
@JoeriSebrechts, great video, now I don't regret leaving RDBMS :)
Sometimes twitter is the greatest. http://t.co/1tKxRSSnQu
6
I am very tempted
@Gordon yeah, that's a good one
14:42
@FlorianMargaine JS has eval too ;-)
@Jimbo yeah, but not eval($_POST['foo']);
@FlorianMargaine I wasn't aware JS had $_POST :D
@Jimbo it doesn't. My sentence is even more true!
lol
that said, $_POST is a valid variable name
14:45
eval($_POST['foo']) is a valid JS expression
@ircmaxell what would it output? bool?
@cleong $_POST = {foo: "$_POST['foo']"}; eval($_POST['foo']);
@JoeriSebrechts u first
15:01
@FlorianMargaine the interesting bit is that some of those project are actually live .. in case you need an untraceable server where to park some illegal goods
@tereško I didn't look that far, I'm not very interested
some corners of my mind are darker than others =P
@tereško Darker than the corner with PHP in it? I doubt it :P
In PHP's defense, you can find the same eval() craziness in other languages like Python. Problem is so many people who have no clue what they're doing start with PHP.
Low barrier to entry.
It's also an unwillingness to learn. Low barrier to entry = more people. More people = less people that want to learn as an average. As a result, there are more people that don't put the effort in, want to be lazy, don't care about best practice, then go into Wordpress or Laravel and leave it at that without trying to learn more. They corner themselves in a given framework.
user895378
15:34
I forget -- did __debugInfo() become a thing in 5.6 or 7?
user895378
answer: 5.6
I never actually found a use-case for that one
user895378
I have it all the time ... if you have an object whose var_dump output is super nested it makes dumping it completely useless. __debugInfo() lets you streamline that output to get only what you need from it
I always found it getting in my way
Initially, I tried to use it to get some of my magic stuff exposed with description and stuff, but it just adds more confusion in the end
user895378
> but it just adds more confusion in the end
user895378
15:39
^ As a blanket statement I can say this is wrong. It's a case-by-case basis, of course. It's useful in some places and not others.
hi guys
quick question (caused by my laziness): does scandir() works on symlinks?
@fusillicode why shouldn't it?
@nikita2206 cause it doesn't seem to work :P
@fusillicode Windows or Linux?
@Machavity linux :)
15:47
@NikiC It's not bigger if it's the same mess… 1 > 1 is false…
I'm passing in a relative path to a symlink
Check the permissions for the PHP/Apache user and make sure it can access that directory
@Machavity you know what, this is for sure something I need to check XD
ty buddy @Machavity
:)
@TechWisdom sometimes I have to but I don't like it and I suck at it
@LeviMorrison Sorry if I wasn't clear. I meant to say that it was a bigger mess (and would still be) than any mess we may have now
16:01
Hi all, had a question relating to Facebook's PHP SDK v4
I want to get all posts for a user. FB paginates the responses, so I've been trying to follow them and get all the data, but it keeps timing out
I've tried increasing the timeouts for both PHP and Nginx to no avail, is this a case of not seeing the forest for the trees?
posted on May 20, 2015 by kbironneau

/* by Fotbollsgräs */

Yes indeed I am
I've tried restarting both nginx and php-fpm
Did you set the timeout also in fpm by any chance?
16:10
I did indeed
What did you set exactly?
In nginx.conf, under location ~ \.php$, I set fastcgi_read_timeout 300;
And in php.ini, max_execution_time = 360
And in fpm?
I didn't change anything for fpm, was I supposed to?
4 mins ago, by PeeHaa
Did you set the timeout also in fpm by any chance?
4 mins ago, by Hassan Khan
I did indeed
:P
16:14
;request_terminate_timeout = 0
It's commented out
Sorry, I thought you meant nginx
If the timeout is still commented in the fpm config it should just work
I was under the impression if it's commented out in the fpm config, you only need to change it in php.ini
I was hoping there might be an easier way of getting the data back from Facebook to be honest :)
@HassanKhan yeah sounds about right
Where to ask me to help me and anyone with Google cloud ?
Do you by any chance know of a better way of pulling more than 25 records at a time from the Graph API? :D
16:18
@HassanKhan rabbitMQ
@HassanKhan There is a reason facebook doesn't make it more easy you know ;)
I know ... it really sucks balls though
How would I use RabbitMQ anyway? Right now I've just got a simple setup on AWS
PHP 5.5, MySQL running on nginx
Thanks for all your help btw guys
Short horror to movie - perfect for just before bedtime.
well, that was fun
I hit a bug in php
try {
    // something that throws an exception
} catch (\Exception $e) {
    var_dump($e);
    throw $e;
}
^^ hit 64gb of ram before I managed to get it killed...
@ircmaxell What version?
16:29
hi! if i have an object with an array of IDs and I want to extract all of the IDs from the object and put them into a new array, what would be the best function to use? Is looping through the object with a foreach the only way?
@Trowski Ubuntu's 5.5
@JacobRaccuia Just return the array from a method on the object.
then I still need to loop through that array and extract the IDs
@JacobRaccuia do you mean the keys of the array? (as opposed to the values).
Or just getting $someObject->id ?
$Object->Posts[0]['id']
16:33
@JacobRaccuia Something like:
function getObjectId($object)
{
	return $object->Posts[0]['id'];
}

$idList = array_map($input, 'getObjectId');
@JacobRaccuia array_column in PHP 5.5
cool that is pretty much exactly what I wanted, thank you - and @TobiasGies ill check that out.
...arrray_column does something quite different...
@Danack y u no closure
MGE
MGE
hello Im inside an echo 'text';
16:35
@NikiC we don't have a readable syntax yet.....I would for my own code but not to scare people asking for help.
MGE
MGE
and I want to print /' string
@Danack well it's no uglier than that code
it looks like it does the same thing as what I need - @Danack the only problem with the function in array map is obviously its only getting the first post[0]
it's just not as beautiful yet as it could be ^^
@JacobRaccuia Obviously?
MGE
MGE
16:36
the problem is when I use echo 'text\''; it returns text' but I want text\'
Why not try running it....
@Danack i will!
@Danack uhm... not as far as I can see. array_column($object->Posts, 'id') should return the list of IDs he needs, no?
@Danack Well this isn't for payment processing. We already use Stripe for that. This is more for PayPal username/passwords. I prefer not to store it as an encrypted field in our main database. Was hoping for something a bit more robust that is built for these types of things.
MGE
MGE
16:37
I need to use preg_match?
@TobiasGies No, that wouldn't operate on the array of objects. It would just operate on one.
array_map applies the function to all of the array passed in.
@Danack Oh, I didn't see that @JacobRaccuia had to loop over an array of objects, I thought it just was the one $object->Posts array.
@AlexMarkov why in the WORLD would you ever want to store paypal username/password pairs? O_O
might as well save their complete credit card number at that point.
@TobiasGies you want to do something evil...
@ircmaxell What sort of object were you catching, because that code isn't causing issues for me in any PHP version.
a PHPUnit_Framework_Exception thingy
16:51
Circular reference in any of the objects you're working with?
no clue
not really interested in debugging it right now, more want to get this farking test fixed
Morning.
github.com/google/google-api-php-client/blob/… <-- that's the test that's failing on travis's 5.3
github.com/google/google-api-php-client/blob/… <-- that's the line that should throw the exception
except the exceptions not being thrown
and the error comes from line 100
@ircmaxell Understandable. I ran into a similar issue with PHPUnit doing a var_dump() and it was because of a circular reference, so just FYI.
user895378
17:09
var_dump() has no recursion protection right?
user895378
^ __debugInfo() can circumvent this, yeah (5.6+ only)?
@rdlowrey I think it does
@rdlowrey 5.6 only. Has recursion protection in 7
user895378
@NikiC oh cool, I didn't realized 7 added that
checking for GNU MP support... yes
configure: error: Unable to locate gmp.h
WTF
17:14
@rdlowrey side effect of some gc changes really
@rdlowrey Wouldn't var_dump($a = (object) ['a' => &$a]); blow up then?
Cause it doesn't. Unless you're talking something else. Which you probably are.
@ircmaxell Shouldn't this line be array($resource => array(...)) github.com/google/google-api-php-client/blob/…
$ ./buildconf --force
Forcing buildconf
buildconf: checking installation...
buildconf: You need autoconf 2.59 or lower to build this version of PHP.
           You are currently trying to use 2.69
           Most distros have separate autoconf 2.13 or 2.59 packages.
           On Debian/Ubuntu both autoconf2.13 and autoconf2.59 packages exist.
           Install autoconf2.13 and set the PHP_AUTOCONF env var to
           autoconf2.13 and try again.
make: *** [buildmk.stamp] Error 1
@Trowski no, what's passed in is an array usually
@ircmaxell Right, but then in the case where you pass a string, like the failing test, it seems to set up the array structure different than the other tests.
user895378
@DanLugg i dunno about the inner workings ... it has to do with circular object references
17:22
@Trowski yeah, but the point is it should never get to the point that it matters
@PeeHaa is feedr.pieterhordijk.com on a box that is being reformatted?
@ircmaxell Yeah, right, cause $this->methods["someothermethod"] still shouldn't be set... hmm...
precisely
bingo, I can finally reproduce
OHHHHHHH
FARKING PHP 5.3!!! WTF
isset($string["bar"])` returns true in 5.3, because it casts "bar" to 0
F U PHP
Yeah, was just thinking that.
The weird thing, is why didn't php 5.3.3 behave that way?
17:31
Is there a plugin or something that will take an uploaded PDF and convert it into an image?
Maybe it was considered a bug and fixed... That's a good question.
@ircmaxell because it's not 5.3.3, it's a distro "5.3.3" with backported fixes
(he says, without knowing the context)
17:50
how can get the url of custom page in cms page of megento
is_traversable(): returns true for an array, Traversable, or any other iterable value -- anything like that coming to php7 or even 5.x?
I was initially frustrated that is_array didn't cover it, but considering the arc of strict typing, that makes sense
@ChrisBaker but an array isn't traversable. Its not an object. It is foreachable. Or iterable. But not traversable
Which, if we get @LeviMorrison's union types, we can do blah(array|Traversable $b)
Fair enough, though that RFC I linked makes the same semantic mistake. What it describes as is_traversable is more properly is_iterable()
Typedef Foreachable{ array|Traversable };
hi everyone..
18:00
what a bad idea checking resolution of bugs ive reported after waking up. just ruined my day, which just started btw. say "not a bug" again, i dare you i double dare you
@ircmaxell Wow, that's an interesting RFC! Would be very useful!
Is there a good read on how an authentication system be implemented for a website, which has an api and then use can login from various apps.. presently for the login, for each app (agular android and ios) there is a preset token in the database ... which is checked for in the header for each request .. but what about the login part? how can I logout from one device and yet stay logged in another
@ircmaxell I'd much prefer that, named not anonymous
typedef Foreachable { array | Traversable }; I very much look forward to this being a thing.
Though to be consistent, it would have to be is_foreachable :p
lolwut?
18:04
I wonder if we should allow $a instanceof Foreachable, Foreachable being an union then…?
Oh, nm, that was intended as like a hack type alias
Oh, that brings up a neat question. If I typedef MyArray { array }; how would this expression evaluate? [] instanceof MyArray
typedef ⟲ { InfiniteIterator }
@bwoebi Yea, that's what I was just thinking... lol, typed mine and hadn't read your message.
@salathe :-D
18:05
Hi there, can I change owner/group in a shared hosting?
I've been googling for hours and couldn't do
@bwoebi that, or we create a new operator/function for it...
@ircmaxell $string instanceof string … not sure if I should like it or not.
@Worf laruence by any chance?
nope, not php this time :D
If I've replaced zend_execute_ex with a new function (which calls the old zend_execute_ex internally), is there a way of getting the numbers of opcodes that will be run or have been run?
18:17
no
@Danack nah, just copy execute_ex and integrate your logic there… if you just wrap it, no chance.
@Worf example?
@ircmaxell not php :) chrome stuff
@Danack Yeah sorry about that. :( Give me an hour or so and it will be up again (hopefully). Current status is 149.210.224.55
ah :-)
well, it may be not a bug :-P
18:21
@PeeHaa np.
and no rush.
It's kinda funny that my new vps has better specs than the laptop I am currently on :P
@PeeHaa should get an upgrade
@cleong Not hard to see that if he's using a Chromebook :P
@bwoebi Presumably that function doesn't get changed that often then?
@Machavity Old dell laptop with broken connectors between the thing itself and the screen meaning when I look at it the wrong way it throws up rainbows on my screen
18:34
@PeeHaa Ah. My wife's did that a few years ago. Found the part on Ebay for like $13 and was able to replace it. Still have it (runs Mint now)
Even $13 is not really worth it though for me. :)
> "Primary script unknown" while reading response header from upstream
@PeeHaa how can get the url of custom page in cms page of megento
Damn I am pretty sure I had this problem before. If only I can remember what the fix was ±>
@santosh Look at the addressbar of your browser
@Danack has there been any changes in nginx config lately that you know of?
How is this "pattern" best described? Regarding B proxying to A when it cannot fulfill the request. 3v4l.org/DA1C6
@PeeHaa Not breaking ones, there's been a few little features added I guess.
18:37
I wanna say just "proxy" or "wrapper", but I feel there's a more semantic description
@Danack Tnx. Must be doing something stupid in that case
@Danack no.
it's the root function of the VM running
@DanLugg fallback? chain of responsibility? optional?
> Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.
aaah cock. tnx @Charles for warning me about selinux :-)
@PeeHaa y u hardcoded urls in opcachegui <link rel="stylesheet" href="/abspath"> :P
18:50
@PeeHaa You're welcome / I'm sorry.
@Worf Why not? Does it get in the way?
trying to prepare a pr for supporting this but i know you will reject it
@PeeHaa ive installed it into localhost/tools/opcache but links are absolute so it tries to load localhost/thecss.css
@Worf You can switch to querystrings to solve that ;)
how?
18:53
anyway the change i was creating would have supported rewrite in subfolders as well
Feel free to PR it anyway :)
If it sucks I will tell you if it works for me I will merge
ok maybe i will
I couldn't really come up with a nice way to do it, so I abandoned the idea at the time
wtf Notice: Undefined variable: _SERVER in E:\.....\opcache\index.php on line 87
huh?
Are you trying to run it under asp? :)
19:00
nope, php7
Oh goodies. I have never tried to run it on 7. Thanks crash test dummy!
Hey guys i am trying to preform LDAP authentication in mantisbt and i am getting the following message in my log

2015-05-20 21:04 CEST ldap Attempting connection to LDAP URI 'ldap://192.168.4.2:389'.
2015-05-20 21:04 CEST ldap Connection accepted by LDAP server
2015-05-20 21:04 CEST ldap Setting LDAP protocol version to 3
2015-05-20 21:04 CEST ldap Attempting bind to ldap server with username and password
2015-05-20 21:04 CEST ldap Bind to ldap server successful
2015-05-20 21:04 CEST ldap Searching for (&(sAMAccountName=bob))
@Worf /cc @bwoebi
19:08
@Worf running as web SAPI?
yes, apache. but still not sure it's a php bug. i've randomly changed stuff in the php ini so i may have accidentally disabled $_SERVER (if it's possible doing that)
is it just me or reddit isnt really working today
?
@PeeHaa i'm getting that error in

Notice: Undefined variable: _SERVER in E:\...\opcache\index.php on line 87

Fatal error: Argument 3 passed to OpCacheGUI\Network\Request::__construct() must be of the type array, null given, called in E:\...\opcache\index.php on line 87 and defined in E:\...\opcache\src\OpCacheGUI\Network\Request.php on line 52
happens in the ?mainjs request
Looks like the SERVER superglobal isn't initialized for whatever reason
Which is strange because you can request the main page
do you have jit for superglobals active in php.ini?
19:16
yes
trying off
not getting the error now @bwoebi , but still i couldn't login @PeeHaa i've generated the password just doing echo password_hash("mypass", PASSWORD_DEFAULT); is that correct? not getting any error message, just getting redirected to the empty login form
That should work
I blame PHP7 if it doesn't :P
any debug tips?
hmmm let me think
Is the session correctly started?
And is _POST correctly populated?
@PeeHaa fails at:
if (!$this->whitelist->isAllowed($ip)) {
return false;
}
Ah. Did you add your ip to the whitelist / disable ip whitelisting?
By default only localhost is allowed access
Also IIRC I only support ipv4 for now. <-- hint hint nudge nudge
PR cough cough
picks nose
looks at @worf
If you want to disable whitelisting you can just wildcard all the things *
19:29
ahhh so thats it [REMOTE_ADDR] => ::1
anyway @bwoebi there's a problem with superglobals jit
Damn. Yeah I was afraid lack of ipv6 support would bite me in ass soon :(
yeah switching to ipv4 solved it :P
enabling superglobals jit again
Yeah that should really be fixed ASAP. Adding ipv6 localhost support is a 1 minute fix. But I also want to support ranges like ipv4
Should also not be a huge problem I think
nope with jit enabled it doesn't work @bwoebi actually, maybe helps, if i reload the page sometimes i get $_SERVER to work, but just occasionally
@Worf well, that's just weird^^
19:38
JNotIT
@PeeHaa y u no logout button
I forgot to lower the TTL of my domains #sadpanda
@Worf There is no logout button?
lol
I suck
y u need logout?
<3 no you don't
@Worf Yes, I /cc'ed @bwoebi, because we had that issue already in one of our projects.
19:42
@bwoebi well right now because i have the feeling that the jit thing is caused by sessions
@Worf I think you're wrong, at least we don't use sessions there.
@kelunik You know whether curl from the official centos 7 repo fixes the requestable issue by any chance?
@PeeHaa I don't know, but don't worry about it. Firefox 27, Chrome 22, IE 11, Opera 14, Safari 7, Android 4.4, Java 8 as oldest possible clients really deserves Modern as a name.
@bwoebi At the risk of asking a question I don't want to know the answer to; any idea what's the reason behind all the blank defined stuff in execute_ex ?
@PeeHaa just in case you want to have a look at the new amp-chat draft: dev.kelunik.com:8080/rooms/1
19:47
@kelunik you are right
@bwoebi didn't you create a bug report for that?
@kelunik <3 dropping files support
@kelunik no, because couldn't really reproduce
Looks fresh
@Danack blank defined stuff?
19:49
@bwoebi i.imgur.com/ql7lRIb.gif warning: big gif
@Danack It's generated
#define DCL_OPLINE
#define LOAD_OPLINE()
#define LOAD_REGS()
and other stuff - http://lxr.php.net/xref/PHP_5_6/Zend/zend_vm_execute.h#313
@PeeHaa Yeah, I plan to implement it using WebRTC. :)
@Danack some of the defines will only be used in goto/switch vms
and it never ever fails with JIT off
19:51
and are no-ops in the call vm
@kelunik Ah that is very cool
@Worf apache crashes? backtrace?
@NikiC ...I didn't know we had different vms
@Danack We can generate different mechanism for dispatching opcodes
@bwoebi tried to generate a backtrace once, ended up drinking an entire bottle of rhum
19:52
@Danack no, we only have one VM, but different kinds of specialization
@Worf hahahah
The default is the call vm, which - big surprise - does a function call for each instruction
The other ones use one big function with a switch / dynamic goto based dispatch
Ok you guys are scaring me a little - but if I want to write an extension that modifies the execution of a PHP script, so that it can call a function every n opcodes, copying and making a modified version of that function is a safe/sane thing to do?
@Danack It's neither safe nor sane, but as close to it as you can get ^^
It's the PHP way.
Hmm - I was hoping that I could add the number of op_codes that were run inside that function. It seems to always be '1' and there is never a jump to here even when multiple lines of code are being run.
Any pointers how to determine the number of op_codes run?

« first day (1677 days earlier)      last day (3496 days later) »