« first day (1846 days earlier)      last day (3108 days later) » 

12:13 AM
I should take a break from working on Aerys… getting overwhelmed by too much awesomeness \cc @rdlowrey :-D
Also, current state: HTTP/2 is verified to work in most setups now.
 
Abe
i love how youtube's automatic playback always brings me from stuff like "bad religion" to "justin timberlake"
 
Hi is anyone familiar with Laravel 5 that could help me with a SO question?
 
Abe
now robbie williams. robbie williams isn't bad though. incredible he comes from a boy band
 
anyone know how PSR-2 is affected by the return type hints in PHP 7?
seems like an open question
 
@ScottArciszewski this might be worth having a read? groups.google.com/forum/#!topic/php-fig/wh9avopSR9k
Apparently existing PSR aren't going to be updated?
If someone could help with this I'd be eternally grateful stackoverflow.com/questions/33534552/…
 
 
1 hour later…
1:34 AM
Hi, I'm trying to figure out how to tokenize an input string into a correctly formatted array. It would be very nice if anyone here have the time to help me out a bit.
 
You should write your question before trying to get someone to agree to help you. If you write it in notepad, and then copy + paste it in here, even if no-one can help you now, you will have the question written down and you will be able to re-use it elsewhere aka htp://sol.gfxile.net/dontask.html
 
1:54 AM
I have already posted the question. Here it is: stackoverflow.com/questions/33534694/…
 
"the user should be able to enter this, without quotes," - urrgh.
Also, that question is a poor fit for SO:
> Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers.
 
Yeah, I know, generally it isn't good. But I need it to work that way because I'll prompt the user directly for information and create a new StringInput object from that input, and it would be weird if a user had to enclose his reply in quotes.
I did my best when I posted the question though. Posted the desired behavior, the specific problem and included some code. If that question wasn't good enough, I don't know how I could have done it better.
 
It's not that it's not enough. It's that the question is totally specific to your code.
If it was a more general question it would be 'better' - but it's still basically please write this code for me.
What you ought to do is break the problem down into individual chunks. Most of those chunks you will be able to do, but there might be a single, simple one that you don't know how to do - and that would be a better question for SO. Rather than 'how do I write this whole function'.
 
2:14 AM
My head literally hurts after trying to fix this for so long. I know I could be more specific about the real problem, you're right. I'm not asking for people to just rewrite the function for me. I would just like to know how I can make it differentiate between option values and the rest, so that "--name The value" would turn into "array('--name', 'The value')" instead of "array('--name The value')" as it does now.
I don't know how to do that when I'm reading just one character at a time.
 
 
1 hour later…
3:42 AM
Totally didn't intend to start the argument… but there it is again… github.com/amphp/aerys/pull/56#issuecomment-153932852 \cc @Sara
 
4:22 AM
I haz need help for regexp
 
Abe
4:52 AM
> You should write your question before trying to get someone to agree to help you. If you write it in notepad, and then copy + paste it in here, even if no-one can help you now, you will have the question written down and you will be able to re-use it elsewhere aka htp://sol.gfxile.net/dontask.html
 
good morning
 
Abe
o/
 
5:33 AM
Is my array correct?
$tot_shrs_amt  = 1;
$bnfts         = 1;
$dvdnd         = 1;
$loan          = 0;
$grcery        = 0;
$life_insrnce  = 0;
$funeral_pln   = 0;
$flu_vccne     = 0;
$eye_glss      = 0;
$is_add = array($tot_shrs_amt || $bnfts || $dvdnd || $loan || $grcery || $life_insrnce || $funeral_pln || $flu_vccne || $eye_glss);
Because is_add value is always 0
 
5:53 AM
The || operator is "or". That code will put one value in the array, a 1 if all of those other variables are "truthy" (1, true, an array with values, lots of things evaluate to true). Otherwise, it will be 0.
 
@bwoebi lol
 
@Micaela To make an array, you would do something like this:
$is_add = array(
    'tot_shrs_amt'=>$tot_shrs_am,
    'bnfts'=$bnfts,
    'dvdnd'=>$dvdnd,
    'loan'=>$loan,
    'grcery'=>$grcery,
    'life_insrnce'=>$life_insrnce,
    'funeral_pln'=>$funeral_pln,
    'flu_vccne'=>$flu_vccne,
    'eye_glss'=>$eye_glss
);
Your value is called "add", though, which makes me wonder if you actually want an array.
 
moin
 
^^ ?? hope that helped anything at all, lol
 
5:59 AM
Hey Joe
I'm on the radio :)
 
which radio @ChrisBaker ?
 
@ChrisBaker Thanks. My mind is still absorbing the info very slowly.
 
It's a community radio station, I am on the staff there but I also volunteer as a dj
 
what if like this.
                $tot_shrs_amt  = 1;
                $bnfts         = 1;
                $dvdnd         = 1;
                $coop_shrs     = 1;
                $loan          = 0;
                $grcery        = 0;
                $life_insrnce  = 0;
                $funeral_pln   = 0;
                $flu_vccne     = 0;
                $eye_glss      = 0;
                $tot_ddctns    = 0;
                $is_add = array($tot_shrs_amt, $bnfts, $dvdnd, $coop_shrs, $loan, $grcery, $life_insrnce, $funeral_pln, $flu_vccne, $eye_glss, $tot_ddctns);
 
No commercials, we can basically play anything but we focus on local stuff, or play b sides, eclectic mixes are encouraged. What I play during my stint will be way different than the next guy
 
6:02 AM
@Micaela ouch ouch, my eyes, my eyes ...
 
hahaha
 
@Micaela What is your goal, describe it briefly.
That WILL make an array of the values, but it will be numerically indexed, so clunky to work with for much of anything.
 
I don't think that's meant to be an array
 
Yeah, what are you trying to do? :)
 
I have a field (is_add, what_type) in table (tb_finalpay_detail)
 
6:04 AM
What goes in that field?
 
from tot_shrs_amt up to tot_ddctns are input fields in html
1 or 0
 
That's what is supposed to go in that field? A 1 or a 0?
 
yes. If is_add = 1 = add, if 0 = deduct
 
you're trying to use a bitmask/field ...
 
yes. is_add, what_type (tinyint(1))
 
6:06 AM
it looks like ...
 
So all those other fields, if they're all 1 your want the database field to be 1, if any of them are 0 then you want a 0 in the database.
 
yes yes. I think hahaha
 
^ reworded to ensure we're clear
for is_add
 
there are more opportunities for injection there than there are grains of sand on all the beaches of the world ...
that's a slight exaggeration, but it's hard to look past glaring problems ...
 
6:12 AM
Okay, on line 57, it inserts a row into the database. The field is_add, as you said, is a tinyint, so it will be a 1 or a 0. Under what circumstances do you anticipate a 1. Also, what belongs in what_type?
 
morning
 
moin
 
As Joe said, the code is wide open to all kinds of exploitation.
 
I'd say that's the first problem ...
 
Micaela u haz sql injection vulnability code
 
6:15 AM
very little point in your SQL being "correct" if in fact it allows anyone to execute anything ...
 
yes very
very not secure code
 
i have another question but it's for javascript
 
Micaela i will very suggest u fix server code
is very importent
 
hello Gagnon
 
6:25 AM
nice. hey Jensen
 
moin
 
@SammyK yup, looks right
 
Joe Watkins and Gagnon, do you know your Regex Fu?
 
I really, really, really like PHP Storm.
 
@ChrisBaker marry it ...
 
6:32 AM
I would, except I'm afraid it's Dreamweaver and I've become a zombie.
 
@PeterJensen if you have a question, ask it, if someone wants to answer they will ...
 
@ChrisBaker Would be nice if it would understand scalar types and constant arrays finally...
 
@JoeWatkins Have already posted it, but it died after the first answer. :(
 
@NikiC your thoughts on async/await in some future version of 7, please ?
 
Abe
would be nice if it supported at least php 5.6
 
6:34 AM
@PeterJensen in here or on SO ?
 
I love phpstorm except for the non completing type hints
 
@JoeWatkins Good reason for that? Well... But, on SO, yeah. I had to edit the question, because I didn't mention something I thought wasn't important at the time of posting, so that's why it got a bit messy. Anyway, nvm.. I'll continue trying to figure it out.
 
7:14 AM
Good morning
@FélixGagnon-Grenier I hate phpstorm and it's forced ident :D
 
I started accepting indents thanks to phpsotorm! It even made me almost start liking that 80 character-wide coding width..
plus. it's quite customizable.
 
Don't get me wrong, I indent my code, I just don't like the forced feeling behind it.
And it properly is, I just couldn't find where :P
Using Apatana3 Studio instead now.
Aptana*
Hrm, what would you call a php load tester? (I want to test a website with php code and see what parts of my code is taking the longest to load), I can't seem to find anything on google which means i'm not using the correct search terms.
 
Profiler?
xdebug can give you a dump, you can use valgrind or webgrind to view execution time and other profiling info
I've used this cheesy thing for a website too. If you get the db logging set up, can be slightly useful to get a very top-level view of load time performance.
^ that's a toy, though. cachegrind profile is in depth.
 
Ah, righto, thanks @ChrisBaker :)
 
7:38 AM
@PeterJensen are the double double quotes actually part of the string you are trying to match, or are they there to delimit the string? stackoverflow.com/questions/33536577/…
(assuming that's the question in question)
 
posted on November 05, 2015 by nlecointre

/* by Vooodoo */

 
mornings
 
morning
 
7:56 AM
Anyone tried this already: mozilla.org/en-US/firefox/developer
Morning!
 
Abe
did anyone ever test SQL? setting up test tables, example data, ppppppfff i would rather kiss @PeeHaa's bottom
 
Hello Friends. Does anybody say why I'm getting session expire in the middle of my PHP application?
 
@Abe isn't it one of use cases for this storage engine?
 
Abe
it's the same thing, still very boring
 
for functional/acceptance testing should work pretty well
not if you have migrations/schema creations
 
Abe
8:04 AM
i do, but still boring :B
 
8:18 AM
hello
 
8:32 AM
morning champs!
 
morning
 
8:52 AM
@Duikboot yes
 
56
Q: What is the easiest way to parse an INI file in Java?

Mario OrtegónI am writing a drop-in replacement for a legacy application in Java. One of the requirements is that the ini files that the older application used have to be read as-is into the new Java Application. The format of this ini files is the common windows style, with header sections and key=value pa...

this is hilarious
In php you just do parse_ini_file and in Java it apparently takes at least 80 lines of code
 
Mogguh
 
> I personally prefer Confucious. It is nice, as it doesn't require any external dependencies, it's tiny - only 16K,
Tiny … 16k … mmmmmkay
 
@Abe I've done that in a limited way
@Gordon Looks like only one line Preferences prefs = new IniFile(new File(filename));?
 
Abe
@PeeHaa wow. i imagine it would require acrobat skills
i mean, kissing your own bottom :D
 
9:03 AM
@Abe Neh. A simple create database + import sql in bootstrap of the tests
 
Abe
i will do that, once i get a project that is worth testing properly :D
 
Abe
morning
 
@PeeHaa after pulling in that library. yes.
 
@Gordon Well those FactoryFactories aren't go to make themselves are they? :P
 
9:32 AM
void vote: 81.0810810810810810810810810810% Yes
 
@iroegbu I like it the version of FF for devs
 
@LeviMorrison Nope, not a sausage.
 
18.9189189189189189189189189189% No
@LeviMorrison we could add actual traits
 
Anyone know of a way to enumerate domains delegated to a specific registrar?
 
how do i set name to a computer which acts as a server in local group so that the client systems can make request to this computer using the name of the computer.. Is there a programmatic solution in php?
 
10:02 AM
@JibinMathew When you visit a website, you do it by it's ip address, or it's domain name. Find an IP address of one of your machines and as long as it's accessible (as in, running apache, you can make a request to the IP on another machine and see something), then in the /etc/hosts file of each client, set the IP of the server to "hostmachine" or another name. Then, you can just type "hostmachine" in the browser and connect to it
 
How do i access the IP address the IP address might change if the server system restarts since it is in a local group rather than having a global ip
 
@JibinMathew Set them to have a static ip
 
Is it possible programmatically?@Jimbo
 
Any reason why this is not allowed: 3v4l.org/rkUCq?
 
user1804599
@kelunik see commit message github.com/php/php-src/commit/…
 
user1804599
10:09 AM
I.e. it's an implementation issue.
 
user1804599
It could be desugared to a("a", ...(["blah", "foo"] + ["bar"])), though, I think.
 
return $this->execute("reset", ...$flags, ...[$ref]); < Fine then.
 
user1804599
Nice. @NikiC why is that ^ not automatic?
 
I thought we were getting $foo = [$bar, ...$qux] in 7. Disappoint :(
 
How Group multiple id's in cakephp 3.x
->group(['Stakeholders.id'],['Folders.id']) is not working
$docs_details = $this->Stakeholders->find()->where($conditions)
->group(['Stakeholders.id'],['Folders.id'])
->contain(['Folders','Routes'])
->toArray();
Any pls help
 
10:17 AM
@KarthikKeyan well, i have no idea how cake works but i guess it should be ->group(['Stakeholders.id', 'Folders.id'])
 
@nikita2206 Sry that also not working
 
user1804599
@AlmaDo forgot --no-preserve-root; not fun.
 
10:38 AM
How Group multiple id's in cakephp 3.x
->group(['Stakeholders.id'],['Folders.id']) is not working
$docs_details = $this->Stakeholders->find()->where($conditions)
->group(['Stakeholders.id'],['Folders.id'])
->contain(['Folders','Routes'])
->toArray();
Any pls help
 
Do you think php7 is old news? ;) Start playing with 7.1, I've just uploaded a fresh build!
#spam
Now all I need to do is fixate DateTime and blacklist rand() so 3v4l.org/bughunt/7.1@2015-11/7.0.0rc6+7.0.0rc5 is actually useful
3
 
That's a really useful page
 
wow
indeed
 
10:54 AM
@Sjon Do you think blacklisting rand is a good idea? How about seeding it based on the script?
 
@Sjon *grumble, grumble* "php7" :(
 
hi guys, free geek stickers notifuse.com :)
 
@zachu Clicked, saw lack of free anything closed, and now ignoring you. Well done.
 
what do you mean? i just ordered mine
sorry it cut the url... I did not notice... here are the actual free stickers:
 
@zachu is this your website?
 
11:01 AM
No, i have ordered stickers for free and it said "share with your friends" thought I will put it here
 
@Leigh Only /bughunt has a requirement on rand being stable; so it seems logical to filter it there
 
@Sjon Ah yes, for comparing sets of scripts that makes sense. I was thinking for fixing the odd bandings of versions
 
@Leigh yeah that sucks as well. I'll look into LD_PRELOAD, see how hard it is to fixate anything
 
Why the hell is there a null byte directly after class@anonymous? github.com/php/php-src/blob/…
 
Internal naming magic I guess, so other string funcs see it as "class@anonymous" while ones that respect the length in the zval get the full name?
 
11:16 AM
Having the filename is nice, but it breaks the Aerys logger with that null byte: 3v4l.org/978e7
 
oh, it's leaking memory addresses too
nice
 
11:32 AM
Hm, it seems in some places Z_OBJCE_P(obj)->name is used, and in some Z_OBJ_HANDLER_P(zv, get_class_name) - not sure if that's the issue yet
 
Mornin'!
 
Mornin everybody, I have an array which I want to shuffle, but somehow it returns 'true' , how come so? paste.ofcode.org/CMkpfqLHwLtxWGKU8WW9DB
 
Shuffle returns true if it was successfully shuffled. The original array will be shuffled.
 
Nope that's not it. Seems simpler, some places it's sprintf'd, and some not
 
Ye, I've looked into that but doesn't understand why it returns true instead of what I want
 
11:41 AM
@Leigh yeah, pretty sure that's gonna cause problems in the future #exploitfest
 
@Liam In the code linked, $array should be the shuffled array.
Oh wait.
 
@Sjon Yea, @kelunik are you going to take it to internals? I think it needs quite a review of where class names are used.
 
@Liam Your outer array only has one item, containing the Collection object.
 
@Leigh I think @bwoebi will later. :P
 
Shuffling an array with 1 item in it will not change its order :p
 
11:44 AM
Oh yeah I see
 
You'll need to grab the array from your Collection object and shuffle that instead. Whether you type cast it or your object has a method to fetch all of the array entries is up to you
I have a rather large multipart form split into defined sections. What's the best way to store it? Entirely as some sort of serialised or JSON, or a table per section, or one table and a gazillion columns? (or serialised / json per section)
 
@Sean Makes me think you should think about how to store the data first, before you even bring building a form into it
 
@Jimbo The form concept isn't in my control unfortunately. The concepts are there, I haven't actually started building the form components yet. I want to get the storage strategy down first :p
I don't think any individual data needs drilling down into. The lowest group is viewing or editing a specific section. For that reason I'm learning towards storing it as some sort of json string per section.
 
12:00 PM
Hiya peoplez or robots or whatever you want to be.
 
Time to research. There's gotta be a friendly way.
 
@Jimbo why would I, I rather start building off and then thinking about what data I shall have :-P But hehe why would a login use a password if the username is enough xD
 
posted on November 05, 2015 by nlecointre

/* by Nizalwey */

 
Hello @PeeHaa , I was just searching You
I'm in trouble in one of my php application
the issue is session related
The application suddenly expiring it's session and going to login page when user is working in the application
can U tell me plz why it's happening....
can anybody help me in this situation plz............
I'm in big trouble........
 
@ripa either your session time is set incorrectly set or your session time is being changed by whatever the user is doing.
 
@MikeM. how can I recognize that? I've not done anything with the session time in my code
and the application is purely written in core php code
no framework or cms
 
Well start of, showing how you build up your session. (in pastebin or so)
Then tell us where the issue occurs "user is browsing" is very broad, if it happens everywhere, check & show us your session verification that the user IS logged in.
 
@ripa If this behaviour recently started, you can't figure out why and there are other PHP applications running on the same server, try setting the session save_path to a directory specific to that application. If multiple applications use the same save_path, the most frequent session garbage collection settings end up being used (ie. other applications could be "cleaning up" your applications sessions too quickly).
 
12:46 PM
not able to post the actual code
 
Why not? :-P
 
@ripa If this behaviour happens on a page where users tend to stay for long periods of time (eg. a CMS page editor), set up an AJAX request that fires every 30 seconds or so and updates a value in $_SESSION (I usually use something like $_SESSION['keep_alive'] = time()) to keep them logged in.
 
@MikeM. I don't know why. but giving timeout error
@AllenJB there are multiple application running from one login.
 
@ripa Try either of: 3. Use viper-7.com, eval.in, pastie.org, 3v4l.org, gist.github.com or pastebin.com to post code when asking for help.
 
@MikeM. ok
if(!isset($_SESSION["uid"]))
{
die(NEED_LOGIN." <a href='../login.php'>".HERE."</a> ".TO_GO_LOGIN);
}
@MikeM. code posted. I've used this checking in all pages
 
Anonymous
 
I actually linked you to websites you shall post your code too ...
 
@ripa What is exactly happening? Your session is killed to early?
@samayo lol :D
 
@duikboot exactly.
 
Anonymous
it's a bot @Duikboot
 
@ripa where do you set your session post that in one of the links I gave...
And as you said, your session is being used by multiple applications... check each application and make sure it doesn't kill your session
 
12:55 PM
@MikeM. in viper-7.com
 
Then link us to it... :-P
 
1. Go to pastie.org
2. Copy and paste your code in there where your session is being set.
3. submit and paste that link here.
 
ok
 
@Duikboot please don't go too low :-)
Else your "Duikboot" will explode because of the pressure down there :-)
 
:D Hahaha
 
12:57 PM
Miep Miep there is "duikboot"man, ready to "save" lifes!
 
@MikeM. You filled my name into the translator?
 
No I am dutch XD
 
Oh, ok :D
@ripa Are you stuck in your paste?
 
Probably xD \_(^_^)_/
 

« first day (1846 days earlier)      last day (3108 days later) »