« first day (1053 days earlier)      last day (3910 days later) » 

12:00 AM
@JoeWatkins what's the point of democracy?
also, why are you assuming that everything the community can come up would be unreasonable?
 
this isn't a democracy, fuck only knows what it is, but a democracy has a clearly defined well organized and well funded leadership ...
 
@JoeWatkins not necessarily
 
@JoeWatkins there should be a leadership maybe… but not a #phpdrama.
 
good ones do ... or did ... until a few years ago ...
 
The "no funding" part may play a part in how many actively contribute, though.
 
12:02 AM
@JoeWatkins what exactly do you mean now?
 
I don't assume everything would be unreasonable, but lets be realistic, quite a lot of it would be unreasonable ...
 
@JoeWatkins so what?
after a while we would know what is unreasonable and what now.
 
brought up again in another 2-5 years but never really taken seriously ...
if you want for there to be a process where an RFC comes along and everyone sits up and pays attention, then you shouldn't squander any attention on ideas that might fail ... I just don't see the point in a list of 30 rfc's with no patch or support, or attention ... by all means working on an rfc while you rally support makes sense, but really how long do you want people to take it seriously for before it's just forgotten about, maybe
@Gordon non sequitur ... someone else implementing your ideas doesn't usually result in you learning anything ...
 
@JoeWatkins i dont need to learn C to tell you how I want to use the language
 
well no, that's established, but you just said you would learn what is reasonable after a while, how that would come about I have no idea ...
 
12:11 AM
you are viewing this entirely from the perspective of a core dev. the majority of the community is not a core dev and cannot code C, yet they can use the language and they will have ideas for it that core devs with their assumptions about what might or might not work will never have
so if someone comes along and says: I'd think it would be cool if PHP would automatically turn all data in the superglobals into variables, then a lot of us could says it's nonsense
and then we would downvote it and it would never even reach the core devs
 
well I'm not sure we make assumptions, I'm not sure that we have to even ...
 
I agree with Gordon; proposing changes to a language would reasonably require a working knowledge of that language, but not necessarily how it's implemented.
 
I never actually disagreed ... not at all ..
I've written the code for someone elses RFC before, something I wasn't interested in one bit, just because he said he couldn't ...
I'm all up for ideas coming from the community, I'm not really bothered how they get here, and quite willing to help out implementing them ...
I don't think it's much effort for anyone to go into IRC or internals (if you're crazy and have time to waste) to gather attention for an idea, draft an rfc, get a patch together and put it to the vote ...
I don't really see where the huge flaw is in that system, nor do I see a viable alternative that is actually achievable ...
 
It seems pretty reasonable.
 
@JoeWatkins the flaw is that it wont get exposed to the community but just the core devs
it has no chance to get tested against the community
and it wont foster community
and fwiw, when developers (no matters which) say: this is not possible. they are lying in 99% of the cases. what they mean is, I dont have time, I dont want to, it takes too much effort, etc.
 
12:22 AM
yeah it's not ideal, but if you ask 10,000 people a question, 8,000 of the answers are likely to be unrelated nonsense .. just actually read any long internals thread and try and pin point the part where it all turns to nonsense/bitch fighting/rehashing old nonsense and bitch fights ...
you cannot get the focus of all those people at once, it is impossible ...
 
@JoeWatkins you do realize you are on a q&a site which does exactly that, do you? :)
 
It should get integrated into every developer's favourite editor :)
@Gordon Are you suggesting we should set up php-src overflow? :)
 
one question, one answer, the person who asks the question doesn't have to try to take into consideration every single answer, use a bit of everyones ideas, they decide on the best answer ... which is what you are doing by coming to core devs before the community, getting the best possible answer ...
 
@Jack it's actually the closest thing I can think of that could possibly work. maybe discourse would be better suited though
 
@Jack I'd participate.
 
12:27 AM
I can't really help if it people are lazy, you shouldn't throw around the word impossible and I'm not sure anyone is really doing that ... at the same time, being technically impossible and being so difficult that you don't have the time or resources to research the idea are perfectly valid reasons to reject an idea, even if something is in principle possible not everything can be implemented well and not everything should be implemented ...
 
Actually, that does sound pretty good :) I've always missed the ability to down-vote Lester's emails ;-)
 
@Jack seriously, the +1 mails on internals are highly annoying. how do they even count those?
 
@Gordon I seriously hope they don't, for their own sanity :)
 
@Gordon I was just musing the other day why PHP doesn't have more companies contributing to it.
 
@LeviMorrison my assumption is because they dont have devs or don't get any tax benefits
 
12:32 AM
I'm not sure that most companies have someone able, aren't C programmers a dying breed ...
 
anyway, I am tired. am off to bed. thanks for discussion
 
Laters!
 
@JoeWatkins Dying maybe, but nothing like fortran. Keep in mind there are still a lot of fortran projects out there, too.
I don't think any new projects pick Fortran though. Not sure how many new projects really pick C either, to be fair though.
However, Intel releases all of the really big performance gains into their C and Fortran compilers first before C++.
 
12:52 AM
@LeviMorrison maybe because applications in C are often more performance critical than those in C++?
 
yeah bed time for me too ...
nite all
 
is it possible to add a certain pie of code (google analytics) to every page that gets served from the whole site? there are lots of php files, adding the code manually is kinda boring, so i'd like to do it automatically
 
@NokImchen auto_prepend_file via php_value in apache config (in virtualhost entry)?
 
@bwoebi i've no idea about that, please wait, let me google those keywords...
@bwoebi sweet..!! Btw, if i auto_prepend say tracker.php, when i open example.php, tracker.php will run 1st and then followed by example.php, right?
 
@NokImchen yes… there exists also auto_append_file
 
1:07 AM
thanks u sooo much :)
 
Say, can anyone tell me what does file_get_contents("php://input") do? I know what the function does, but, what's with the strange looking URL?
 
it's a wrapper, something like http:// or ssl://, ftp:// etc
 
it looks that way, but in this case what is it pointing to? A file named input?
 
within the memory I think, like if you take php://stdin, it would be from the user input via command prompt
 
oh, cool
thanks, I found the documentation for it
here's the link, in case anyone is interested: php.net/manual/en/wrappers.php.php
 
2:15 AM
Hi
 
@user1043793 It gives you the posted data from the request.
 
What order is right: begin transaction, try ..., catch ... rollback or try, begin transaction, catch ... rollback ?
 
@sectus I would say the former.
Because if "begin transaction" fails, you won't be able to roll back anything either.
 
@Jack , thank you. I think you are right (and me as well : ) ).
 
2:37 AM
@madara Belated happy bdae :) so even you are a virgo...
 
What's that? I only have PHPMyAdmin access. I ran it using the "SQL" tab and only get that out. — user2720360 1 min ago
phpMyAdmin
 
I think he meant console
oh no, we have an sql tab in phpmyadmin
 
=S
Hmm, VARCHAR(128) should be enough to store password hash.
 
password_hash suggests 255
 
Sure, but OP uses bcrypt.
 
3:28 AM
Which of ircmaxell's RFC's got shot down?
 
@jack why varchar?
 
binary
 
@user2429266 Why not varchar?
@Orangepill The function autoloading I think?
 
hashes are fixed size
 
Sure, you could use CHAR(xx) as well.
 
@user2429266 Also, that wasn't even my choice; it came from OP.
 
3:56 AM
@Jack is there an explanation on why it was shot down somewhere ...
 
@Orangepill It's more of a heated debate between him and Stas.
 
CAM
Hey All, anyone using ST3 on OSX?
i am having Fullscreen issues where its not doing a native fullscreen.
 
@CAM , within php?
 
CAM
@sectus any lang
 
@CAM You realize that this is a php room right?
 
CAM
4:00 AM
cmd + ctrl + f used to do a native fullscreen and add it to a space
@Jack I do, and the probability of users using Sublime text are prolly high ?
 
Let's talk about cli.
0
Q: How to launch properly php cli script in phpunit test?

sectusI need to test some php cli script which uses stdout, stderr and return error code. exec seems that it does not return stderr. system does not return stdout (only last line), stderr.

 
Why don't you ask on SU then?
 
CAM
SU ?
 
@sectus How about proc_open()?
 
CAM
or proc open?
 
4:02 AM
Yeah, that's what I meant :)
 
CAM
see I know PHP
now, what is SU ?
 
You want a medal? :)
SU = super user.
 
CAM
if you are handing em out
I have some though
 
Nah, you'd have to earn them =D
 
CAM
National Defense, Good conduct (barely )
is there chat in SU ?
 
4:04 AM
If I pass string in this way : $test = "one one two three"; is accepted but for $test = preg_replace("/[^a-zA-Z]+/", " ", html_entity_decode($test, ENT_QUOTES));. I am passing string to : shell_exec("/home/technoworld/Videos/LinSocket/b '$test'")
 
Dunno.
@Karimkhan Have you tried escapeshellarg()?
 
CAM
would it read the spaces as arg separators?
 
@Jack yes $test=escapeshellarg(strip_tags($text));
@CAM yes
 
@Jack , looks good. Write your answer and i will mark it.
 
@sectus Without an example, though, it's not really worthy of an answer :)
@Karimkhan You don't need to enclose $test with quotes if you use escapeshellarg().
shell_exec(sprintf('/path/to/script %s', escapeshellarg($whatever))) should work fine.
 
4:09 AM
help needed
codigniter
echo"<form action='test/test_submit/$test_id/".rawurldecode($testname)."' method='post' data-ajax='false' id='myForm' name='myForm'>";
//echo" <input type='hidden' name='submit' id='submit' value='true'/>";
for($i=0; $i<$num;$i++)
{
//$a=$i+1;
echo "<fieldset data-role='controlgroup' data-mini='true'>";
echo"<legend><b>$title[$i]</b></legend>";
if($image[$i]!=null){
echo "<div><img id='greatphoto' src='images/$image[$i]' style='height:5%;width:100%'/></div>" ;
}
$answer_query=mysql_query("SELECT title from test_answers where question_id='".$id[$i]."'");
 
That doesn't even look like CI.
 
how may I get $answer in controller
ya but this is the view file
 
@Hriju , it's plain old php
 
ya
Actually this was previously coded
so i did not change
now I need to get the answer value from this form in controller
 
$_POST['answer'] would work, surely.
But I'm not sure if CI has request and response objects that you should be using.
 
4:13 AM
echo"<input type='radio' name='answer[$i]' id=$b value='$answer[$j]' />";
echo "<label for=$b>$answer[$j]</label>";
I have tried $_POST['answer']
but not working
 
It won't work if nothing is posted of course.
 
ya thats the problem
nothing is posted
but why?
 
is this ok 'if (preg_match_all('/[^=]*=([^;@]*)/',
shell_exec(sprintf('/home/technoworld/Videos/LinSocket/b %s', escapeshellarg(strip_tags($text)))),
$matches))'
 
echo"<form action='test/test_submit/$test_id/".rawurldecode($testname)."' method='post' data-ajax='false' id='myForm' name='myForm'>";
is this correct?
 
Hello All Drupal Masters.
 
4:16 AM
@Hriju It's correct if your browser does a POST request; then again, we never got to see the whole form, is there a submit button or something?
@Karimkhan It's okay if it works :)
 
@Jack but it does not work!
 
any module for drupal which will allow user can logging using Email and Username both ?
 
ya its there.
echo "<input type='submit' data-ajax='false' value='Submit'/>";
echo "</form>";
 
when using file_get_contents to get a remote file via http is there a way to suppress warnings in the event of a 404 or other error?
nevermind I think I found it.
 
@Jack ?
 
4:31 AM
@Jack , thanks, i have wrote my own.
 
is there an alternative to jsbeautifier.org which will preserve php,html and javascript codes, but will format it?
 
no love from passing a context into file_get_contents.
 
4:48 AM
@Karimkhan Then why do you ask me if it's okay? Do I look like a PHP interpreter to you? :)
 
@Jack but I was asking you when it was not ok
:)
 
That wasn't obvious.
In any case, I'm not sure why it wouldn't work. I don't have the cmd you're running or the example arguments that should be passed.
That said, I would opt for passing the data via stdin.
 
@Gordon I want to ask question related installing MAC OS in virtualbox. Can I ask it in Superuser?
 
2
Q: Can I make VirtualBox Mac OS X installation from my installation disk?

bboyreasonI have the original install disk that came with my macbook. I would like to make a VirtualBox Mac desktop install, can I use this disk? Can I make an ISO copy of the disk so I don't need it physically? Is it possible? Is it legal?

They have a , so it's worth a shot :)
 
hehehe ... from php.net/robots.txt
Disallow: /harming/humans
Disallow: /ignoring/human/orders
Disallow: /harm/to/self
 
4:58 AM
hi friends how to start php classes and objects lots of tutorial is there im confused any one help me...
 
@Orangepill bugs.php.net/bug.php?id=52533 (related)
 
@Jack If I'm making a web crawler should I make it optional to ignore the robots file?
 
@Orangepill What would Jesus say?
 
Or is that more of an ethical question.
 
good mornings :)
@Orangepill Well depends on your needs. If you want to support robots.txt this at least needs some parser of that file plus some comparison if an URL is allowed / disallowed per it.
As this is quite some code I would only write it if you need it.
 
5:12 AM
@hakre What's up with that question? The code given works as expected :)
 
hey bro
got it
solved the problem
it was in the form action
keep in mind
I did spend more than 24 hours solving this issue
Use form action='domain/index.php?/controller/function name/parameter1/parameter2'
in codeigniter
when submitting a form
@jack
 
I think for the fun of things they should make an inverse Guinness book of records :)
 
@Jack the OP is an idiot a) by posting wrong examples and b) by not looking for the duplicate. Just close it. :)
 
@hakre Closed it as OT :)
Because the code given doesn't reproduce the issue.
 
Questions about Hackintoshes are off topic here. We can't help you if your pirated installation doesn't work perfectly. It was never meant to do so. — slhck May 31 '12 at 13:00
@Jack ^^^
 
5:19 AM
Ahaha!
 
@Jack Means I can't ask question there. :(
 
@YogeshSuthar That's what you get for being naughty :)
Naughty stuff is usually OT.
How the heck are you supposed to use mysqli_driver??
 
@Jack MAC OS in virtualbox showing me MAC OSX INSTALL ESD and when I press ENTER button nothing happens.
 
$driver = new mysqli_driver();
$driver->report_mode = MYSQLI_REPORT_ALL;
That doesn't even begin to make sense!
 
hmm, where did you pick that @Jack?
 
@Jack and what do you mean it makes no sense?
mysqli_report(MYSQLI_REPORT_ALL); does this in one line, you normally do not need to instantiate the driver object.
 
Because I feel that this should be exposed per-connection.
This is ... global'ish.
It will go to my "why I don't use mysqli" ammunition :)
Could someone help me get rid of this answer? :)
 
Yeah, seems rtfm enough :)
"I like to use library XYZ, but I have no idea how it works" ftw
 
@Jack Hey I found some code. But it's not working :D Can you help please? Thanks!
 
@hakre Have you tried restarting your system?
 
@YogeshSuthar yes
 
$a += ($url[$k+0] + ($url[$k+1] << 8) + ($url[$k+2] << 16) + ($url[$k+3] << 24)); :)
 
6:05 AM
@Jack Hmm. Yes. I've also kept the computer off for 15 minutes so not that something with the electronic was causing it :D
 
@Gordon thanks.
 
@hakre Btw, regarding your question, the answer is "not required".
Therefore, my answer leaves them out :)
 
[{"SI_ID":"267","SI_Reg_No":"COL\/B-000081","SI_Ins_NO":"1","SI_Ins_Amount":"15000.00","SI_Due_Date":"12.02.2013","SI_Paid_Amount":"0.00","SI_Paid_Date":"12.02.2013"},{"SI_ID":"268","SI_Reg_No":"COL\/B-000081","SI_Ins_NO":"2","SI_Ins_Amount":"2500.00","SI_Due_Date":"05.03.2013","SI_Paid_Amount":"0.00","SI_Paid_Date":"12.02.2013"}]
my json data coming like this
 
> sure that its not a sql injection,because of my tables name and my long table name prefix.
 
when i used succuess response
 
6:18 AM
hii
 
morning
 
morning
 
@hakre Nice! Verifying md5 password in JavaScript; it doesn't get better than that.
 
@Jack few year ago i worked with a language which send all the password to the client non hashed, then hash the password from the database and verifiyng
a non critical bug they said :(
 
6:44 AM
@Foobar It will be fun, they said :)
 
@DaveRandom I've installed the new driver but it seems the same error appears.
 
can you guys take a look at this and help me out : stackoverflow.com/questions/18585954/…
 
someone has stolen on of our cats ... who steals a ruddy cat ...
 
Great, overflow-y: hidden introduces a small margin and overflow: hidden makes the content non scrollable on Android ... just great!
 
Sem
@Jack overflow: hidden should make the content non scrollable in any browser
 
@Sem Yeah, well, overflow-y should just fecking work.
 
Sem
@Jack By margin, do you mean the scrollbar? I can guarantee you a real css margin property won't be added because of overflow-y
 
@Sem It's like the scrollable area becomes a few px taller.
 
Sem
@Jack border:none?
 
Let me hammer it a few more times and write a pastebin if I can't figure it out :)
 
Sem
@Jack sure, preferably a jsfiddle
 
Morning
 
Hi everyone :-)
 
Looks okay right? When I load that inside a mobile browser, it scrolls a little bit up when you swipe your finger over the area.
 
Probably going to PHPUK in Feb. :D
 
ping nikic
ping ircmaxell
@SweetieBelle where's that, link me to some info ?
 
London
Off to work, back later
 
@Sem Oh, I can reproduce it on my desktop browser too =(
 
7:42 AM
Mornings
 
moin dave
 
What's the word on the street?
 
Horizontal scrolling is not trivial, apparently =/
 
That must need quite a long bit of street to paint it on
 
Sem
@Jack Sec, checking it out, which margin is bothering you?
 
7:46 AM
Sometimes php still surprises me.. wtf .. array_change_key_case()
 
is anyone trying to keep up with this named parameters discussion on internals ??
 
@DamienOvereem You like that? :)
 
no i dont ><
 
@DamienOvereem In the sense that it ... "doesn't work"?
@Sem Select a number and drag the selection down.
 
@Jack no.. in the sense.. why the hell does it even exist..
 
7:47 AM
@JoeWatkins I was but it appears to have exploded since I left work yesterday, not caught up yet :-S
 
@DamienOvereem It's so that you don't have to create a new array ... I have no idea why anyone would want it, but I'm guessing it has something to do with perhaps http header?
After the collection cycle you could use it to normalize the keys.
I know, you could do that before.
 
yah, but hell.. array_walk? ..
 
@DamienOvereem array_walk() can't modify keys.
 
urm it's just a thought, but why should we disturb the current parameter parsing api for named parameters, surely that is not necessary, surely we can just have a zend_get_named_parameter(s) api, if you are using named parameters why would you want to mix that with un-named parameters ...
 
Sem
@Jack The .album-images are taller than the album-contents
 
7:49 AM
monrirnuirnign
 
@Sem Hmm, aren't they both 400px?
 
Morning @PeeHaa
 
Sem
@PeeHaa Morning sir
 
hm k.. still though.. one-offs suck.. it would still be a ton better to have a function that applies a callback to each key then to have a function that can only change the case of a key.. Just seems bloody messy to me
 
Sem
@Jack Thanks to the scrollbar the real "view" of the contents is shorter.
@Jack the scrollbar is included in the height, it's not height + scrollbar
 
7:51 AM
@Sem Hmm okay, so that's just desktop browser related.
But I experience this problem on the phone. And there it doesn't even show a scrollbar.
 
When I do : var_dump($blabal); ... I receive
object(stdClass)#5 (22) { ["created_at"]=> string(30) "Fri Jul 19 06:46:16 +0000 2013" ["id"]=> int(358115555774967808)
How to access the ["id"] ?
When I do var_dump($blablaba['id']); it's not working
is that because its an stdClass?
 
@DamienOvereem Like array_walk_keys()? :)
 
I knew it was out there somewhere ..
 
It's not :)
@Duikboot The var_dump() says it's an object, not an array.
 
7:55 AM
Using get_object_vars should solve my problem then.
 
Why? $bla->id doesn't work for you?
 
@Duikboot array access is not available in stdClass. php.net/oop5.properties
 
Oh I didn't know that I can indeed parse the value with $tweet->$id; now I have to find out how to put in in a variable.
 
Morning.
 
$tweet_id = $tweet->$id;
echo $tweet_id;

Seems not the correct way.
 

« first day (1053 days earlier)      last day (3910 days later) »