« first day (2113 days earlier)      last day (2826 days later) » 

2:12 AM
hello guys
 
Wes
fulminating backache yesterday. dunno how happened. maybe i'm dying
 
Getting old
Are you on Windows Wes?
 
Wes
yep
 
Wes
wow, what was it?
 
2:23 AM
No idea, that's what PECL built automatically.
 
Wes
there was a non resolved link whatever
or something like that
 
shrug no idea, never tried building it myself.
On windows anyway.
 
3:20 AM
morning
Happy rebecca day
!!rebecca
 
3:36 AM
0
Q: sqlsrv connection lost when iframe load

AshanI have a project in php (fuelphp framework). It's load iframe inside and inside for load window without page refresh. I'm using, IIS server sqlsrv driver use PDO connection mssql server when i load iframe in my application randomly connection lost with sqlserver. which mean PDOException retur...

 
Wes
4:23 AM
mornings
 
4:46 AM
mornin
 
Ekn
mornin
 
Wes
 
5:06 AM
aw man don't tell me it's friday already
also very late mornings
and also I didn't know Joel and Jeff were actually not friends anymore since a long time
 
Wes
i knew it
 
Raj
6:08 AM
hey guys gm
 
@bwoebi was the discussion + resources we provided not enough? Getting real sick of discussing ORMs with people that don't know how to use them...
(or when)
("never" counts as "when" too)
 
morning
 
6:41 AM
Good morning and happy Rebecca day!
!!rebecca
 
7:29 AM
Mornigns
 
mornings
 
7:44 AM
 
Moonrnig
 
mornetc..
 
8:01 AM
@Jimbo did you get a talk slot for nw btw?
 
8:13 AM
Hi all,
I have very big .csv file, it's consists of 1000 rows. While importing into my database it's taking too much time and sometimes it display error like Time Out.

To avoid this I want read first 100 rows and import into database, and so on. How to do in PHP ?. Is there any easy method available?
 
1000 rows is small -_-
Is the db one you can connect to via CLI?
 
I guess you could import it dirrectly?
 
!!? LOAD DATA INFILE
 
Search for "LOAD DATA INFILE" (https://www.google.com/search?q=LOAD+DATA+INFILE&lr=lang_en)
• MySQL 5.7 Reference Manual :: 14.2.6 LOAD DATA IN… - [SET col_name = expr ,…] The LOAD DATA INFILE statement reads rows from a text file into a table a… (http://dev.mysql.com/doc/en/load-data.html)
• MYSQL import data from csv using LOAD DATA INFILE… - Before importing the file, you must need to prepare the following: A database table to which the d… (http://stackoverflow.com/questions/14127529/mysql-import-data-from-csv-using-load-data-infile)
 
^^
 
8:15 AM
@BalasureshAsaithambi ^
 
Anonymous
Mornins
 
@Fabor, Consider it consists of 3.6 GB of data
 
The heck are you storing
 
Raj
@BalasureshAsaithambi i have imported 15 lacks records csv file
 
\o
 
Raj
8:16 AM
use this
 
lol
 
3.5mb per row?! dafuq?
 
Raj
LOAD DATA INFILE 'C:/Users/DELL/Desktop/Book1.csv'
INTO TABLE branch_details
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS
 
Let's hope you aren't storing blobs
 
@Raj thanks. But i am using Wordpress post and post meta tables.
 
8:19 AM
uuh, I didnt know you can do php.net/releases/?json
 
@HamZa Yes
 
Raj
@BalasureshAsaithambi no issue
 
@BalasureshAsaithambi consider saving them on the harddrive, in the DB you just provide a link to each
 
@Gordon read the sidebar of the HTML version of the page :P
 
@salathe that's how I discovered it
 
8:22 AM
I gathered that, I meant "Gordon read (past participle) the sidebar..." :)
 
ah, hehe. true :)
hmm, are there any .xy archives for 5.4 and 5.3? also I cannot seem to find the sha hashes for them
 
@Raj could you please share ideas regards WP post and post meta. Because for now i using update_post_meta(); to insert the values from CSV files intot db
 
G'morning! Happy Friday 11
 
morning
 
@HamZa could you please share ideas regards WP post and post meta. Because for now i using update_post_meta(); to insert the values from CSV files intot db
 
8:28 AM
> The file you requested ( php-5.4.45.tar.xy ) is not found on this server
:(
 
@BalasureshAsaithambi lolwut
 
@salathe .xy archives and shas of 5.4 and 5.3? do they exist?
 
@Gordon do you mean .xz ?
 
yes, sorry my pedantic friend ;)
 
@Gordon No, only gz and bz2, archiving with .xz is relatively new
 
8:30 AM
@salathe and sha hashes for older version?
 
How much older?
 
latest 5.3 and 5.4
i only see md5 on the releases page
 
it should be there if you're using the JSON
 
checking
 
no idea why we don't show the sha256 on the HTML page
 
8:33 AM
hm, the json doesnt have 5.3 or 5.4 at all
 
try setting max=<a big enough number> in the URL
 
bingo. thanks
 
@DaveRandom Course I did ;-)
 
oh. the older version do seem to have .xz archives, too. at least the json says so
 
yeah some will, some won't... just depends on who made the archives and when
 
8:37 AM
can it also do pretty print?
 
of the JSON? No
that's what browser extensions are for :)
 
hmm, unfortunately, the json also doesnt contain sha hashes for these versions
 
Long shot here, but is anyone having difficulty downloading packages from archive.ubuntu.com this morning?
Stuck on connecting to gb.archive.ubuntu.com
 
@Sean from archuve for sure ;)
 
@Gordon Ooft, ya got me :p
All those archuved packages.
 
8:39 AM
@Gordon the sha256 is there for 5.4.45
 
yes, but not for 5.3.29
i need both
 
We only started adding the sha256 with 5.5.24/5.4.40 so anything earlier (chronologically) than April 2015 doesn't have it
 
meh
 
moo
 
baa
 
8:42 AM
<3
@salathe are there gpg signature files for these two version?
 
yes, I have these. I mean the sig files for each archive
php.net/downloads.php has links to a sig file for each version
but it only lists non-eol versions
 
yeah there are, just stick the .asc on the end of the file
 
cool. thanks
 
posted on July 29, 2016

New Cyanide and Happiness Comic

 
8:50 AM
looks like the /releases page could do with adding those in, and the sha's when available. :)
 
I guess. for completeness. it's somewhat inconvenient to gather right now
I'd also like a "latest in branch" and pretty print option
 
@Gordon Yeah, I was thinking of making version= allow more than an integer so you can see e.g. the latest 5.4 with version=5.4&max=1
 
would be neat. the reason I only need the latest in branch is because thats the only versions I will build extensions against
hmm, this seems bugged. when I do php.net/releases/?json&max=2000 without a version I only get a few versions instead of of the expected unfiltered list
it skips the 5.4 to 5 branches and gives me 4 and 3 instead :D
 
Hehe yeah you need to specify a version to get max to work.
 
hi there, i curious to know how set path in download link?
 
9:04 AM
@Newbi example?
 
<a href="ajax/download2.php?file=../image/image.jpg">
it's work but name file -image-image.jpg
 
@Newbi that's a vulnerability. dont do that
 
@Newbi inb4 directory traversal attacks
99% sure
 
and likely remote file inclusion,too
 
should be?
 
9:07 AM
some sort of id
 
i use this :
if (isset($_GET['file'])) {
	if (file_exists($file) && is_readable($file)) {
		header('Content-Description: File Transfer');
		header('Content-Type: application/octet-stream');
		header("Content-Disposition: attachment; filename=\"$file\"");
		header('Content-Transfer-Encoding: binary');
		header('Expires: 0');
		header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
		header('Pragma: public');
		header('Content-Length: ' . filesize($file));
		ob_clean();
		flush();
		readfile($file);
 
yeah, put in /etc/passwd
 
(smh)
 
sry, can you more explain please?
 
also, you are not sanitizing. put in <span onload="javascript:alert('bam!');">file</span>"
 
9:11 AM
hem... i tried build a normal <a href> (download here)<a>
 
yes, but you are not sanitizing the input in the file= part. That means you allow people to download every file they want
 
@HamZa o/
 
and it also allows people to insert random code into your page by supplying a file that does not exist
 
yeach, so i must use sanitizing?
 
always
 
9:13 AM
ow okay thx advice
btw how about the path?
 
@Newbi fix for directory traversal attacks stackoverflow.com/a/4205278/508666
 
@PeeHaa I got off from the right path (php). I landed a part time job mainly focusing on Java/Spring and occasionally python :P
 
Oh noes. The horror!
python is ok btw
But java...
 
@HamZa congratulations
 
9:15 AM
Son please :P
 
@PeeHaa java8 is nice
 
thanks
 
/me throws beans at @Gordo
 
@PeeHaa i dont do beans :)
 
@PeeHaa used Beans! It wasn't very effective.
 
9:17 AM
@HamZa What business are you guys in?
 
@PeeHaa I work for Trifork (Amsterdam) which has several projects/clients. Currently working on thesurfacenetwork.com
 
@HamZa So you are one of those "iot" guys now :)
 
@HamZa smart floors. cool
 
@PeeHaa sort of... We have a hardware team and a software one. I'm basically on the software side, sometimes tinkering on the raspberry pi, sometimes also working on the deployment process (docker / SaltStack)
 
cool
 
9:22 AM
Salt Stack \o/ Docker \o/
can you spell S A N I T Y
 
Morgen
 
D.U.R.R.R.R
Did I get that right?
@Okabe morge
 
btw @PeeHaa do you understand german?
 
Ein bischen ja
 
Isn't @PeeHaa living on the border of germany :P
 
9:23 AM
idk if on the border of germany but certainly on the edge
 
@HamZa Hell no :P
@Gordon lol
 
hahaha
I know someone who lived there nearby. Told me that it was cheaper to go to germany to do the shopping than in NL :O
 
@Gordon Oh I need to connect my speakers again first
@HamZa Yeah everything (most things) are much billiger over there :(
 
Wes
thedailywtf.com/articles/the-inner-json-effect why would anyone do this and how could they convince an entire company that it's a good thing? serious question
 
Because he's a genius
Didn't you read the article???
 
9:26 AM
... billiger?
 
@FlorianMargaine cheaper*
 
cheaper
 
That said, how do you say "cheaper" in french in one word? Most of the times you say "moin chere"
 
Wes
@PeeHaa how do you identify a genius then?
 
@HamZa They are all cheap over there
 
9:27 AM
yeah, "moins cher"
there's no word
 
@Wes If you don't understand someones code they have to be a genius
 
@PeeHaa its very horrible
 
@Wes is a freakin genius!
 
Wes
also @PeeHaa is, tbh :D
 
:P
 
9:29 AM
@FlorianMargaine I need to improve my spelling :p
 
@Wes s/:D/:B
 
@Wes it reminds of the story of mel. Mel was a real programmer, just like the genius in that other story
 
Wes
@PeeHaa seriously, why was that implemented in your opinion? why was it needed in the first place?
 
if you are the only person able to maintain a thing, you got a job for life
 
@Wes Because people are stupid
 
9:30 AM
IT stranglehold maneuver
 
@Gordon or really smart
 
no, smart people long for simplicity
 
I am simple!
 
@NikiC Is there any way I can execute some code from an extension just before ZE begins shutdown? In this case, I want to join a thread so that it blocks shutdown until the thread has finished executing. Doing this in PHP_MSHUTDOWN_FUNCTION will not work, as ZE has already begun shutting down (clearing variables that may still be needed, along with shutting down other extensions that may be needed)
 
@PeeHaa then this is for you youtube.com/watch?v=sHQ_aTjXObs
 
Wes
9:34 AM
anyway i shouldn't be making plans for the php conference. that sounds like an excuse but it is not (at least a part of it :B)
 
which?
 
Wes
php nw?
 
ah
 
@Wes I heard two people with a spare ticket iirc
 
Wes
i will contemplate @PeeHaa's ginger hair next time
i've even forgot the date
 
9:38 AM
Does anyone have a link to those images of terrible phone number pickers? Someone I work with just did an equivalent for a date picker.
 
Wes
@Danack uh?
 
Anonymous
@Wes make plans!
 
@Danack hehehehe
 
user image
11
 
Wes
9:42 AM
ahahahahahaha
 
^^ that is what has been implemented for a date picker.
 
@Danack I saw that on twatter a while ago
I lolled
 
@jkloo_ @paulomgaspar @jeffbonhag @stelian @ftrain I thought I could make it a bit more "engaging", thoughts? https://t.co/Y1WWZMesOh
 
Wes
the <select> actually makes sense though. it is more comfortable scrolling on mobile than typing in the numbers. and on desktop if you focus the field you can type in like a normal text field, but as result you get your selection changed rather than text inputted
 
9:51 AM
"it is more comfortable scrolling on mobile than typing in the numbers." - what?
You've never scrolled a large select box on an iPhone? It's quite terrible....
 
Wes
i don't remember how it is on the iphone, but i would genuinely prefer scrolling on android 2-3 selectbox than typing in the numbers. i'm pretty sure i'll be faster too
 
s/You've never scrolled a large select box on an//
 
Wes
lol ^
but hey, my opinion could be biased. i suck with touch and i'm still waiting for physical keyboards to make their come back :B
 
Wes
haha true
 
10:11 AM
@tpunt I assume you don't mean request shutdown?
 
10:21 AM
@NikiC Correct. I mean on module shutdown
 
@tpunt but what variables do you expect to be live there?
 
@NikiC I have a scheduler that runs in a separate thread (executing code). If ZE shutsdown instantly after the script being executed has ended, then I hit segfaults. I need ZE to not shutdown until the scheduler has finished executing
I can place the following code at the end of the script and it will wait (unreliably) just enough time for the separate thread to finish executing: for($i=0;$i<2000000;++$i);
 
@tpunt That doesn't looks like you should be waiting for module shutdown
 
@NikiC I need to wait before module shutdown, just before ZE begins to shutdown. Kind of like placing a function call right at the end of the script, that in turn executes an internal function from my extension that joins the scheduler thread.
But preferably a cleaner way than forcing user land to invoke a function to block ZE shutdown
 
and why is request shutdown not appropriate for that?
 
10:28 AM
Hmm, have not actually tried that.
@NikiC It seems to segfault. I can't debug it at the moment though, so I'll look into it in an hours time or so. Thanks for the help
 
PWAHAHAHAHHAHAHAHAHAHAH http://thedailywtf.com/articles/the-inner-json-effect
 
The ending wasn't really satisfying...
 
It was for jake
 
try this out: googlefeud.com :P
5
 
10:42 AM
no
 
\o/ first guess is a winner
Sorry @FlorianMargaine :P
 
huehuehue
 
Hah, yea, why are the french so gay? :D
 
11:12 AM
@PeeHaa :(
 
!!eval <?php const FOO = []; var_dump(isset(FOO['bar']));
 
[ 7.0.0 - 7.1.0beta1 ] bool(false)
[ hhvm-3.10.0 - 3.12.0 ] Fatal error: syntax error, unexpected '[', expecting ',' or ')' in /in/avG7B on line 1 <br/><i>Process exited with code <b title="Generic Error">255</b>.</i>
[ 5.6.0 - 5.6.24 ] Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in /in/avG7B on line 1 <br/><i>Process exited with code <b title="Generic Error">255</b>.</i>
 
hmm, phpstorm says I cannot use isset on an array constant
so its a bug in phpstorm then
 
Wes
TIL i've been writing array_key_exists() for years and the shorter alias key_exists() exists.
 
Don't use the alias, though
 
Wes
11:21 AM
@DaveRandom i admire the hope to get php functions and their naming cleaned that some people have
it will never happen
 
@DaveRandom why not? it would have saved myself some bytes to type, too :)
 
@Wes I also never seen that before I think
Aliases should just die in a fire
 
I need to use sizeof from now
 
Can't we just start by soft deprecating (as in just docs) aliases now. And properly deprecate them for 8. So that we can get rid of them by 9 in 2035?
 
Like undocumented aliases?
 
11:32 AM
Adding warnings in docs to say they will be deprecated soon
 
Anonymous
Ok - so I'm not validating anything, just sanitizing atm but apart from the SoC that's needed on the table class, is this a crazy approach for a db interaction/table class + validation or am I on the right track? gist.github.com/anonymous/f860ed1e3bc3b8e89628f637cef5711c / gist.github.com/anonymous/9ee0c0dead47a973964023b3c2ce79ed
 
Is there a php cs fixer for these aliases?
 
Dunno
 
@PeeHaa I'd rather we didn't. Deprecate something in php-src first, then make the docs reflect that. :)
 
@salathe I would love to do that but I am afraid of people being against it when doing it like that?
As in "oh noes my crappy code now throws warnings!!!111111oneoneoneeleve :("
 
11:35 AM
deprecation notices, not warnings ^^
 
@PeeHaa Don't fear the unknown :)
 
@hakre eh Tomato, Tomahto
@salathe Fair
@JayIsTooCommon Sorry. No time to review something now. Eating and drinking :)
 
Soft-deprecation via the manual should be reserved, as it historically has been, for things that are commonly used but we want to gently push people away from. Like ext/mysql, ereg, etc. For random aliases, individual functions, etc. lets use the proper procedure and actually deprecate them.
 
Anonymous
@PeeHaa no worries :3
 
@salathe do you think it is worth including a docs tips section? Like the following: stackoverflow.com/documentation/proposed/changes/66323
 
11:39 AM
@tpunt including one where?
 
@salathe Into the SO's docs on contributing to the PHP manual
*see link
 
@salathe Fine. I will find out when people are starting shouting at me. Will also do some github searches to guess impact
 
@tpunt I'd rather have the entire "contributing to the PHP manual" topic be a link to doc.php.net, and have any improvements, tips, etc. over there. :P
 
@JayIsTooCommon Most likely it's all too theoretic, isn't it?
 
@salathe I don't mind putting them over there instead then :) Likely, I won't have time to do it today though
 
11:42 AM
@PeeHaa Why do drupal patch notes say that it's deprecated in > 7?
But the manual doesn't mention it.
 
@tpunt As with all things docs... there's no rush, take your time! :)
 
Anonymous
@hakre How so?
 
my wtf for today: new $user; returns a new instance if the variable is an existing object: 3v4l.org/3Fomg
3
 
@littlepootis it's not deprecated in PHP, maybe Drupal decided to deprecate it in all of their code.
 
@JayIsTooCommon Because you ask if that is crazy.
 
11:45 AM
Ah
 
hmpf, why cant I use scalar as a typehint?
 
@Gordon because you're not using PHP 7?
 
Wes
@Jimbo fine trolling?
 
Anonymous
@hakre I was just trying to get an opinion on the approach, that's all
 
@Sjon that's actually somewhat logical. Without a __toString on User , what would you rather have it do?
 
Wes
11:56 AM
there's no "scalar" type hint, not even in php 7. why do you need it @Gordon?
 
@JayIsTooCommon And I just wrote that the approach looks to theoretic to me. That's all.
 
Anonymous
@hakre That's great, thank you.
 
Heh, my docker's auto name is "romantic_torvalds"
 
Wes
@Sjon wtf.
@FélixGagnon-Grenier ...... are you sure "logical" is the word you wanted to use :B
 
@littlepootis @salathe It may have been because on the array_key_exists manual page, it said key_exists was a deprecated alias. The key_exists page did not say the function was deprecated, however, and neither was the function marked with a deprecation notice in php-src, so I commit a fix a while ago for it: github.com/salathe/phpdoc-en/commit/…
 
12:01 PM
@Wes because sloppy coding
 
@Wes maybe "expectable", if that's a word? :P
 
@Fabor yeah, docker generates cool names. I once had naughty liskov
 
:P
 
boy, my code to fetch the latest versions in each minor branch is incredibly ugly
 
@FélixGagnon-Grenier if you add a toString nothing changes ;)
It's also not in the docs, only the specs
 
12:06 PM
@Gordon But never a boring Wozniak... github.com/docker/docker/blob/master/pkg/namesgenerator/… :)
 
@Sjon really? :(
 
@Sjon There's an (super-subtle and well-hidden) example of it in the docs at least
 
/me has a job interview in two hours. Getting a bit nervous
 
@FélixGagnon-Grenier 3v4l.org/E8DNp
 
@FélixGagnon-Grenier I gotchu.
 
12:15 PM
@Fabor haha. Thx :)
 
@salathe hehe
 
Anonymous
@FélixGagnon-Grenier Good luck man, what's it for?
 
@FélixGagnon-Grenier good luck bruh!
 
A research institute. Front end developer for the vision and imagery research team. Kinda wayy over my head, but what can it hurt, of not my pride
 
12:23 PM
hi
 
Ekn
@FélixGagnon-Grenier nice, good luck!
also mornings
 
@salathe apple fanbois
 
I wish FIG would get back to doing what they're good at... writing interoperability-enhancing documents. *grin*
 
12:42 PM
Aren't figs good for digestion?
 
they are ...!
 
@DaveRandom @Wes Where are we with the amphp logo? I don't think we have a deadline. :-D
 
Wes
i'm in the panic zone
 
You've been there several times.
 
Wes
+ additional crying
 
12:46 PM
@Wes you mean those three votes we did actually were not binding?
 
Wes
which votes?
jokes are not allowed. i redid the thing like 20 times already. every time i ended up crying
 
votes. on amphp logo. unless I'm more paranoid than I think and all of that happened in my head..
 
How should Database Interactions (Select, Insert, Updates) be structured.
Each separated in a method so I can easily reuse what I want or does one
better create method´s that contains the whole Database Interaction Routine that must be executed in a row? Hope this is understandable ;)
 
both
 
Wes
@FélixGagnon-Grenier it was about the trunk, though. i've accepted that. now i'm stuck because every time i continued i ended up changing my mind about everything :B
 
12:52 PM
hehe
 
docker ps
dangit!
 
!!? transaction script poeaa
 
Search for "transaction script poeaa" (https://www.google.com/search?q=transaction+script+poeaa&lr=lang_en)
• P of EAA: Transaction Script - Martin Fowler - P of EAA Catalog |. Transaction Script. Organizes business logic by procedures where each procedur… (http://martinfowler.com/eaaCatalog/transactionScript.html)
• Quantifying Domain Model versus Transaction Scrip… - (PoEAA p.111-112). Here, I used a simple banking example to illustrate the difference between Tran… (http://lorenzo-dee.blogspot.com/2014/06/quantifying-domain-model-vs-transaction-script.html)
 
@Gordon one or two more words would be good :P
 
@elsololobo see above
thats two more words :)
 
12:54 PM
ah that was for me ^^
thanks
 
Wes
i even had a elephant with strabism at some point
 
@Fabor docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
 
@Wes tell me you put that idea out :)
 
Wes
yep
 
Danke @Gordon
 
12:59 PM
@Fabor that removes all docker images that dont have a repository name. useful when you do a lot of docker build -t foo:bar because retagging creates orphans
 

« first day (2113 days earlier)      last day (2826 days later) »