« first day (955 days earlier)      last day (4215 days later) » 

16:00
anybody read this conversation: happybearsoftware.com/… ?
Was I wrong to downvote stackoverflow.com/a/16786167/871050? I don't feel an answer with globals + regex for HTML without even mentioning either of the two is bad a "helpful" answer.
regex for html :) -1
but @DaveRandom I can't do that here because our internal server is not setup to allow includes outside the doc_root.. anyway, this system i am creating can only be seen internally. now my problem is how do i do that. I'd like to put all files concerned with one module inside one folder.
at least he fixed the globals
ah, @reikyoushin: ftp with only access to the doc_root
sucks :c
well if it's all in one folder, use htaccess to prevent access to that folder
@DaveRandom the structure is complex because i obtain it from amazon
16:05
@NikiC a lot
@reikyoushin OK well in that case I suggest mod_rewrite over mod_alias, and I also suggest returning 403 instead of 404 because that is what is semantically correct for what you are doing (it's not that it isn't there, it's that you aren't allowing access to it). I'd go with something like:
19 more (after this last one)
RewriteCond %{REQUEST_URI} !\.(css|gif|jpg|js|png)$
RewriteRule .* - [F]
A lot of websites (not that it's correct), serve 404 when accessing php files, which is better imo
@Gordon btw, now that I think on it, why do the tag badges require minimum answers? Isn't having a few high quality answers a good thing?
16:06
php classess that is, which makes sense because the user shouldn't know that it exists
@Manoj Then it probably can't be sensibly represented as a CSV file, whether you do it manually or otherwise...
@NikiC I think there should be a minimum number of answers
@DaveChen jsut keep your code outside document root ..
@DaveChen That's basically security through obscurity though (i.e. pointless)
@tereško: in a situation where you only have access to the doc_root that is :)
16:08
@ircmaxell Why? I assume there is a reason behind it, just eludes me right now ^^
354
A: Why is processing a sorted array faster than an unsorted array?

vulcan ravenIf you are curious about even more optimizations that can be done to this code, consider this... Starting with the original loop: for (unsigned i = 0; i < 100000; ++i) { for (unsigned j = 0; j < arraySize; ++j) { if (data[j] >= 128) sum += data[j]; } } With loop...

@DaveChen in that case you should change hosting ... seriously
a question like that doesn't necessarially imply a good working knowledge of that tag
not me!
16:09
@NikiC if we would award badged based on rep alone, you can provide one quality answer about a singular topic in that tag and get a badge. not what the badge is supposed to represent I guess
then again, I think the current count is too high, but I'm not complaining
I've been shorted 8 bronze and 1 silver, due to answer requirements
@ircmaxell @Gordon makes sense
Actually, with , I'll likely qualify for silver before I even get bronze
263 × 7
@ircmaxell it might be too high for tags that are topically small. Like . There is simply no 100 unique problems for that to answer.
16:18
0
A: error while trying to run MapReduce job using eclipse Indigo

venuktanYes Tariq , Java does unite people from different languages.

^^ that's great news!
@Gordon Perhaps reduce the number of required answers?
@Gordon but @tereško is making good progress in that tag ;-)
user895378
good morning/afternoon/evening/whatever
@Gordon My suggested edit was accepted. Then someone who accepted it took the credit on the post... What gives?
16:27
@LeviMorrison not my decision. ask on Meta :)
alo me lords and ladies and mostly lords
Maybe make it proportional to the rate of questions being asked. Although that still probably wouldn't help with stuff like where there are all sorts of questions that have very little/nothing to do with the tag subject matter
<kbd>lol</kbd>
oh it doesnt work
:(
user895378
@DaveRandom Are you aware of any way to bind a name to a socket using socket streams? Normally you would call socket_bind($sock, $name) before connecting, but that's obviously not an option of you're using stream_socket_client ...
i have a question i really need to ask
what doest this do
16:29
@Jimbo he made more changes to the post ... i don't see anything wrong.
`key = 122;

if(key%10 < 4 || key%10 >7)
lsb3 = 0;
else
lsb3 = 1;`
lol @ accepted answer score
-8
A: Copying a file in sftp with jsch library

Praneeli solved it .. i just used the built in functions..it's same as the ftp connection.. any way thnx

@rdlowrey A name or an IP? Are you trying to bind a client socket to a specific local address?
@Jack I do. He added a comma, and removed "I need some help". That is it. After it was accepted by community. If I made such a minor change, it would get rejected. Joke. Now any +1's he gets some rep too.
user895378
@DaveRandom An IP, but yes, that's what I'm trying to do.
16:30
@Jack yes and I think he knows my opinion on it :)
@Jimbo wait, what? how does he get rep on +1's?
@Jack I thought that if you edited something you get a share of the +1s, am I wrong?
user895378
@DaveRandom Dah! I should've been able to locate that myself. Thank you :)
16:32
@Jimbo You get +2 for the edit and that's it I think.
hrmmmm il wait
@Hanut That's not PHP.
user895378
lol, maybe the worst proposed tag wiki edit of all time:
@Jimbo I dont understand. what do you want me to do?
user895378
user895378
16:36
Not sure why I find that funny but I do. Do people actually use MS Access in the real world?
@rdlowrey Yes
I have
I've done stuff with Access at 2 previous employers
I, depressingly, currently do.
@jack it could be any language
user895378
16:37
Wow, I had no idea people really used Access. That sounds terrible.
One was a much larger company that probably should have been ported off of it and onto something a little more performant
@rdlowrey I have, too. We built an Inventory Manager on Access and VBA. And I use the OOO equivalent to write invoices.
well
I've seen VBA implemented e-commerce management solutions utilize MS Access
user895378
Also, @cspray don't have a good excuse for not reviewing your stuff yet. I am going to do it though.
16:38
@rdlowrey You cannot even begin to imagine. It's like developing winforms applications in VB6, only someone removed most of the already sparse good bits.
@rdlowrey there's a local company here that makes hundreds of thousands by building programs within access (all VBA and macros)
@rdlowrey Again, no worries. Just having a life is excuse enough for me :P
I kinda feel guilty, basically "forcing" you to read something you may very well not be interested in
@Gordon I find the Open Office (or libre office) equivalent of Access (I think it is called base?) to be the worse project in the suite >.<
Access is painful enough.
user895378
@cspray Don't. Sometimes I overestimate the amount of free time I actually have. And with things like Memorial Day I might plan to do something productive then fall into a black hole of BBQ ribs and bottomless beer.
what was the purpose behind making access?
16:40
@rdlowrey Yea, I don't blame ya there
Bottomless beer sounds pretty good actually
anyone know how to quickly preg_match only the '\' character?
I find it odd, of the 3 answers I wrote today, not a single upvote... Granted, one was semi-trolling
@CarrieKendall There really is no excuse for that. It's considerably more difficult than writing .NET GUIs. It should be the reserve of people operating on a shoe-string budget, having a professional development company use it as a platform is totally unacceptable.
@rubberchicken preg_match("(\\\\)", $str)
@rdlowrey I managed to completely avoid BBQ. It always tastes so good but I always feel so terrible afterwards.
user895378
16:41
@LeviMorrison I don't try to restrain myself on holidays at all.
@LeviMorrison it ain't spectacular and I never figured out how to use the forms properly. I just use it to store my clients addresses and then fill that into my invoice templates.
@ircmaxell You seem to have forgotten how PCRE /works/ :-P
@DaveRandom () are valid delimiters
Stand back! :)
Don't they have to both be the same though?
16:42
@DaveRandom Nope, just like { and }.
All frameworks exist in a state of awesome until observed, in which case they collapse in a pile of crap. #FRAMEWORKS #PROGRAMMING #WEBDEV
4
yeah... parens work
w00t!
16:42
@DaveRandom :-D
user895378
@ircmaxell lol
@ircmaxell This is a great quote
@ircmaxell hehe
Excuse me, PHP manual is presently down, so I thought I'd ask. Is there a function that the contrary of mysqli->real_escape_string() ?
contrary?
16:43
if (preg_match("(\\\)", $password)); is blocking every password also
@Ariane As in un-escape?
user895378
@Ariane http://us.php.net/ <--- not down.
@rubberchicken you need 4 `\'
@DaveRandom shrug, its a matter of opinion... one might argue there's no excuse for abercrombie & fitch selling their crap clothing at an unjustifiably high price, but they do and they're successful
16:44
weird there is 4
user895378
If you think it's down, just try another mirror.
@LeviMorrison No no, the real unescape_string().
but when i pasted here it deleted one
@rubberchicken Yeh that's identical because of the way PHP handles invalid escape sequences
wait, why are you testing passwords with a backslash?
16:44
@rdlowrey I assure you it's doing nothing but infinite loading to me. It was like that yesterday. Someone said it was down but it was fine for me.
@Ariane or use docs.php.net
i prefer \x5c
@Jack markdown fail\
@Gordon Ooooh, thanks
@kaᵠ you would
:-P
16:45
@ircmaxell hehe nope. intentional.
user895378
strip_slashes()! All of the things!
too many (back)slashes are bad for ze eyes
if someone accidentally puts the '\' character in their passwd when logging in - it breaks sql and shows error
=O
@ircmaxell re: crutch. fair enough
16:45
@Gordon Crap. I got the search page, but trying to click a result is infinite loading as well.
@kaᵠ Yeh, and hex literals are sooo much better :-P
ehh... hex is geeky :P
> In addition to the aforementioned delimiters, it is also possible to use bracket style delimiters where the opening and closing brackets are the starting and ending delimiter, respectively.
dafuq
docs reading fail
Replace all backslashes with DIRECTORY_SEPARATOR.
16:47
@Gordon I didn't mean it to be so black and white. I was more referring to the tendency of new questions of "fix it plz"
or "send the exact codes pls"
@rubberchicken that's a fail on so many levels
don't store passwords plain text
Hey, we were talking about access a moment ago, let's not forget the beautiful VB escape syntax: """double quoted"""
i know but i didnt build the php app
and i dont have time to re-code it
i have to quickly fix the small bugs and move onto other projects for this company
recode all the things!
16:48
@ircmaxell yes and I fully agree to that. like I said: spoonfeed nay. guidance yay!
user895378
@DaveRandom I knew Python docstrings came from VB!
user895378
lol python === VB.
@rubberchicken what's the company you're working for?
@rubberchicken and storing passwords in plain text is not a small bug, it's a massive one
:grin:
16:49
microsoft
lol ;)
you wish
not really
@Gordon Tried a few with the same result, but well... I guess I'll try stripslashes and see what it does
@rubberchicken That's really not even slightly an excuse. Firstly that's not a small bug, it is a ridiculously large security flaw, and secondly the amount of time require to fix it is less than the length of time it took me to write this message.
new approach: what's the url @rubberchicken? >;]
16:50
yes i agree
@rubberchicken well.,. users have to know where they can safely login, so if you're gonna leave the passwords in cleartext, at least tell us the company/website so we know
its internal
this is why its not a big deal (what the management thinks) with the security holes
i've already told them about how badly this app is coded and outsdated
@rdlowrey Holy crap. What the hell were they thinking?
oh internal, of course those sites never get hacked (rolls eyes) no offence.
the passwords are not in plain text
user895378
16:52
I love python ... but it makes me laugh to see a parallel like that to VB :)
they are encrypted
Well why are they being sent to the database in plain text then?
@rubberchicken so then, what happens to the backslash?
it looks like the database is encrypting it
=O
16:53
@rubberchicken it is always a big deal
MGE
MGE
Hello, I'm resizing images but how can I save the resized image replacing the original? pastebin.com/RWz8LpYR
its not up to me
@MGE imagejpeg().
if it was, we wouldn't be using this tool to begin with
MGE
MGE
@Jack Im using imagejpeg but it doesnt replace
look pastebin.com/RWz8LpYR
16:54
brb
@MGE Ummm.... just don't pass null to the path argument then?
@MGE and you think null path would really work?
MGE
MGE
If I use $src
@DaveRandom how do you specify 403 on a rewrite rule then?
MGE
MGE
it doesnt show the image
        imagejpeg($dst_r,$src,$jpeg_quality);
16:56
@reikyoushin That's what [F] does
@DaveRandom and if its 404?
You mean if the URL really doesn't exist?
if instead of [F] i want to return 404 even if it exists
MGE
MGE
@Jack if I use imagejpeg($dst_r,$src,$jpeg_quality); in jpeg filetype it save but it doesnt appear, but if I use the same in png file it doesnt work.
@MGE You can't do both in one operation. You need to do both. So just add another imagejpeg() line, or preferably write it to disk and then to readfile($src);
16:59
@DaveRandom i will think about my structure though, but till then.. id stick with this temporarily..
@reikyoushin Why not a 403? You don't gain anything by sending a 404 instead of a 403, it's better to send a semantically correct error code...
That argument of "but then people know the file exists!" doesn't make any sense, before you say it
:-P
MGE
MGE
@DaveRandom imagejpeg($dst_r,$src,$jpeg_quality); working with jpeg files, how can I do the same for PNG files
...
Try reading the docs for imagepng...?
;-)
MGE
MGE
imagepng() 0 bytes LOL
@DaveRandom That argument of "but then people know the file exists!" doesn't make any sense, before you say it <~ made me laugh. lol. thanks!
17:05
@reikyoushin Just think of it this way: They can't get access to the file. The only way they could get access to it is if they hacked your server, in which case they will be able to look at all the files on the server, and chances are you'll have much bigger problems ;-)
does anyone here knows the OpenERP software?
@Jack if that tag would be trimmed (retagging all the unrelated posts, removing closed ones) would end up with ~4000 questions .. maybe even a lot less
@tereško what can i say, it's a challenging tag :)
@DaveRandom well, at least they don't know which files can be vulnerable (though i shouldn't have made them so in the first place.. haha)
Right I'm heading off, catch y'all in a bit
17:10
i have already removed something like 5k posts from that tag
thanks @DaveRandom! see ya!
@DaveRandom cya
Hello
How do you get last modification date of a folder via Windows command line
17:22
php -r 'echo filemtime($argv[1])' =D
@Gordon All the solutions would either list all files or all folder ....
@Jack lol
dir <specific-entry> doesn't give you one entry?
@Jack exactly .. but i want only once entry ... last modification date of a single directory
Anonymous
In PDO, is there a valid purpose,( from a security perspective, ) as to why we use bindValue() instead of just using name holders like ?,?,? and doing only execute(array()) ? Aside, from the fact stated in wiki.hashphp.org as "Now if you have lots of parameters to bind, doesn't all those '?' characters make you dizzy and are hard to count? Well, in PDO you can use named placeholders instead of the '?':"
@phpNoOb Yeah, you can set the type explicitly when using bindValue().
Otherwise they're just strings.
Anonymous
But it does not matter,to what you set the type
if it doesn't matter, it doesn't matter.
Anonymous
Name holders as secure as the later @Jack
@phpNoOb you don't have to tell me that.
Anonymous
17:29
I am saying, what is the purpose of stating the type?
some people like to coerce their variables into the designated types.
Anonymous
@Jack I am not trying to teach you, I am just asking
from a security perspective there is no specific advantage
then use more question marks in your sentences =p
Anonymous
Ok, so it just for readability/convenience sake?
17:31
guess so.
@Baba hmm. any of these? ss64.com/nt
Anonymous
Hmm, why even create that, it does not make any sense to specifically specify, what the variable is, it is just weird. I thought, I was missing something big
perhaps it depends on where the conversion should take place.
@Gordon there is Change file timestamps but no get file timestamps
@Gordon why would such a simple task me so difficult .. have tried all the commands i know
Because ... it's Windows!
17:35
@Jack wow
@Baba try dir /T:W /A:D Folder*
@Gordon Yes it would list all direct in Folder* with their time
@Gordon Instead of just the current date and time of of Folder*
@Baba can you use PowerShell?
if so, do Get-Item FolderName | select LastWriteTime
@Gordon one moment
@Gordon Thanks .. But PowerShell requires installation
stackoverflow.com/questions/16798289/… ... adding to the queue, nothing urgent
18:06
How to start debugging php code in aptana ??
you will need to configure XDebug for that
One of the best sessions at #drupalcon by far http://www.youtube.com/watch?v=fnRwfjMqKM8 /cc @ircmaxell
Probably mentioned, php.net being weird?
i personally see it as "too much effort to bother"
A 3 day conference, with 8 tracks, and my talk being called "one of the best sessions"... :-D
18:11
@ircmaxell woohoo yt
@SteveRobbins yeah , the international site seems to be semi-broken , i have been using uk.php.net whole day
Any indication to what's going on
Arg... Ok, I'm not building this XML validator anymore... too much of a pita
@teresko when i tried to debug using firefox aptana throws error
Socket connection error. Please try shutting down and restarting your web browser, and then run 'debug' again.
Accept timed out
is your webserver running xdebug ?
is the remote debugging option configured for it ?
18:15
yes
it is configured to use port 9000
@SteveRobbins The Chinese developed a strong interest in the strip_tags function ;)
@SteveRobbins other mirrors are working pretty well, us2.php.net is up
18:42
the makes me sad
-1: the original poster tagged it as "OOP" not "procedural". — tereško 41 secs ago
In my database, I have this content:
<p>(Aucun contenu pour l'instant)</p>

Which I send to my page with the following form inputs (in two steps, because there's a redirect):

<input type="hidden" name="content" value="'.htmlspecialchars($value_child['content'],ENT_QUOTES,'UTF-8').'" />
<input type="hidden" name="content" value="'.$content.'" />

Then I put it in my TinyMCE textarea like this:

<textarea name="newContent" id="tinyMce"><?php echo htmlspecialchars_decode($_POST['content'],ENT_QUOTES); ?></textarea>
@ircmaxell did you find out what caused the drop in drupal charts? i am curious
@Ariane off the bat it looks like an escaping/encoding problem, seems you are using htmlspecialchars_decode on the text area but only htmlspecialchars in the hidden inputs
@Daniel But if I decode it in the hidden input, it's going to break my HTML because it contains HTML.
18:51
@CarrieKendall it was their branching of 8.x and dropping of a particular subset of code (which was added back in later)
@ircmaxell makes sense, why wasn't that easily detectable?
I didn't dive into it
@ircmaxell okay, no worries, neither did i, just curious
@tereško I want to reply to the question, but I am afraid of what I would write
@Ariane where exactly is it showing up with the tripple backslash?
@tereško I think I understand why you're so angry all the time :/
Anonymous
Because he is the HULK!
lol sup @phpNoOb
@phpNoOb Naa, 90% of the JavaScript questions are people not understanding basic design patterns or language features, and often they get really bad answers. I can only imagine how PHP looks like
Anonymous
Hi @Daniel
@Daniel In the TinyMCE textarea. Also, I saved it again from the TinyMCE textarea, without removing the slashes, and in the database, it now looks like this:
<p>(Aucun contenu pour l\\\\\\\'instant)</p>

and if I open it again in TinyMCE, then it shows up like this:

(Aucun contenu pour l\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'instant)

If I remove all of the slashes and save it again, now, the database contains this:
<p>(Aucun contenu pour l\'instant)</p>

And if I open it in TinyMCE, then I have this:
@ariane that's definitely an issue with the decoding/escaping, I'm not sure on exactly how it will need to go though. you may want to try searching for tinymce decoding, should hopefully be some examples out there for you
Anonymous
@BenjaminGruenbaum same here. I've been playing around with PHP, still feel so noob
@Daniel It's not TinyMCE's fault. If I render the text in a naked simple textarea I still have slashes. o:
@ircmaxell i stopped reading at sha256+salt password encryption.

« first day (955 days earlier)      last day (4215 days later) »