« first day (1382 days earlier)      last day (3792 days later) » 

12:00
Not unless xn--foo is a valid punycode label
It is officially reserved
Of course that doesn't stop people doing it, but it will cause problems across a wide range of client apps, not just PHP
A single memcmp and if (byte & 0x80) { at each step are all you need really
Well, that said, it would only cause a problem if the certificate is xn--*.bar.com :)
^ which is implicitly disallowed by the A/U-label limitation
(I think)
anyway, need to some work, bbiab
cya
@DaveRandom sigh.. "work" - such a poor excuse for leaving chat
I've figured it out my problem, mysql remains the best. =]
So if in my database i have chars like: ă,î,ț,ș
what do i need to write in my code in order to get and match with chars like those:
for example: www.mysite.com?question=Câți din
but if im sending it that, it will be replaced like www.mysite.com?question=Câți%20din
and will find no matchesin db, and however, if im getting through id, i will
get "?" instead of those chars. can someone tell me what function do i need
to write, in order to get and match with clean strings?
12:13
mysql is also deprecated; surely, you didn't really fix anything.
I think questions should be in 1:N relationship with answers on SO, would simplify life for newbies. I wonder if anybody thought about introducing question-simlinks or something like that.
wud?
i only need to get a value from a column
but to have those chars
with get method it puts %20
and i dont get any matches in db
$question = sanitize($_GET['q']);
$result = mysql_query("SELECT `answer` FROM `tip_question` WHERE `question` = '$question'");
@Jack can you help me fix my problem? and i wont bother you again
Hmm, the current implementation of strtok() is non-reentrant .. that's not nice =/
i dont know what does it means
12:17
@KraziiKiiD sorry, i don't help with mysql_ questions.
but i tried with mysqli too,
why no one can help me?
is too hard for you guys?
well, have you considered asking a question on the site?
Why anyone must help you?
i just wanted a solution code to my problem, cus nothing of what i have triedis good
and since this is a room for php, i thought the people from here will help others
"gimme da code" is a very poor sort of questions. Nobody likes that.
12:20
@KraziiKiiD No, you are doing sh*t but we don't. Sorry to be rude but your attitude deserves one
i know but what should i do then?
we help those who can help themselves ...
Think
@Leri i didnt do anything just asking for help
@KraziiKiiD It matters how you do it
12:22
allright no one can help me and no one will, cus you guys are too smart for my question, right?
sigh, let's not beat around the bush here ... @KraziiKiiD ask a question on the site first and wait for a while.
just to get minus 100 from you guys and not to be able to login back here?
@KraziiKiiD No, nobody will help you because you can't listen and understand what others say
@Leri cus no one says anything just yelling and making sh*ats
you alle are friends, and if some one new comes for your help, you just kick him out
@KraziiKiiD You were told what you are doing wrong if you listened, you should have fixed your problem. :-)
12:25
2 downvotes and you lose chat privileges... Maybe you should try listening to people (and build up some rep by asking good questions/giving good answers)
It's hard to talk with someone who does not want to realize and fix mistakes.
just to use mysqli instead of mysql, and when i told you that doesn work either, you were do the same
Just describe your problem in SO question and it will be much much easier for you.
@Ivan0x32 i will describe it again, and take a look what Jack and the others will say
In SO question, not just here.
12:27
@KraziiKiiD
E_I_GIVE_UP
@KraziiKiiD people told you to use pdo and prepared statements, yet you still post mysql_ code. You clearly are not interested in our input so please don't waste everyones time
@Ivan0x32 no because all from here will give down votes
@KraziiKiiD If it's a bad question it will receive down votes.
so make it a good one.
here should be a hacker, to bring down this php room, cus is a fake one, with fake people
bye
12:29
oh, thou really cracketh me up.
user1804599
@KraziiKiiD haha
user1804599
You keep being funny.
@rightfold are you really from north korea? :)
user1804599
No, of course not.
user1804599
I would die if I visited this website from there.
12:35
heh
Except if you're Kim Jong-un.
the public internet is only accessible to a smaller group of people, for sure.
> From February 2013, foreigners can access the internet using the 3G phone network
that's good news :D
hello everyone :) a small doubt
@KraziiKiiD I've just got over my existential crisis and you come out and tell me I'm a fake person??? You are undoing years of therapy. Or maybe I don't exist so the therapy didn't really happen.
@Jack Reasonably sure that "internet" should be in quotes there
@DaveRandom You mean it undid years of fake therapy? ;-)
12:39
is it better to use serialize() function to send data to a php page or should i rather just mention the key and valuee pairs manually?
@N0062eclipse It's extremely dangerous to unserialize() user input, it is likely to result in RCE flaws
well, it could be mitigated by signing the content.
Why would curl execute in the background by default for certain requests, but not for all requests?
eh?
what do you mean by "background"?
Not talking about PHP here :P
curl http://qa-mode-src5/libtrc/index.php?publisher_id=affiliate-a-sc-only&component_‌​file=configuration.6152925-backup.js
executes in the background while
12:43
@SecondRikudo because you're a linux noob
curl http://icanhazip.com executes in the foreground
put quotes around the url.
@Jack I totally am
@DaveRandom by using serialze() if the user has left a few fields blank, will my php page still work with it?
the & is used to background a task @SecondRikudo
12:44
@Jack Aha! lol
using serialize() seems to be much easier for forms with lot of fields.
@N0062eclipse the browser serialises form fields quite well.
@jack i dont quite get you, Note : I am not a jquery or php expert :)
@Jack another question if you may
I'm not sure if this behavior is caused by our code, or by some linux magic
echo "calling curl  http://$FIRST_SOURCE_SERVER/libtrc/index.php?publisher_id=${PUBLISHER}&component_file=configuration.$REVISION-backup.js"
TRC_PROPERTIES=$(curl "http://$FIRST_SOURCE_SERVER/libtrc/index.php?publisher_id=${PUBLISHER}&component_file=configuration.$REVISION-backup.js")
This is part of the .sh file that does some magic
$.ajax({type:'POST', url: 'jQuery-ajax-demo.php', data:$('#ContactForm').serialize(), success: function(response) {
$('#ContactForm').find('.form_result').html(response);
}});
12:48
The way it looks like in the console is like so:
any bettter way to do this :P
calling curl  qa-mode-src5/libtrc/…
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:09 --:--:--     0
And this % Total etc get updated once per second
@SecondRikudo Yeah, because curl uses stderr for that.
@Jack Okay
So now I need to figure out why when I curl manually it works nicely, but not when it does it from the sh file
hmm? how does it not work from the script?
12:51
@Jack For starters it hangs. For exactly 60 seconds
that would indicate DNS lookup failure.
^^ guess
@Jack But ping to that machine works fine.
Even better, the exact same curl to the machine only with the variables replaced with actual values works fine.
well, qa-mode-src5 doesn't look like fqdn to me
@Jack It's an internal network kinda thing
hmm, it should print an error to the console if anything went wrong, though.
12:53
Nothing, and the file doesn't get created because I get an error for the cp command that arrives afterwards
Alternatively, run with curl -v to use verbose.
@SecondRikudo how are you using cp because curl doesn't create a file for you, it saves the response body in $TRC_PROPERTIES.
DNS wanker
@Jack The file is created on the remote server
Which the sh file then ssh into and try to cp
I didn't make it, don't yell at me.
oh, so the request is not made (according to the server)
12:55
right, so use curl -v URL then.
Already on it
it should output a shitload of info.
calling curl  qa-mode-src5/libtrc/…
* About to connect() to qa-mode-src5 port 80 (#0)
*   Trying 192.168.10.220... connected
* Connected to qa-mode-src5 (192.168.10.220) port 80 (#0)
> GET /libtrc/index.php?publisher_id=affiliate-a-sc-only&component_file=configuration.6153019-backup.js HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Gateway Timeout
wth
@PeeHaa Busy? :)
@SecondRikudo well, there you go.
12:57
But why? It doesn't do it when I curl the exact same address manually!
on the same machine? that exact same command?
run curl -v manually then and compare the request portion of the debug trace.
there must be some difference.
lol now I get 504 when I run it myself
13:07
Spent ages trying to fix a drupal module for printing a report. End result.. I commended 80% of it out and wrote it my own way.
@Fabien The story of my life, hahaha
So now I am confused
@HamZa Are you planning to implement something?
@NikiC Nope, I was just interested. I will try to fiddle around and see if I can implement something not-useful. I thought maybe a new operator / syntax. But it's still a vague idea
13:15
@SecondRikudo yeah, you just said that you saw the 504 when you did it manually :)
@Jack But now I don't again!
I'm losing my mind!!!!
sigh
I take it that nginx forwards to php-fpm?
I think I know what's going on though
@Jack I wish
It's nginx with php 5.1.6
oh, so regular cgi then?
I believe it is
13:16
@Fabien Yes. Now it's my time to let you wait ;)
@SecondRikudo well, that's fine .. so my guess is that the remote php script is taking a longer time than expected?
i meant, sometimes.
@PeeHaa lol sorry I was dragged in to a meeting :p
@Jack Yes, seems like it
Seems like creating that file is what taking all the time
@Jack If it's 5.1/cgi it's possible it's just a bug in cgid @SecondRikudo
@NikiC you think it's worthwhile to write an strtok_r() equivalent in php? :)
13:18
nginx drops the request, but the file is created eventually
Reasonably sure there will be an nginx gateway timeout value you can just increase @SecondRikudo
Which then causes the request to run normally when I do it (because it presents the file if it's available)
@Jack is that a reverse strtok?
@SecondRikudo then you should let nginx wait longer heh
Never looked, never needed it
13:18
@NikiC hmm, no, it's the reentrant version of strtok() :)
If something is taking that long it's probably better to hand the task off to a background process
@Jack No, I should kick the guy who made the script to generate the file with O(n^3) of queries in the face.
@SecondRikudo O(n^3) is still better than O(2^n) heh
@Jack We have those too..
Just not this particular one :D
Good morning
13:22
hullow :)
@SecondRikudo you make me think of some code I saw
the search was very slow. Indeed, it took almost 30 minutes to load the page. (yes, 30 minutes.)
we found out that the page ran from 200 to 300 thousands queries on each page load.
@Jack n=2 and I beat you :p
Morning @ircmaxell
=.=
well, that's correct for n<10, so..
13:25
@AlmaDo again .... =.=
user924016
@FlorianMargaine insane
@ircmaxell hey, do you have a few mins? i would appreciate your opinion on a matter i'm about to revive on internals.
ehm, not sure whether 'yes' or just '...?'
@Jack ah, i see. I don't have an opinion on that, as I don't use strtok and am unlikely to ever use it
13:29
what's the question/matter?
@RonniSkansing yeah. When reducing to 40 requests, the page loaded instantly.
@FlorianMargaine that's really awesome =)
@ircmaxell it's about whether, if i were to make $a = false; ++$a; var_dump($a); output int(1), a warning or notice should be raised to warn the developer about potential misuse of ++.
or rather, implicit cast to int.
well, that's part of a bigger question on how to handle implicit vs explicit casts
it does have some touching points, yeah.
it wouldn't be unlike "array to string conversion" warnings.
my current rfc doesn't actually touch on the potential issues with allowing to increment/decrement booleans ... but after having thought it over some more I recognised a need for it.
@NikiC fair enough :)
user895378
13:39
@tereško Yeah it's static and I just don't care. It doesn't need to ever be mocked because failure can be induced by passing in a specific string and the cookie RFC is overcomplex and not subject to change. So I'm not bothered by it :)
@rdlowrey it's static, and like 1000 lines long
user895378
@tereško Meh, parsing code is always ugly (unless you don't care about performance). I'm surprised it doesn't have goto statements too :)
can we haz gotos in the next version?
user895378
13:42
@Jack, are you saying you're experiencing E_NOT_ENOUGH_GOTO? :)
@rdlowrey a parser simply isn't complete without a goto.
goto hell;
hell: continue;
user895378
1 hour ago, by Krazii KiiD
here should be a hacker, to bring down this php room, cus is a fake one, with fake people
user895378
^ wow
13:44
yep, we're all mean bots
user895378
<-- bot
user895378
@DaveRandom and @Danack This composer.lock stuff still seems very fishy to me. I'm leaning towards not including it in my repos. It's worse than submodules. I shouldn't have to do composer things before commiting the repo to my git to not break stuff.
user895378
If you follow semver it shouldn't matter, right?
@rdlowrey hmm, composer.lock only updates when you run composer update, though; i always include it in my projects.
for one, it speeds up installation :)
@rdlowrey this
13:48
secondly, no communication to packagist required.
The problem with that, though, is the fact that we have deps that don't
user895378
No communication to packagist is needed anyway
@Fabien :-)
@rdlowrey not needed, but will happen if there's no lock file.
@PeeHaa :-) free or :-) back to work :p
13:49
Yeh but repos in composer.json are somewhat unreadable IMO
@rdlowrey Do you have a link to that code? I want to see some horrible @rdlowrey code...
user895378
@Jack Not if you use the "repositories" key to link to the specific git repo (which I always do).
Maybe we should just specify commit hashes in composer.json
@rdlowrey oh, right .. didn't know that ;p
13:50
That way issues like what happened with predis can't happen either
user895378
@DaveRandom So you mean, like what submodules do by default?
unless some fucker actually deletes a commit, but then we're screwed anyway
user895378
This is why everyone should use submodules
user895378
Composer is only easier because more people use it and therefore you have broader compatibility.
13:51
@Fabien Back to work
Stop slacking then :P
@rdlowrey Y U NO ACCESS-MODIFIER? :Ь
@rdlowrey Awww, now I'm disappointed. I took the 1000 lines mentioned by @tereško too literally...
@rdlowrey I don't entirely disagree, but the fact that it would be possible for me to end up with two different versions of the same repo doesn't sit well with me
user895378
@NikiC yeah no it's only hard to read because it's hard to descriptively name what you're doing when parsing a cookie string
13:52
@tereško This world is evil, those poor people...
user895378
@DaveRandom that seems like a composer failing though. The composer.lock only creates confusion (for me)
Committing composer.lock to a lib repo doesn't seem to make sense to me (I get it with application repos)
@rdlowrey ^ this may be why. You and I generally write libs, not apps
user895378
Probably.
user895378
Composer is only used to retrieve dependencies.
user895378
It should not be used as a production deployment system
13:54
Regardless, we need an agreed workflow and we all need to stick to it because this is getting ridiculous.
user895378
Yeah I couldn't even make my code work locally because composer wouldn't give me the version of the dependency I needed. Had to manually copy/paste the files into the stupid vendor directory last night.
user895378
My vote is to not commit composer.lock and if it causes real problems then we can revisit the idea at that time. Seems like a YAGNI situation right now.
OK well my vote is to not commit composer.lock, and to introduce a rule that deps must be specified either as a specific release/~release rule (semver only) or as an exact commit hash
Stuff like dev-master and pointers to specific branches are asking for trouble
13:57
You have a link to the trash all messages by a user script?
Hi guys! Check out this useless 404 page not found Simulator: http://www.404simulator.com
Feedback are appreciated, share if you like it
composer supports exact commits in the composer.json spec?
I think so, one sec
> require and require-dev additionally support explicit references (i.e. commit) for dev versions to make sure they are locked to a given state, even when you run update. These only work if you explicitly require a dev version and append the reference with #<ref>.

« first day (1382 days earlier)      last day (3792 days later) »