« first day (1993 days earlier)      last day (2955 days later) » 

11:00 AM
oh right,
 
\<images>
<image id="1">
<url>
http://www.ippzero.com/wp-content/uploads/2016/01/logo_222.png
</url>
</image>
<image>
<url>
http://www.ippzero.com/wp-content/uploads/2016/01/logo_222.png
</url>
</image>
<image>
<url>
http://www.ippzero.com/wp-content/uploads/2016/01/logo_dsad.png
</url>
</image>
</images>
I want to add dynamic id all image element ,
can any one help me?
Like <images>
<image id="1"> ... <images>
<image id="2"> etc
 
swissinfo.ch/eng/… .. this is what failure in education system looks like
 
@tereško placebo effect is nice.
 
(gdb) p (int)*__errno_location()
Cannot access memory at address 0xfffffffff7fc7698
(gdb) p __errno_location()
$6 = -134449512
 
11:04 AM
@HamZa I have tried but only adding for first not for all
 
Folks using gdb might like peda. It's mainly used for exploit development but it has some nice features!
 
@HamZa I'm fetching all images url form database and try show as I want what not working
 
@Leigh ... wut?
 
@bwoebi did I find something fun?
 
> Cannot access memory at address 0xfffffffff7fc7698
 
11:08 AM
yea but it also displays that when I run with non-aborting code
 
and p errno isn't successful either?
(brb, lunch)
 
Breakpoint 1, lex_scan (zendlval=0x7fffffffa350) at Zend/zend_language_scanner.l:1662
1662				ZEND_ASSERT(!errno);
(gdb) p errno
Cannot access memory at address 0xffffeec88698
 
hi
 
guys to insert a new json object in an existing json string
lets say this is my json for example
{
   "users":{
      "john":{
         "level":1,
         "password":"hashedString"
      },
      "itapi":{
         "level":241,
         "password":"0506777031"
      }
   }
}
 
@Slashy decode, add, encode
 
11:12 AM
How will I include a where clause or a condition in this statement? $this->db->insert('employee_details',$data);
 
@RonniSkansing this is what im doing but i'm getting somthing not exact
		$arrne['username'] = $user;
		$arrne['password'] = $pass;
		$arrne['level'] = "1";
		array_push( $data['users'], $arrne );
		file_put_contents($file,json_encode( $data));
the next item looks like this:
{
   "users":{
      "john":{
         "level":1,
         "password":"hashedString"
      },
      "itapi":{
         "level":241,
         "password":"0506777031"
      },
      "0":{
         "username":"zohar",
         "password":"yehe",
         "level":"1"
      }
   }
}
 
@Slashy because you're using array_push?
 
and what should i use instead? @HamZa :)
 
$data[$user] = $arrne; I guess
 
@Ricardo That depends on how the insert method of the db object looks. Looks like you're using some custom adapter, so without seeing the code behind it, it's anyone's guess.
 
11:14 AM
@PeeHaa, If I specify no parameters when using a command, what would $message->getParameters() return, like in github.com/Room-11/Jeeves/blob/master/src/Chat/Plugin/…
 
@Oldskool this is the data i'm passing to the function
$file=array(
'img_name'=>$data['raw_name'],
'thumb_name'=>$data['raw_name'].'_thumb',
'ext'=>$data['file_ext'],
'upload_date'=>time()
);
$this->Contents->add_image($file);
 
@HamZa awesome! thanks!
 
this is the add_image function
function add_image($data) {
$where = "userid=".$this->uri->segment(3);
$this->db->where($where);
$this->db->insert('employee_details',$data);

}
 
@Ricardo I dont get it.. you want to attach a WHERE to your INSERT ?
 
yes
 
11:17 AM
and what would that do?
INSERT is adding new data
 
i want to insert the data on a certain row only
 
what does that mean?
 
Then you need UPDATE WHERE.
 
oh so that means it's update
oh hahaha
 
11:18 AM
INSERT WHERE doesn't make any sense :)
 
sorry hahaha
thanks guys :)
 
no problem
 
@PeeHaa no worries, i got it.... :P
 
11:32 AM
 
@Saitama \o/
 
11:50 AM
Hi guys! I am trying to create login page in my website..right now am doing it in plain php what all things I should take care of ?In terms of security aspects?
 
Anonymous
@Oldskool Weird, flag disputed because he edited, ah well.
 
@astrosixer sqli, xss, csrf, session fixation, hashing of passwords, encrypting user data, encrypting the connection, brute force attacks
 
BINGO!!
 
You know you have to sing if your bingo is not correct right :)
 
what?
 
That's the rule
 
@PeeHaa what is sqli session fixation,csrf?
 
Google it
 
@astrosixer owasp.org/index.php/Top_10_2013-Top_10 click each and read
 
@PeeHaa Sql injection! real escape string will take care of it..
 
11:58 AM
Fuck no
!!canon sqli
 
2788
Q: How can I prevent SQL-injection in PHP?

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

 
@astrosixer what are you building, like for what purpose?
 
@astrosixer it's ded m8
 
@Jeeves I got it! Have to use real_escape_string($unsafe_variable)
 
@astrosixer dude
 
Anonymous
12:02 PM
troll....
 
@astrosixer ever heard of prepared statements?
 
Yes but i didnt use it yet
 
YOU SHOULD ALWAYS USE PREPARED STMT'S
 
no need to shout ...
 
12:05 PM
lol
 
Hm. Think it's possible to mirror the mysql table logs to a flat file, from the database?
 
=( I hate washing clothes
but there is no way around unless I want to stink up
I considered paying someone else to do it..
 
that's why you either stay with mom or get married
3
 
12:08 PM
@Gordon sexist
 
you could also do it yourself ...
 
@littlepootis no. pragmatist.
 
@JoeWatkins yes.. and I will. I am just so lazy sometimes
 
pfft ... I do all of the washing in my house ...
 
@Gordon I pay me mom to do stuff around my house :P Best of both worlds :)
 
12:09 PM
Well I bow for your washing excellence and family commitment @JoeWatkins
 
BTW washing is not that bad. Ironing sucks very much
 
lol I never iron, actually do not think I have ever ironed anything
 
Just import a few robots
 
@RonniSkansing same problem as you, I don't wanna do it ... but the wife works, not fair to ask her to get home and do that stuff ... I'm not going to wait around for a female to do it ... that's not a good plan ...
 
@RonniSkansing I have a couple of shorts that look like shit otherwise
 
12:10 PM
@littlepootis believe me, I tried to do my own laundry. I just suck at it. So many confusing programs and labels.
 
also, she has no idea how to work an iron, every single item of clothing she has ever tried to iron was ruined, without exception ...
 
@PeeHaa slap on some hoodies
 
Anonymous
@Gordon Says the software engineer XD
 
@JoeWatkins it's a trick
 
@RonniSkansing That's why I wear them often :P
 
12:11 PM
lol
 
yeah, hang everything up, and leave it for long enough for gravity to do the work for you ...
 
@Jay and dont get me started on ironing… I tried that once, too. Then the shirt was brown.
 
@RonniSkansing same each dude! dont use to iron. Force my sister to do that for me..
 
Anonymous
lol
 
@Gordon Whenever I try to do it it has to opposite effect of what's meant to happen
 
12:14 PM
My sister forces me to do the ironing for her
 
Anonymous
@PeeHaa Are you using the right side of the iron?
 
Hmmm not sure
The thing is too hot to handle now you mention it
 
The only thing I suck at is cooking.
 
Hmm I read that wrong
 
jesus
 
12:19 PM
user image
2
 
one can use hair dryer if to lazy to iron cloth :P that what i do.
 
My problem is I know how to do something but I cannot do it in the right time.
 
placing books all over the clothes also works
 
put it on the road and let cars drive over it... nice street look.. iron out real good..
 
SELECT
	s.stageid,
	s.stagename,
	s.scheduledon,
	s.scheduled_end_on,
	t.teamid,
	t.teamname as topteamname,
	max(diffscore) topscore,
    q.questioncount
FROM
	`stage_responses` sr
	right outer join stages s on s.stageid = sr.stageid
	left outer join teams t on t.teamid = sr.teamid
    left join (select COUNT(question) as questioncount, stageid from questions q where q.stageid = s.stageid)
group by
	stageid
Hi, the last left join is doing trouble
any help?
 
@Saitama we learned lots about your wardrobe now ^^
 
I am getting the following error:
> #1248 - Every derived table must have its own alias
 
@Naruto Well, it's the internet's wardrobe ^^
 
Anonymous
12:36 PM
246
A: every derived table must have its own alias

PaulEvery derived table must indeed have an alias. SELECT ID FROM ( SELECT ID, msisdn FROM ( SELECT * FROM TT2 ) AS T ) AS T In your case, the entire query could be replaced with: SELECT ID FROM TT2

 
@Saitama btw, I tought you only wore yellow oncies? :P
 
lol :P
BTW, have you watched the new special episodes
 
nope, had no idea there were new ones
 
check those out, they are kinda nice...
they came out recently....
 
stream or ... ^^
 
12:46 PM
SELECT
	s.stageid,
	s.stagename,
	s.scheduledon,
	s.scheduled_end_on,
	t.teamid,
	t.teamname as topteamname,
	max(diffscore) topscore,
    q.questioncount
FROM
	`stage_responses` sr
	right outer join stages s on s.stageid = sr.stageid
	left outer join teams t on t.teamid = sr.teamid
    left join (select COUNT(question) as questioncount, stageid from questions WHERE stageid = s.stageid) q on q.stageid = s.stageid
group by
	stageid
^ the issue is at q.stageid = s.stageid 3rd line from last
any help?
Error is: Unknown column 's.stageid' in 'where clause'
 
@Jimbo I did not find Pole Dancing in your LinkedIn skills, nor did it let me add that as a skill, so I endorsed you for Modern Dance. I guess, we all can agree that's similar enough.
2
 
lol
 
While at it, I also added Sword Fighting
 
Guys, any help?
 
12:56 PM
well the message says it all? there is no s.stageid
 
there is
 
not in the subquery
different scope
 
@Saitama sorry i thought you invited all of them.. so i joined too.
 
How to get it in there then?
I am not in to sql field
please
 
@Mr_Green Do another join in the subquery.
 
12:59 PM
with what I should do join?
 
So select ... from questions q inner join stages s on q.stageid = s.id
 
why didn't you write:
 
because in that scope, "s" has no meaning yet, so you need to redefine it
 
select COUNT(question) as questioncount, stageid from questions GROUP BY stageid
otherwise, what the fuck are you counting there?
 
@tereško Good point :)
 
1:01 PM
it should be:
 
0
Q: Issue with codeigniter select query

ViniIn my codeigniter application try to retrive data from database. For that i use the following code database.php: $active_group = 'default'; $active_record = TRUE; $db['default']['hostname'] = "localhost"; $db['default']['username'] = "*****"; $db['default']['password'] = "****"; $db['defaul...

 
Yeah I got it
isn't working actually
SELECT
	s.stageid,
	s.stagename,
	s.scheduledon,
	s.scheduled_end_on,
	t.teamid,
	t.teamname as topteamname,
	max(diffscore) topscore,
    q.questioncount
FROM
	`stage_responses` sr
	right outer join stages s on s.stageid = sr.stageid
	left outer join teams t on t.teamid = sr.teamid
    left outer join (select COUNT(question) as questioncount, stageid from questions GROUP BY q.stageid) q on q.stageid = s.stageid
group by
	s.stageid
 
6 hours ago, by tereško
E_DOESNT_WORK is now a defined php error level?
 
Am I the only one who finds it disturbing when people use some gals they like as their avatars? that's even worse than using an anime picture imo.
 
Error is: Unknown column 'q.stageid' in 'group statement'
 
1:03 PM
@Gordon LOL
 
Got it
:D
 
@Gordon I see it as "please downvote my crap as a matter of principle" sign
 
SELECT
	s.stageid,
	s.stagename,
	s.scheduledon,
	s.scheduled_end_on,
	t.teamid,
	t.teamname as topteamname,
	max(diffscore) topscore,
    q.questioncount
FROM
	`stage_responses` sr
	right outer join stages s on s.stageid = sr.stageid
	left outer join teams t on t.teamid = sr.teamid
    left outer join (select COUNT(question) as questioncount, stageid from questions as q1 GROUP BY q1.stageid) q on q.stageid = s.stageid
group by
	s.stageid
^ working one
I don't know why I did create two aliases though
 
@Gordon I find it strange to use someone else's photo as a profile picture at all, anime or not.
 
@tereško Hello what is the s mean after stages s in the query?
 
1:05 PM
@astrosixer it's an alias. People seem to overuse aliases way too much, IMHO
 
But since there are so many out there, I'm probably in the minority of thinking that.
 
speaking of other people
happy prebecca day!
 
@tereško Ugh that is horrible. Why mangle perfectly good names
I freaking hate that practice
 
@tereško I can't say how much I agree with that
 
@tereško aliases means instead stages can specify s somewhere later in the query
 
1:09 PM
@Gordon brb changing my avatar to a photo of your mom
 
Wes
Aprebecca Fools tomorrow \o/
6
 
@Oldskool sorry :(
 
ok thanks! @tereško
 
@PeeHaa I'll buy you a beer if you can find one
 
@Naruto No need to be sorry, if you like to go with that, that's perfectly fine. I just wouldn't ever do that myself :)
@Wes Oh yeah, that should be fun.
 
1:13 PM
@Wes thanks for the reminder
 
Wes
tomorrow i'll be in nepal, i think
or antartica.
 
@Gordon challange accepted
 
@PeeHaa not so hard? Take one in the morning? ;)
 
@SergeyTelshevsky btw, I think I am going for a visit on monday - got called to an interview (and really hope I remembered all the details correctly, because I was in the middle of a bridge, on a bicycle, holding at the side on which breaks dont work)
 
@Oldskool agreed
 
1:23 PM
Although my mangatar is also a bit of an edge-case obviously ;-) But it kinda depicts how I look IRL.
 
@Leigh nice try, stupid gdb … then I can't help either :x
 
@Oldskool that's fine. it's modeled after you. I mean, I am not using a pic either. Just the delft-blue G. It's still somehow connected.
 
@tereško lol, well we can go for a coffee after your interview, which details you doubt you remember?
 
mostly "the time", but I will call back tomorrow
@Oldskool I use "face generators" for the throwaway accounts
like this one: iobound.com/pareidoloop
it's useful, when you need to bypass social networks, which have face recognition added to the profile uploads
prevents you from being flagged as fake
 
its cool as hell!
 
1:36 PM
@bwoebi the reproduction is pretty easy <?php 999...999; where there are 310 9's, which makes it too large to store as a double
 
bob$ ~/php-src-X/sapi/cli/php -r 'var_dump(eval("return ".str_repeat("9", 310).";"));'
float(INF)
 
hi guys
reckon there is a better way of doing this:
 
@Leigh ah got it … was using a non-debug build too^^
 
I'll get a pastebin
 
@Leigh getting errno == 2
 
@tereško 16:00
 
@bwoebi Im using latest master, --disable-all --enable-debug, still getting "Cannot acccess memory" for errno
 
@tereško wait… you mean, that long haired web partisan is not the actual you?
 
(lldb) p *(int*)__error()
(int) $5 = 34
 
ERROR 1067: Invalid default value for 'my_date'
SQL Statement:
CREATE TABLE `test`.`my_date_default_test` (
  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `my_date` DATE NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`))
Seriously?
You can default a DATETIME with CURRENT_TIMESTAMP, but not a DATE?
 
1:46 PM
@Leigh So… it's an ERANGE … not sure whether it should throw or accept INF…
 
you spelled strange wrong @bwoebi
 
@JoeWatkins E(ST)RANGE :-D
 
sapi/cli/php -r 'var_dump(eval("return ".str_repeat("9", 310).";"));'
 
I'm just not sure why it gets bitchy with debug enabled, but produced INF anyway without
 
php: Zend/zend_language_scanner.l:1686: lex_scan: Assertion `!(*__errno_location ())' failed.
Aborted
 
1:47 PM
@Leigh because there's an assert that errno is 0 in lexer code
so… not sure whether it should throw or accept INF.
 
Yea I get "because the assert"
 
I tend towards exception … if you want INF, you should just explicitly use INF. not overflow.
 
That's a rational argument
 
what is setting errno ?
 
@JoeWatkins I think this
 
1:59 PM
say you writing to the temp stream as such:
    $f = fopen('php://temp', 'rw');
    foreach ($entity as $line)
      fputcsv($f, $line, ',');

    fseek($f, 0);

    ob_start();
    fpassthru($f);
    $csv = ob_get_contents();
    ob_end_clean();
    fclose($f);
 
wtf
why is that assert there ?
 
do I need to clean up after my self?
 
@Leigh just remove it, it doesn't seem to make sense
oh wait
 
Isn't it expected that at least one of the above conversions succeeds?
 
it's not there, it's the next branch down
if (yytext[0] == '0') { /* octal overflow */
				errno = 0;
				ZVAL_DOUBLE(zendlval, zend_oct_strtod(yytext, (const char **)&end));
			} else {
				ZVAL_DOUBLE(zendlval, zend_strtod(yytext, (const char **)&end));
			}
check errno again and make pretty error ...
dunno what it should say ... "unicorns are licking your face" ...
 
2:03 PM
I'm getting Zend/zend_language_scanner.l:1662 for the assert, which puts it in the block above that one
 
Good morning
 
I'm on 7.0
 
@JoeWatkins E_UNICORNS
 
master
 
moin @ircmaxell
 
2:04 PM
@SergeyTelshevsky lol, I wrote down 13:00
 
May get my car tomorrow (it's on a truck right now from what I understand)
 
w00t
 
@ErikLandvall depends on what your tmp dir is and whether you hit the predefined limit when it starts writing to disc. assuming your tmp dir is /tmp it means it will get cleared out eventually but again,it depends when and whether that is timely enough.
 
@Leigh
> krakjoe@fiji:/usr/src/php-src$ sapi/cli/php -n -r 'var_dump(eval("return ".str_repeat("9", 310).";"));'

Parse error: Unicorns have been licking your face in Command line code(1) : eval()'d code on line 1
 
ship it
 
@Gordon maybe better to use the memory stream? to be sure it's cleaned up?
 
do something sensible with error message, merge into 7 and then up to master ...
 
please let unicorns invade php? pretty please?
and mornings
 
commit -m "Joe made me do it"
 
@tereško you better call them to make sure, but in the shared calendar you're on 16:00 :)
 
2:09 PM
hehe
 
Everyone ready for april 1st? ;)
 
@ErikLandvall if your not membound in some way, yes, why not. As a side note: I prefer to use SplTempFile.
 
meh, I wonder if how SO will troll us very hard
 
@Gordon alright ty :) for the side note too
 
@tereško job inteview tomorrow?
 
2:22 PM
@RonniSkansing on monday
I'm thinking about getting some gopro cams to record that one
 
best wishes, hope they do not pull some fools day stuff on you
 
Hello php folks!
Does anyone here have a good knowledge in laravel?
 
Nope
 
:(
 
There's probably a plethora of laravel specific rooms out there though. Most likely an IRC channel.
 
2:35 PM
Never used IRC before so idk
 
Oh boy, why am I always struggling with my SSH keys ><
o/ ! btw :)
 
@0x00 just try asking your question
 
2:58 PM
@Duikboot Dunno, they're not that difficult :)
@Duikboot \o
 
Haha Im trying to push from my local machine, to my staging server again. And I always have issues with the public key: Permission denied (publickey).
fatal: Could not read from remote repository.
 

« first day (1993 days earlier)      last day (2955 days later) »