« first day (1284 days earlier)      last day (3655 days later) » 

1:04 PM
chr(1) as a PCRE delimiter; yay, nay?
 
@DanLugg reason?
 
@DaveRandom Unlikelihood of it as a pattern character.
 
@JoeWatkins Brodudes!
 
@DanLugg So you mean just like as the default character you use all the time?
 
@TOOTSKI hehe
 
1:07 PM
@DaveRandom Generally, yes. Specifically, I have something that returns a complete PCRE expression for use; it takes a partial. Need to delimit it of course.
 
also, phpdbg website didn't update yesterday ... any idea why ?
 
I know chr(0) borks because of null-byte.
 
@JoeWatkins No, will check a bit later, just started work, need to talk for a bit.
 
np np
 
:)
 
1:14 PM
At least we have another bank holiday soon.
 
*shakes fist at @bwoebi*
 
hahaha
 
LOL
 
Only advise is try harderSergey Berezovskiy 1 hour ago
lol
 
1:25 PM
@salathe I just waited for it :-)
 
@DanLugg Then I would say something in the range \x1C - \x1F would make more sense semantically, although not much. If you are generating exprs for direct use (rather than printing them back to the user) I'd probably rather use a sane delimiter and preg_quote() though, simply because it would read better. When you see chr() or \xNN seqs it looks like the binary has some significance, but in this case it doesn't so I would personally avoid it
 
@salathe nobody told you to sign up to that list :-P
 
@DaveRandom Understandable. For debugging purposes, I favored \x01 because there's less escaping; the resulting expression is still "human readable", relatively speaking.
 
Does anyone here have any experience with TCPDF?
 
Any particular reason for semantic value in 1c - 1f
Wait; those are no good. < = > ?
 
1:28 PM
@DanLugg As long as you don't use / so you don't end up in \/\/\/ hell then I personally don't find it affects readability too much (I like #)
 
i would like to know how to include tcpdf fonts inside html.
 
@DanLugg just use ()
seriously, if you use () as your delimiters, you never need to escape anything (because PCRE is smart enough to know what's a limiter and what's a group)
 
SQLite sucks at some point... It's just me, for sure.
 
@ircmaxell I was thinking that; the pairing makes them hard to need to escape
 
@DanLugg "hard to need to escape"?
 
1:30 PM
lol, it's early.
 
@BikerJohn TCPDF is a tool. If it comes with set of fonts, the are probably somewhere in project's files
 
"(a(b|c)d)i"
 
When matching a bracket parenthesis (come'on I said it's early!), you needn't do anything additional, correct?
 
@DanLugg bracket?
 
"(a(b|\))d)i"
 
1:31 PM
I didn't even know that these are valid delimiters...
 
@DaveRandom yay for #
 
that's it, just a single backslash, but you'd need that anyway (since () are pattern characters
@bwoebi yeah, it's pretty awesome
 
Thanks for the tip!
 
@ircmaxell Right, nothing additional necessary; I dig it.
 
@bwoebi Yup, so are {} and []
 
1:32 PM
@PeeHaa You would say that, that's what you're smoking. Craxy dutch.
:-P
 
@tereško i know. I converted a font to tcpdf (3 files), and put them into the tcpdf fonts folder. Everything works fine, i just dont know how to use the font when using the html output $pdf->writeHTML. I tried font-family but it is not working so far. $pdf->setfont() works fine but it is not an option inside html. Right?
 
@SecondRikudo I always thought start and end delimiters would need to be the same character…
 
I assumed (foolishly) that it'd complicate things to use parenthesis, or braces; thank goodness for foolishness.
 
btw to all 'muricans. This # <-- is called a hash. This £ <-- is a pound.
 
I am smoking a pound sign? Or is this some magiuc english?
ow lol
:P
 
1:33 PM
@DaveRandom So, you smoked a £ of #, is what you're telling us.
 
Damn straight
 
MURICA FUCK YEAH
 
@DaveRandom # is "pound". Not "pound sign", but "pound"
 
@ircmaxell Staph confusing me
 
C-Pound
 
1:34 PM
just like ! is bang, and \ is whack
 
@ircmaxell pff… just change your English to be more correct English :-)
 
technically, American English is more correct, as it's much closer to the old english than British English,
 
Sounds like American programmers need to calm down a bit and stop beating the crap out of their code
 
@ircmaxell certainly not ...
 
@ircmaxell wut?
 
1:35 PM
at whack bang, hash hash bang whack -- sounds like the aliens from Mars Attacks
 
@DaveRandom Yeah, that's the job for Indian programmers!
GOD Stack Overflow had made me into such a racist
3
 
@JoeWatkins :-D
 
bahaha
We've all seen that before (I hope) - oldie but goodie
 
@SecondRikudo If we consider help vampires as a different race. Then I am with you.
 
^^ Such relate. Much Poland. Very ball.
 
1:40 PM
@ircmaxell it's medieval Latin (circa 5th century) ... predating America by more than a thousand years ... £ is a pound and always has been, £sd = pounds, shilling and pence is how it would have been written ~1000 years ago ... probably in use before that ... first written documents date from around that time ...
 
@ifphpwerebritish : so funny code syntax
 
@JoeWatkins I love trolling people
13
 
I knew it ...
 
especially when you can get them to troll themselves :-D
 
user1607528
hey everybody i have stock images that i want to forbid direct access to photos folder, but if i do it with htaccess i can't show them in website ?
 
user895378
1:43 PM
morning
 
user1607528
what else can i do
 
Many American spelling do make a lot more sense, but I still don't like them
 
user895378
@JoeWatkins Sorry it took me longer to get home yesterday than I expected and I just decided one more day without turning on the computer would be good for me :)
 
good call ...
 
@Muhammet Literally nothing. If you want people to be able to see the images, you have to let them download them. This is the reason that generally stock photo websites add a watermark, and only make the low-res versions available on their sites.
 
1:46 PM
@Muhammet To show images on websites http request is done by browsers. If you prohibit access to image how can browser display it? If you want to deny physical access to image (and pre-process it) create script that serves as a gateway.
 
user1607528
thanks @DaveRandom @Leri, i am guessing i will prohibit the access with deny from all and write a script which serves images and not directly shows them, is it right ?
 
@Muhammet Yes. You can resize, add watermarks, decrease quality, before actually send to browser like that.
 
user1607528
@Leri got it thnx
 
np. ;)
@Muhammet BTW, why don't you take images out of the root?
 
@Muhammet Password protect them. ALL OF THEM!
 
@BikerJohn you cannot "convert font to tcpdf", tcpdf is not a file format
 
user1607528
@Leri what do you mean out of the root, they are in photos folder and there is a htacess file inside that folder
 
user1607528
@PeeHaa you mean each image, how can be done ?
 
@Muhammet The best way to deny http access to file is to make it inaccessible for the web i.e. placing it outside of web-root (htdocs, www or whatever it is for your environment).
 
@Danack I am tempted to bookmark this, in case if I need to make some anonymous purchase
 
1:53 PM
@Muhammet htpasswd. Only drawback is people have to fill in a password before images are being loaded ;)
 
@PeeHaa You are kidding, right?
 
user1607528
@Leri i think he is :)
 
:-)
 
@tereško it'd probably be really easy to find those people's address as well...
 
usually you do not need to know the address
 
1:55 PM
@Leri Isn't it troll tuesday?
 
Got ma new credit card. its boring but it got 500 dollars 👌 💳 Ya'll broke niggas cant get on my level! #LikeABoss http://t.co/NKhV3RKd4y
 
yeah
 
user1607528
@Leri i am confused, if i place them outside of the public_html folder, users cant see them in direct url, but i can access them within the script, right ?
 
@Muhammet Your script has access to server's file-system as long as it's granted by OS.
 
user895378
Subject to openbasedir php.ini restrictions ...
 
user1607528
1:58 PM
@Leri yeah i was just making sure
 
user1607528
that i understood right
 
Today I saw a book on my bookshelf that I forgot that I bought years ago: "Are you smart enough to work at Google?". I guess I don't need that book anymore... :-D
3
 
user1607528
@ircmaxell do you think you are?
 
@Muhammet ?
 
@ircmaxell just fyi: card is expired…
 
2:00 PM
@Muhammet (he already works for Google)
 
@Muhammet no, but what I think doesn't matter. It's what they think that matters ;-)
 
I completely disagree with that statement. ^
 
user1607528
@DaveRandom i didn't know :) @ircmaxell yeah kinda
 
@Leri yeah, I know. shhhh :-P
 
@ircmaxell LOL
such proud much wow
 
2:05 PM
> This is not an unsolicited mail. Under Bill 1618 Title III passed by the 105th US Congress this mail cannot be considered Spam as long as we include contact information and a method to be removed from our mailing list. If you are not interested in receiving our e-mails then please reply with a "REMOVE" in the subject line or click here to remove your name from the mailing list. I am sorry for any inconvenience
 
@ircmaxell Stick a post-it note on the cover that says "Yes, yes I am".
 
@ircmaxell BTW, do you recommend reading it?
 
> // TODO: fix this method so the next line can be uncommented
^ last line of last method in class
 
@Leri I don't even remember...
@DanLugg I actually think I may
 
:-)
 
2:10 PM
@ircmaxell That means it worth reading when I am getting home by public transport. :)
 
Reading src but can't decipher: ob_start() returns false on failure; under what circumstances would that be? Seems like only invalid args would cause it to fail.
 
So, I clicked "unsubscribe" on that email, and they sent me another email confirming the unsubscribe. SO I marked both as spam, and emailed back saying "at this point, you're not honoring my request to be unsubscribed, so you have voided any protection you may have had under "Bill 1618 Title III".
 
@DanLugg Or if it fails to create buffer
 
@Leri Yea, I'm seeing that.
Why would that be though; failure to allocate memory necessary to do so?
 
that, locks, etc
if the handler is already registered perhaps?
 
2:14 PM
And yeop; lock, conflict, etc.
Thanks :-)
 
@ircmaxell If I have to click more than one time to Unsub, I mark as Spam.
 
Any good resource to learn development of php extensions?
 
@meWantToLearn phpinternalsbook.com
 
thanks :)
 
2:26 PM
@ircmaxell : go troll him/her
(since you love it)
 
@KarelG E_FAILED_TROLLING
 
They see me trollin' and be all LKSDFJSODIFMLSDKFJ
Given $a = [/* arbitrary */];, if I were to $b = (array) $a; will $a be copied in memory twice? Once for the cast, and again for the assignment?
 
@DanLugg You still don't get copy on write, do you?
 
@DanLugg No(?)
 
2:39 PM
@Leri Good call.
@LeviMorrison I would say I do; I didn't know if the cast would do something peculiar.
 
YAY. YAY YAY YA
 
My repwhoring paid off :')
 
BIGINT datatype strips of leading zeros, so whats the next best datatype to store numeric only fixed length user ids? VARCHAR?
 
@Mr.Alien if it's fixed width, it isn't a number
 
2:44 PM
 
@Jimbo w00t
 
@ircmaxell nah, I generate 5 digit random numbers whenever a new user is created, but say if the number generated is 00546, than db stores 546 only, zeros are stripped off, so I don't see any other field type, except varchar, because INT also strips off zeros
 
@Mr.Alien Sounds like you want UUID(?)
Morning, btw.
 
@Leri morning and sorry I didn't got you
 
why are you generating random user ids?
 
2:47 PM
@Leri nah, nothing to do with that...
@ircmaxell I've an AI id column as well but I want the user ids to be random, not guessable.. so I generate my own
 
why?
 
cuz it's a requirement :)
 
why?
 
@Mr.Alien str_pad($id, 5, '0', STR_PAD_LEFT) in that case. :)
 
lol, again, requirement... may be cuz I am doing since beginning with anything I develop, but those times length was not a concern, this time, I've made it 5 digit so, I think I should go with varchar, but it will be saving numerics only, but I don't think it's an issue, I generate on server side, so no user tinkering
@Leri return str_pad(rand(0, pow(10, $length)-1), $length, '0', STR_PAD_LEFT);
using ^^^
and it's wrapped in a function, so I can fetch any length of random digits I want to
 
2:52 PM
@Mr.Alien I don't get why you need to generate id for user.
 
sprintf anyone?
 
Well, what happens when the 100,000th user registers? Or worse yet, the 316th user registers, and you have a 50% chance of a collision?
 
@Leri cuz I don't want any auto increment stuff...
 
@Mr.Alien why not?
 
@ircmaxell I always take that into consideration, but this is my personal system, so user limit won't even exceed 100 I guess, but if I consider guest accounts, it may get more but will never exceed
 
2:53 PM
@Mr.Alien But why? What problem is generating the ID solving that incrementing doesn't?
 
famous last words
 
@Mr.Alien What's wrong with it (but 64 bit limit)?
 
Even without it exceeding 100. Still why?
 
Even without it exceeding 2 ^^
 
@DanLugg randoms is what I want. not guessable.. the issue is somethings will be depending on those unique ids, so they should be unique
@Leri ^^
 
2:55 PM
If someone guessing a User ID is a security flaw in your system the problem is elsewhere.
8
 
@Mr.Alien ^^ This ^^ What does guessability have to do with it?
 
5 digits is trivially guessable
 
@Mr.Alien I am with @Fabien.
 
I'm willing to bet that #135 is someones amazon user ID.
 
if you wanted it to not be guessable, with 0-9, you'd need literally 15 or 20 digits
 
2:56 PM
gosh, lot of hammering, I cannot change the flow now... sigh
 
Sure you can, it's your system :P
You shouldn't rationalise not securing your shit because effort.
 
wait a sec, will share a link
what am working on ^^
u: system
p: demodemo
 
^^ looks pretty, but if it can be torched by guessing a UID then it's not worth much
 
now am only using uniques for the users who will be working so hardly they will be 10 as far as I know, and about client ids and various stuff, it's 20 digit alphanumeric randoms
@DanLugg thanks, it's not much programmed online, I've much done on the local, that's a month old copy
 
3:01 PM
@DanLugg and exactly, thats why I am not considering long numbers
 
@Mr.Alien In fact, your problem is not guessed ID. Your problem is that you are not sure if usage of ID is permitted.
Think in that way. ^
 
13 mins ago, by ircmaxell
why?
^^ you haven't answered
 
@Leri well may be, but I tend to use randoms in each project of mine, where I am aware that the site is for public, I don't choose that option, or I set the limit high...
 
He's got his reasons, they don't have to be rational for everyone.
 
@iroegbu haha he will just turn down my reasons I know...
 
3:04 PM
because there aren't valid :p
 
user1607528
is it a good approach to base64 encode image trying to hide the image url ? I mean like server workload cpu memory consumption ?
 
Pointless.
 
@Mr.Alien You project, your decisions but.. Smells like security flaw.
 
@Leri this is my personal, so I got that packed, so no issues, as there is no open registration, also users have access timely set, only office hours, and they will be blocked... so not much of an issue
 
why you no manually assign userids then?
 
3:06 PM
tedious, better I let the system do the job for me
 
I wonder if you could create a number randomiser based on the current weather values at a random place in the world. Would be quite random.
 
^^ Seemingly random ;-)
I wonder why people (and I recall having done this myself) opt in favor of unsatisfactory solutions in "personal" or "small scale" projects; as if it doesn't matter.
 
@Fabien places in my country are enough to get that level of randomizing ... :p
@DanLugg cuz we know that we aren't going to crash your own system, though I've everything validated, tinkering from firebug or any other way, is always validated server side, so I don't program that loose..
 
@DanLugg Because you can't f**k up project used by millions while you can experiment in small apps.
 
3:10 PM
@Fabien would actually be quite predictable though
 
And slow :P
 
This isn't unlike the typical "Oh, I'm using MD5 because this is localhost; I might change it someday" -- No, just do it fucking right and forget about it.
 
^^ always right
 
It really is a backward way of thinking; as if the need for security depends on product success.
 
anyways I will get back to work, thanks for the inputs everyone, really appreciate it, I'll TRY ignoring randoms next time... ;)
 
3:13 PM
 
I haven't read this book. 1 star!
 
There's your one star.
 
RandomLib More random
 
Incoming kind-of-related:
 
3:15 PM
lol
mysqli Singleton. Is it a good idea. Unsure why people can't just google.
 
@Fabien replied
 
LOL
 
public function __construct() {
    global $mysqli;
    $this->mysqli = $mysqli;
}
:d
 
3:34 PM
If you've exposed a getFoo() accessor, do you follow the "single point of entry" practice and use the accessor internally?
 
user895378
@DanLugg depends on how performance critical the code is for me :)
 
and depends on the point of that abstraction
 
@rdlowrey Good point. But that's the only justification I can think of for dereferencing the property directly. Any others?
 
but usually, no
and I usually don't expose an accessor...
 
Hmm. Maybe that's a better question; "Why do I have an accessor?"
 
user895378
3:36 PM
^ That.
 
Thanks gentlemen.
 
user895378
I very rarely have getAnything() unless something exists solely as an immutable value object.
 
@DanLugg I do.
Sometimes with the exception of constructors.
 
@Leri Yet another post that is basically a bullet point list of how useless someone's code is, and not why or how to make it better. What. A. Nob.
 
@SecondRikudo See, I was too. Now I'm rethinking their necessity.
 
3:40 PM
@rdlowrey Yup :-D
 
@Jimbo It was originally asked on SO, so this kind of answer, basically, makes sense. However, I agree with your point. It just says that code is crap but does not provide any hints, how to make better.
 
@rdlowrey (for some unknown reason I keep getting notified about that issue on Amp) is there a case where is_resource() will return false there? Like, if the pipe disappears, I thought it would still be a resource, but comms ops would fail?
 
user895378
@DaveRandom I think the is_resource check there can't possibly return TRUE ... the fwrite operation that precedes it is a blocking one. The only way a blocking fwrite can return something other than the number of bytes written (equal to the expected length because it's blocking) is if the pipe is somehow broken.
 
lol sent a client an email saying test away, who fw'd the message to two guys saying test away. They have now fw'd it to another person asking them to test :P
 
user895378
And if the pipe breaks is_resource should return FALSE
 
3:48 PM
@rdlowrey Yeh but pipe is broken !== !is_resource() - the type of the zval is still IS_RESOURCE, even if the associated data is borked (I think)
 
user895378
I'm pretty sure that with socket streams is_resource returns FALSE once the connection is broken.
 
tbh it's pretty likely that the only way that code path would be reached is because of an interrupt anyway, so this is probably somewhat academic
 
user895378
Yeah, it would have to be a pretty crazy scenario for that to ever happen anyway so I don't think it really matters.
 
user895378
I should probably just do away with the is_resource() check and exit(1);
 
@rdlowrey I would say so, if you hit that code it's going to be unrecoverable, keeping the loop going conditionally doesn't make a lot of sense
but you may be right about is_resource, I thought it was just an comparison of the zval type but there's a check to make sure that the resource type is sane as well
 
4:22 PM
Yay, finished creating triggers to handle all foreign key constraints manually
 
@ICanHasCheezburger I always have food associations everytime I see you. :Ь
 
lol mission accomplished
 
@Fabien wait, I just looked at the code, and I'm not even sure what to think
 
@ICanHasCheezburger Well, I am really hungry, so not sure if you chose your mission properly. :D
 
4:33 PM
@Leri Guess I need a more foodie name then
How about ICanHasJuicyCheezBurger
 
@ircmaxell Badly implemented functions that are limited so class's scope. :)
 
they will probably ban me from stack for driving ppl food crazy XD
 
@ICanHasCheezburger /me won't even be sorry because of cannibalism
 
Wondering if @ICanHasCheezburger is the weird English person that moved to Neaples
 
@Leri EEKS!
@Ocramius Erm, sorry?
 
4:36 PM
People change nickname too often :P
 
I was user007 before :cool-smiley-here:
 
Legal PHP 5.3: "break rand() % 10;" It breaks out of a random number of loops.
 
ooooh
 
Off to home. Later.
 
@Leri ciao
 
4:45 PM
@Ocramius I'd move to Nipples given the chance
 
HAHA
 
But I think you are probably referring to @AlulaErrorpone was @SuhosinPony and was something else before that
 
*waves*
 
ummm
 
Sweetie Belle
 
4:48 PM
That's the badger pony
 
@ircmaxell that's nice :-)
 
@bwoebi meh
should have used mt_rand() ...
 
@NikiC that's too advanced. I prefer predictible results
 
user895378
@bwoebi Am I the only person who can't build latest 5.6/master because phpdbg is broken?
 
4:53 PM
@rdlowrey at least on travis it builds…
 
user895378
hmm ... lemme keep trying and make sure I'm not doing something stupid
 
try making twice maybe? (yes, seriously)
 
Once... twice...
 
user895378
@bwoebi Sorry for wasting your time. /buildconf --force fixed it.
 
hrmpf
 
4:55 PM
@Fabien Three times a lady
 
Thank you @DanLugg :)
 
@rdlowrey btw. phpdbg is no more built by default… needs --enable-phpdbg flag set.
 
^^ Much relate. Such Newman. Very humanity.
 
user895378
@bwoebi good to know, thanks.
 
4:59 PM
just in case you're wondering…
 
5:30 PM
git.php.net/?p=php-src.git;a=summary what did happen here… old layout!??!
 
5:45 PM
hi
 
evenin'
 

« first day (1284 days earlier)      last day (3655 days later) »