« first day (1857 days earlier)      last day (3095 days later) » 

12:00 PM
I am confused
 
Damn, wish coding was that simple!
$site = new PortfolioWebsite();
echo $site->render();
 
:P
 
@PeeHaa that's what I was doing some time around 2008
 
Abe
right click > refactor render() -> enter profit()
much better
 
@tereško I was dicking around in ZF in 2008 I think :P
Not sure what's worse :P
 
Abe
12:06 PM
i've noticed that the very first class that people starting with oop write is either new Core or new Engine
 
@Shafizadeh PeeHee is a lady?!
 
I think so ... Talk behind someone's back is supper-popular for women.
 
He is... I know so
 
12:21 PM
two abstract classes (B and C) extends another abstract class (A). B and C both implements function "isValid", B is for a specific item and C is for a collection of the same item. They don't use any logic (today) in common, except for declared inheritance. Should B and C both extend A or should C extend B that extends A?
A is in namespace Foo, B and C are both in namespace Bar.
 
Z
 
12:48 PM
anyone here built extension libraries for PHP with C++?
 
@ErikLandvall I think this can be useful for you.
 
@StephenWolfe hi
 
hello,
has anyone gone through google oauth v2 authorisation?
 
No but, anyone already used Sonarqube ?
 
12:52 PM
@user3628871 not personally but in a project I was in, yes.
 
@hakre Did you have the chance to configure it and had a problem with unit test coverage?
 
@Irfan What in specific?
 
@user3628871 it was used for code analysis, not for test coverage. so I don't know about that topic in specific.
 
@hakre Ok thank you :)
 
@PeeHaa, Actually I have created client id from api console but i couldn't find any client secret key, which is must for Oauth2
 
12:59 PM
I need to login to the console since they tend to change everything once a week
@Irfan go to console.developers.google.com/apis/credentials and click the download button
That downloads a json file will all credentials
Alternatively you can also click the app to view the key
 
but it doesn't has any secret key
 
WHat type of app did you create in the console?
 
I want to authorise for php rest api
for the same i have created a server key
as result i got an api key
 
2 mins ago, by PeeHaa
WHat type of app did you create in the console?
 
android app
 
1:08 PM
android apps don't work with private keys, because apps are not private I assume
 
so how can i authorise with php
 
1:35 PM
yeah, apps are easily reverse engineered
iTunes and GPlay are filled with apps that reverse engineer an app, tweak it so it doesn't look exactly the same, inject malware and put it back into play with a similar name and logo
 
@PeeHaa $servicesCredentials['google']['secret'] this is problem
we are unable to find secret
 
No it is not if you create a webapplication in google console
 
ok, Let me check.. Thanx
 
user895378
@bwoebi Because consistency, yes. IMO it's best to say "the first parameter to all watcher callbacks is the associated watcher ID"
 
user895378
1:48 PM
It costs nothing in terms of real overhead to do it.
 
@rdlowrey right, but what's the point of an invalid watcher id
 
user895378
It's not invalid
 
user895378
It's just a string
 
except that you have to check what type of callback you are
 
user895378
An application might use it as part of a map for something
 
user895378
1:49 PM
You don't have to check anything
 
user895378
it's just there in case you need it.
 
user895378
@bwoebi I know, it's terrible. But the powers that be insisted that the idiotic constant values not be changed to reflect ... you know ... reality.
 
user895378
It's the worst possible naming ever.
 
the powers?
afaik just a single bug report?
also the bug report really was about SSLv23
not tls
 
user895378
No, basically SSLv23 means "openssl's SSLv23 handshake method which can actually negotiate any available protocol"
 
user895378
1:51 PM
I wanted to make the constant mean, "only SSL2 or SSL3"
 
user895378
Your best and safest option is just to specify the exact protocols you want to support in a bitmask
 
right :-P you even didn't honor that in Aerys
 
user895378
STREAM_CRYPTO_METHOD_TLS_11_SERVER | STREAM_CRYPTO_METHOD_TLS_12_SERVER
 
causing us to force tls 1.0 by default ^^
 
user895378
^ or whatever the equivalents are (I forget the terrible long constant names)
 
1:54 PM
also, it's not even noted in docs what the constants really mean (especially TLS without version)
 
Hi I'm new to php and I'm using RedBean ORM :
Hi,

I'm new to RedBean, my application was working, but when I updated RedBean to the last version using Composer, I got this error,
Fatal error: Class 'RedBean_Facade' not found in my bootstrap.php file :

<?php
require_once __DIR__ . '/config.inc.php';
require_once __DIR__ . '/../vendor/autoload.php';

use RedBean_Facade as R;

if (empty(R::$currentDB)) {
$dsn = sprintf('%s:host=%s;dbname=%s', DB_TYPE, DB_HOST, DB_NAME);
R::setup($dsn, DB_USER, DB_PASSWORD);
}

R::close();

I don't understand if it's releated to the new version of RedBean or to my Composer autoloader which take into acco
 
RedBean_Feces
 
"My girlfriend's ferret is less than thrilled with his new festive hat": i.imgur.com/L2E5cVl.jpg
8
 
Hello community! I have a question for you guys if thats okay??
 
@PeeHaa Nah. he just needs to install the Rice dependency and spice things up
 
2:01 PM
@Shafizadeh no, I wasn't asking if it was technically possible ..
 
@Naou Jokes aside use RedBean_Facade as R; is a really horrible alias
 
@PeeHaa why, please?
 
@Naou, I believe it may be because there are many things that start with R, I think a better alias would be RBean or something of the like, whereas just keping it as ReadBean would be best IMO, it's the most descriptive :P
 
@Naou Isn't it RedBeanPHP\Feces RedBeanPHP\Facade?
 
2:06 PM
a facade is a static class?
 
@FlorianMargaine It is if your name is taylor otwell
dolphin casing
 
lol, TIL too
 
@Jimbo nsfw?
 
@PeeHaa Seriously? A ferret. In a festive hat.
What on earth is going on in your mind for that to be nsfw?
Ooohhhhhh
Dude.
 
:P
 
2:11 PM
:D
 
Also, what's not safe for your work? Who's going to complain?
 
lel
 
moin, btw :-P
 
@DaveRandom "girlfriend's ferret"
 
Mogguh chriscross
 
2:12 PM
@DaveRandom moin moin, you unblocked me then :P
 
I didn't block you... why would I?
I very rarely block people and those people usually can't spell
 
@DaveRandom Too many your mum jokes is one potential reason. Me and @DanLugg have been chatting a bit too much about cacti lately as well
 
Well well well.
@DaveRandom @PeeHaa Still hasn't watched Peep Show
 
oh btw they're making new season
I saw s09e01 is already out
 
Yeah.
 
2:14 PM
> Three holes opened up in the road outside the houses of parliament this morning, the PM commented "well well well"
 
Badum tsh
 
@nikita2206 last one ever, apparently
@Fabor GET HIM
 
hi guys any idea where that error come from, please
 
<3
 
Hi,

I'm new to RedBean, my application was working, but when I updated RedBean to the last version using Composer, I got this error,
Fatal error: Class 'RedBean_Facade' not found in my bootstrap.php file :

<?php
require_once __DIR__ . '/config.inc.php';
require_once __DIR__ . '/../vendor/autoload.php';

use RedBean_Facade as R;

if (empty(R::$currentDB)) {
$dsn = sprintf('%s:host=%s;dbname=%s', DB_TYPE, DB_HOST, DB_NAME);
R::setup($dsn, DB_USER, DB_PASSWORD);
}

R::close();

I don't understand if it's releated to the new version of RedBean or to my Composer autoloader which take into acco
 
2:18 PM
@Naou, do you have a line number for the error?
 
yes
use RedBean_Facade as R;
It seem like he can't find this class
 
It's not getting the file then, try an explicit require_once ''; that points direct to the class and see if that changes it
 
@SamSwift Yes I'm going to try it now
 
Also, the as keyword seems to throw up a syntax error in my IDE, perhaps this is the ish :)
 
wow, RedBean is so bad it's actually painful
 
2:21 PM
inorite
 
"RedBeanPHP 4" looks like it's target for PHP4
 
I used that syntax : use RedBeanPHP\Facade as R;
and it work
 
OH: "The Win32 font API is basically a pile of suck with integrated balls"
 
but now I have another problem
 
@DaveRandom Every thing related to fonts sucks
 
2:27 PM
I believe that the etymology of f*ck is a contraction of "fonts suck"
 
Have you ever use Nibble php form ?
 
@Naou, who is that pointed at?
 
@Naou, not something I personally have ever come across
 
okay
which the best mvc architecture can I have use php oop as a starter project?
please
 
2:30 PM
@Naou I think you need to read this first
 
ohai @DaveRandom
 
ohai o/
'sup dawg?
 
@Machavity thanks for this link
but I already knew MVC since I'm Java developer
I'm used to structured application, but when using PHP I feel my self lost
 
Anyone here have an Android TV? I'm debating getting a smart TV vs just having a normal TV with a Roku/Fire TV/etc.
 
2:35 PM
@LeviMorrison I would avoid Vizio. In fact, after that mess, i feel better for having a separate streaming device
 
@DaveRandom not much, surprised to see you out to play ...
I have 4 roku (branded) boxes, great little things ...
other than messing with them in shops, I have no experience of smart tv's, but there is nothing inviting me to buy one, they don't seem to do anything more than a normal tv with a £10 box plugged into it ...
 
@Machavity Wonderful.
@JoeWatkins My father-in-law has a 3100X which seems uncommon. It doesn't support a lot of features but I figured a newer, mainstream model would.
Like, I can't play HD content that is purchased on YouTube
 
I dunno what kind of price differences you are looking at, but here,the difference is unjustifiable ... I think the separate boxes are better positioned to stay ahead of the curve
I dunno what kind of features they have, I only want it for basic-ish stuff, they do all I want them too, so do smart tv's, but they're silly expensive ...
 
Yeah, it's beginning to look like the devices actually have more features.
Coupled with the price of the smart televisions… probably a separate device is better in all ways except that you have two devices.
Also, I understand why Amazon and Google are fighting over content but it makes me really unhappy.
 
My problem with the Smart TVs (privacy notwithstanding) is they have terrible support. I've had a PS3 for several years and I've used it for streaming far more than I ever gamed on it. But it's service agnostic and has always supported 1080p
 
2:47 PM
@JoeWatkins I'm not really here atm, still got a shitload of stuffz on, will be coming back properly soon though :-)
 
No Amazon Prime movie support on NVIDIA shield? Really? Come on guys, at least let them install an app.
 
14 mins ago, by Naou
but I already knew MVC since I'm Java developer
ROFL
 
@LeviMorrison I really wish Amazon would just bite the bullet and support Chromecast. I have Fire tablets I can't use with it either
 
@DaveRandom look forward to it :)
*/me goes on school run*/
 
@Naou that's like saying "I am really good at robotics because I am Japanese"
 
2:50 PM
@Machavity Problem solved
 
hi, is there a technology better than aiml?
 
Good morning
 
good morning
 
good morning
 
@BubuDaba I wouldn't call a xml file technology tbh :P
 
2:57 PM
the tech wich use xml files then
 
@ircmaxell Morning.
 
sup?
I tell ya, I was suprised the number of committers who have changes in 7.0
 
@FlorianMargaine you still around? I have a JS/jquery question :P
 
@ircmaxell Overall a pretty good thing.
 
@PeeHaa I might be able to help?
 
3:03 PM
@ircmaxell "who have changes in 7.0" means "who have used of 7.0" ?
 
Thanks, already found what I forgot .bind()
$('[data-action="address-selector"]').on('change', this.fill.bind(this));
Seems to work fine
 
that is pretty crucial sometimes :P
 
@PeeHaa Not bad. I know people around here have been building PCs around mythtv.org
 
user895378
morning
 
I wish I could set custom messages for when filter_input_array fails... so, I'll have an array of messages for failures and "trues" for passes, is that possible at the moment?
 
3:08 PM
@rdlowrey how's your native async ext/pgsql amp lib coming along?
 
user895378
@bwoebi going well ... about to spend a few minutes working on it now :)
 
if anyone like to watch Starcraft, this is a really good small tournament: youtube.com/playlist?list=PLS67L5dgs2EYG_kJwWdw_R2jmsj5wdWqc
 
How's that newest SC expansion @tereško ?
 
interesting to watch .. haven't bought it myself yet
I am on limited budget untill I get a job
 
@tereško are you interested t this kind of games?
 
3:18 PM
hi every body
Is there a code obfuscator for PHP?
 
@zohreh where are you from?
 
Eval and base64 it?
 
@Shafizadeh I like starcraft. But it's only RTS that I play, so, Ican't really say whether I like the genre or not.
 
From Iran @Shafizadeh
 
3:19 PM
@zohreh ok good !
@tereško I see
 
Don't know that one. But since I got kodi I never looked back
 
@zohreh the longer answer is: yes, there are few, but usually they are solving the wrong problem. If you cannot trust your clients, change client or change their ability to access code.
 
I use phpstorm for coding can i use zend tools for obfuscator my code? @Machavity
 
I don't think it matters where you write your code
 
3:24 PM
@Machavity well, that's obvious it does not matter ..!
 
All obfuscation does is pre-compile your PHP. it doesn't prevent reverse engineering
 
Is it correct that gd is not vulnerable to the overflow vulnerability of libpng?
It does use it doesn't it?
^ @Danack (you come closest to having a clue I think)
Bitches love image processing
 
@Shafizadeh no, contributors
 
@rdlowrey Can you poll on the resource that ext/pgsql gives you?
 
3:40 PM
@zohreh your editor/IDE shouldn't have any impact on code obfuscations
but the major question, @zohreh is: why do you need to obfuscate your php code?
what do you intend to gain from that?
 
user895378
@Trowski not the db resource itself. I exposed the async functionality + a function to get a pollable stream from the db resource in 5.6. I'll ping you a gist with how to do it in a bit
 
user895378
But you can totally wrap the ext/pgsl packaged with the standard distro to do our kind of non-blocking stuff
 
@rdlowrey Awesome, thanks.
Still no way to get a pollable stream for ext/mysqli I suppose?
 
user895378
lol yeah no
 
user895378
mysqli is foobar
 
3:45 PM
MySQL is foobar :P
 
@Trowski which is why we have amphp/mysql
hehe
 
user895378
@Trowski the gist: gist.github.com/rdlowrey/8114597 ... $db = pg_connect($addr, PGSQL_CONNECT_ASYNC); $pollableSream = pg_socket($db);
 
user895378
@Trowski you can see everything you need to know in that gist though.
 
@rdlowrey Yeah, very straight forward. ext/eio does something similar.
@kelunik Yeah, I don't really care about it myself anymore, but I'm sure many will still want to use it.
 
user895378
Yeah, mysql is useful to port legacy apps basically
 
user895378
3:49 PM
No sane application would use it as part of a new greenfield thing I don't think
 
@rdlowrey oops :P
 
user895378
lol
 
:-P
 
@PeeHaa what kind of expression is that? :D
 
Can a user has a gold badge without having a silver badge on SO?
 
3:54 PM
@PeeHaa I think if you need to worry about libpng vulnerabilities, you're possibly doing it wrong anyway: github.com/mkoppanen/imagick/blob/master/README.md#security
 
@Shafizadeh no
 
ah ok tnx
 
I would imaging GD uses libpng....because otherwise how else is it going to read/write stuff.
 
Yeah thought so
@Naruto Which one?
 
@rdlowrey there is no issue in using mysql for a "standard" application which doesnt have to scale larger then 1webserver+1db server
which works for most apps
but of course doesnt work for large scale things
 
user895378
4:00 PM
sure
 
user895378
And as long as people use good abstractions to hide the implementation details it doesn't matter.
 
user895378
Problem is, generally people using mysql don't have the chops to design an application in such a way where the backend is sufficiently decoupled.
 
Is there a native way to expand paths such as "/var/**/foo" to an array of valid local paths that satisfy that pattern?
Or do I need to parse the pattern and recursively glob?
 
RecursiveDirectoryIterator with a regexp filter perhaps? But there's no native function for something that specialised
 
I had things working in my code yesterday afternoon and then by evening something happened and I can't figure out what but it doesn't work anymore. It's leaving me head scratching
 
4:04 PM
Is it really specialized? I figured it'd be under the fnmatch umbrella, but no go.
 
Well it requires directory recursion, which makes it more specialised that a basic directory listing
 
Anonymous
How do you guys read programming books and be able to retain all the stuff? I got a new book full of great tips and not sure what to do :/
 
Anonymous
maybe I should write down the tips somewhere
 
@samayo we don't binge-read programming books
you read a chapter or two and then you think on it for few days
 
s/binge//
 
Anonymous
4:07 PM
I got this from a library, so I have to
 
@DanLugg well .. that's only you
 
:-P
 
heh, I torrent all my books
 
^^ likewise
 
huh I usually download them via http
 
Anonymous
4:10 PM
When you have to move around a lot with a laptop that has no battery, there isn't much to do
 
Google-fu: intitle:"index of" programming +pdf (I'm not responsible for your acts of piracy, or if you find porn, or the anarchist cookbook)
 
Anonymous
anyway, i'll write down some of the good parts
 
Anonymous
@DanLugg some book on something.pdf
 
Anonymous
works everytime
 
@rdlowrey yeah.. always those poor man systems which have this poor mans problems ;)
 
4:15 PM
Like practically every PHP application, right guys?
 
user895378
PHP: Poorman's Hack Page?
 
Pretty Hellish Programming
 
Apparently gd is not vulnerable \o/
 
\o/
 
Hey folks, here to ask another non-php question, but is back-end related. How do you normally handle storing of images? Do you store it as bas64 or something in a database, or do you save the file to disk, and handle the serving of it from the file system?
 
4:19 PM
In 99% of the cases I personally store it on disk
 
@Nick rename the file to it's SHA, save the hash in the database as reference.
Also, every single file.
 
@Nick Store them in S3 and cache them on the servers file system.
@PeeHaa how does that tell you that it's not vulnerable, and do you have an example image for testing against.
 
SHA? S3? wat
 
Ah, not interested in integrating amazon's s3 into what I'm doing right now
For now, I think I'll save it to disk, and cache it with redis
maybe
yes
 
4:28 PM
> I think I'll save it to disk, and cache it with redis
 
@Danack From what I understand from it it happens when people try to reserve memory themselves/manually for the palette. When using png_get_PLTE everything is fine
 
@Danack I never claimed to be smart
 
Don't bother - with redis caching....just leave the memory available and your OS will use it for filesystem caching, which will be inherently more efficient than a Redis cache.
 
I'm already using redis for caching other things, I figured I'd just apply it to files as well
 
@PeeHaa perhaps we're talking about different ones - cvedetails.com/cve/CVE-2015-8126 appears to be internal to png_get_PLTE ?
 
4:37 PM
@Danack Translated from Dutch: with png_get_PLTE it is secure. It's the IHDR chunk that is vulnerable
WHatever that means :P
The vuln messages are kinda scary btw libpng.org/pub/png/libpng.html
C is such a shitty language :P
 
anybody knows the number of "viewed" in SO is depends on what? IP, Cookies, Username or ... ?
 
Anonymous
Most likely IP.
 
Well, I've sent my first patch to the CMake developers mailing list.
 
@samayo So, If I change my IP, I can increase it again ?
 
Hopefully this is the first of many.
I'm hoping that we can move the PHP project to CMake.
 
Anonymous
4:42 PM
@Shafizadeh yes, for additional assurance you could also try with a different browser, and clear your cookies.
 
@Danack:
> I request a CVE for a vulnerability in libpng, all versions, in the png_set_PLTE/png_get_PLTE functions. These functions failed to check for an out-of-range palette when reading or writing PNG files with a bit_depth less than 8. Some applications might read the bit depth from the IHDR chunk and allocate memory for a 2^N entry palette, while libpng can return a palette with up to 256 entries even when the bit depth is less than 8.
 
@samayo ok well, are you sure it is not depends on Username? (I mean is each user can increase it just onetime and who is not a SO's user even can not increase it at all)
 
brb yall -> fooood
 
Anonymous
@Shafizadeh Yes, I am almost sure it is not on a username-only basis.
 
good, tnx
 
Anonymous
4:46 PM
110
Q: How are the number of views in a question calculated?

andrerpenaI saw it's not just a page views number, because, if I press F5 several times, it won't increase the number of views. They could store my IP address in a table, but wouldn't that make it slow? They would need to query a database one more time for each request.

 
@samayo WTF, this is exactly what I asked ...!
tnx
 
5:01 PM
@Shafizadeh "who is not a SO's user even can not increase it at all" seems true for me, I tried to increase views with Tor, but even after 10 IP changing, it remains same. And also I noticed that when I'm logged in, I need to open question two times and then counter increases.
 
@SomeHelpingDude ah, tnx for sharing me your experience, but according to what Samayo linked, I think all user (if you are not a user, SO will use of your IP) increases viewed number
for anonymous users, it is IP + QuestionNr.

for authenticated users it is UserNr + QuestionNr.
 
@Shafizadeh Maybe it was like that before
 
yeah maybe
 
That was asked 5 years ago
 
Anonymous
Since Tor is made to be untraceable, it is likely that it won't send as much header information as the rest of browsers. So, that may be the issue.
 
5:11 PM
Sounds legit. I will then manually change my IP address (reboot modem) and report back my findings
 
good
 
Okay, so, when you are guest, it doesn't increase views.
But if you are logged in and change IP, it increases views.
 
I see, thanks a lot
 
Does this chat has anything to do with ##PHP IRC channel on freenode (except description)?
 
This has no association.
 
5:26 PM
Ok, thanks
 
5:47 PM
If a force closed Generator throws from the finally block, is there any way I can catch that? Seems to be thrown from Generator::__destruct(), so I'm thinking not…
 
@SomeHelpingDude we have few users who are also regulars on freenode
but that's only abour3 or 4 people
and I think all of them are ##php.pecl (or what was the name of that unofficial internals channel) members
 
@tereško I was active on freenode for some time, and this ("Discussion for all things PHP. Don't ask to ask, just ask.") description reminded me of it.
 
@LeviMorrison pin please
 

« first day (1857 days earlier)      last day (3095 days later) »