« first day (608 days earlier)      last day (4566 days later) » 

00:00
@NikiC What?
( I never have, just curious)
@orourkek , because they cannot be used with version control software
@ircmaxell Maybe that's just me, but I see them as an architectural smell
.. though i disagree
@tereško good point
00:01
@NikiC , there are things at what DB is just better , and there are situation where stored procedures are the only sane way to go
@NikiC I disagree there. There are some architectural problems that can't cleanly be solved without them. Or at least would require so much extra code and fragility that they are the better solution
@NikiC .. or can you tell me how else i can get X random results from table with 800'000'000 rows ?
Or for performance reasons. I had a search function that took about 50 queries to execute while looping over a cursor. It had to do enough processing that it couldn't be done in SQL alone. So doing it in PHP had a huge overhead, since literally hundreds of megs of data needed to be sent to PHP, just to be sent back in the next query. It took 30 minutes to execute in PHP! I refactored the same algo to live in a SP, and it took just under 2 seconds...
very nice...
@tereško I'm not exactly sure what you are heading at there
00:04
nice optimization there
@NikiC he's getting at, that stored procedures have their uses...
@NikiC .. well .. how would you get that result , where X might be any number from 1 till 100
@tereško HTML output doesn't work with version control software as well, but this does not hinder anybody to create webapps.
@ircmaxell Oh, really, I won't argue that SP don't have uses in some very rare edge cases. Pretty much everything has rare edge case uses. Still doesn't mean that such rare conditions should affect your library choice
SPs can be abused. They have limitations and difficulties associated with them. But that doesn't mean they are bad.
In particular in a case where you can trivially use mysqli for that one single thing and PDO everywhere else ;)
00:06
@NikiC Not rare. I've used them a few dozen times in my career.
@NikiC I'm just pointing out that PDO isn't perfect. There is a reason both exist...
@hakre ,i just repeated the sanest argument u had heard for fearing stored procedures
Not to change the subject -- but I REALLY hate idiotic people trying to use a computer....
@tereško anyway, if you put your shema under version control the argument is gone anyway.
@ircmaxell and some problems in PDO exist because of stupid defaults
00:08
@tereško yes, which core refuses to fix.
speaking of which, I feel like messaging internals about that again
the "backwards compatibility" argument is just stupid
@ircmaxell The about prepared statements or smthg else?
@NikiC yes, to change the default in 5.5
@ircmaxell Ah, if that's all. Well, I openly admit: PDO is not perfect :) Still you should use it.
eih...
00:09
@ircmaxell Btw, I'm not even sure whether I'd support such a change
oh ok
why not?
@NikiC , actually , what one should do is to understand flaws in both interfaces and use one that hurts less
If I'm entirely honest I don't see much harm in having prepared statement emulation by default.
mysqli and PDO both have their uses.... mysql had it's use for several years, now it's time for it to step aside and let both mysqli and PDO take center stage... Whichever one of the 2 don't really matter -- learn about them both and make the decision on a project by project basis...
00:10
@ircmaxell Yes, yes, I know
@NikiC , how about "SQL injection" ?
@tereško Rarely ever possible
Only if you are using some ugly charset
@NikiC Not true
Apps using UTF-8 are safe anyways, if I'm not much mistaken
true parameterized queries are impossible to inject into.
00:11
or the small thing, that you need to cast variables as integers , even when binding them as PDO::PARAM_INT, for emulated prepares ? (i am not sure it this applied only for LIMIT or all location of parameters)
emulated simply should be safe.
personally, I'll take impossible over should any day of the week, when it comes to security at least...
@ircmaxell You are right there probably
@tereško Here by the way you are also mentioning the main problem
The change will break lots of code
lolwut ?
or wait, maybe I got that wrong
Tek
Tek
@ircmaxell I think "It's impossible for anything to be impossible" is the never say never equivalent... lol jk
00:14
have to recheck something
the default is there , because old mysql versions where not supporting prepared statements .. this is a stupid argument, because it assumes that most of php 5.1+ code is being written on top of old mysql database
@ircmaxell if i remember correct you did/do work on the joomla core right?
@Tek true parameterized queries send data (the bound params) in a separate packet entirely from the query. How can you inject into the statement that was already sent
@Justin , and he has been hounded still for that lack of foresight
@tereško Forget what I just said about breaking code. Had a logic error there
Tek
Tek
00:16
@ircmaxell Time travel. :D
@ircmaxell , second order injection
@tereško lol
Tek
Tek
@ircmaxell I was merely jesting, hence the "jk"
@ircmaxell I think what I'm saying is this: I wouldn't have much of a problem with true prepared statements being the default, but I also don't see it as such a big problem as it is usually portrayed :)
00:19
it's lieing to users
Tek
Tek
@NikiC Apparently in the software world compatibility > security.
Lies are good :)
(that was a lie)
From Lounge C++:
user986408
"I don't even dare to count the hours I have spent creating these abstractions, making me able to do something I never freaking do." - lol
@ircmaxell the REAL lesson is that pro devs DO write tests and write the ones that really matter. Even grumpy tester like me knows that
in reply to
http://jhovgaard.net/how-i-stopped-writing-awesome-code <-- A really good reality check that all professional developers should read...
@ircmaxell I don't quite get your response to his response ^^
00:23
which?
About him not getting it
the missing the point
exactly
I don't think he missed the point
After all, even though the author is all cool and stuff and says he doesn't write tests, he actually does, just a different kind of tests :)
well, the point of the article wasn't (to my reading) don't test your code. Not at all. It was focus on the things that matter, and test what counts, as necessary (unit, integration, functional, etc). It depends more on the problem you're solving than the dogma...
@NikiC he said he stopped writing unit tests
@ircmaxell exactly :)
And isn't that exactly what grumpy says?
00:25
I read that, and kinda chuckled -- I've never actually written a unit test... (not really sure what exactly it is supposed to do even)... I write my code, i test it -- if it breaks -- i tweak it -- till it isn't broken... never had any issues thus far
"pro devs DO write tests and write the ones that really matter"
ok .. i need to get some sleep
I didn't get that from it. I read do write tests as always test
Can anyone help me with this wordpress issue?
http://stackoverflow.com/questions/11042360/how-integrate-existing-wordpress-blog-into-a-new-web-site/
oh wait .. i cannot .. i need to kill my phone first
00:27
@grmpyprogrammer Ohhh, I mis-understood this tweet. I interpreted *do write tests* as *always write tests*. #MyBad
now makes more sense ^^
@ircmaxell In any case, you should really write a quick mail to internals about those prepared statements
perhaps...
Why only perhaps? :P
btw, have there already been previous internals@ discussions about it?
oh
I didn't knew that you already brought it up once
You've clearly been on internals much longer than me ^^
Well that first post, I completely agree with.. If the server or lib can't handle PS and it defaults back to emulation -- setting it to default to do true PS logical...
Tek
Tek
@Justin I'm pretty sure the PHP devs know that, their argument IIRC is 'compatibility'.
Same reason why mysql_* extension remains, eval and well I don't think I need to keep going...
@Tek yeah, which is also a big thing.... But, figure you have to turn the flag in a new version -- and if someone is going to be updating their shit to get the true PS they'll be updating everything else as well which to me says compatibility is really a non-issue
@NikiC I've followed for about 4 to 5 years now. But only been active the past 1.5 years
@Tek No, it's not. It will fallback silently to emulated if true PS is not supported. The real reason is that PS always miss the query cache in old versions of mysql. My argument to that is that if you're relying on the query cache, you're doing something else wrong...
00:40
but again that takes me to my last statement... If someone is going to update php for the true PS or whatever else -- logically you'd think they'll be updating the mySql at the same time right?
Actually, screw it, I'm going to pull request
But, I do agree -- relying on query cache definitely says you're doing something wrong..
@ircmaxell I wouldn't argue that way. Rather say that if you aren't using a completely outdated MySQL version the query cache will work correctly
Arguing with you're-doing-it-wrong isn't a good idea on internals usually. Because too many people simply are doing it wrong, but don't want to admit it
Anywho, nice chatting with you guys -- I'm going to go home now -- perhaps I'll see you in an hour or 2
@ircmaxell Good to know. I though that you were there only since recently
@ircmaxell That discussion you linked seemed to have the conclusion that it's okay to change
00:44
@NikiC very true
@ircmaxell Yeah exactly. And Pierre later says something similar
So you shouldn't have much of a problem getting that in
Only thing that could cause problems is that the emulation currently allows use of placeholders in places where they aren't usually allowed
That's the main problem that I see
I don't have particular examples of that though
But I remember seeing people use ps to bind identifiers, which obviously isn't possible with native ps
very true
but it's not possible with PDO either, because they will be quoted
Though I'm honestly not sure how that was possible in the first place
@ircmaxell yeah exactly
was reading the last few comments off the hex2bin() bug report ... interesting last comment contributions =p
ARG. Why does PHP core use tabs. Why can't it use spaces like everyone else
I need to reconfigure my editors every bloody time I edit core
00:49
they probably didn't apply psr-1 yet ;)
@Jack Yeah. That guy was evil :(
@ircmaxell But I really do remember having seen something like that. So it must work in some way. But I really can't imagine how
@Jack Btw I am really glad that the patch found it's way into PHP 5.4. That damn bug had a very high noise-to-signal ratio
We probably spent four hours in total discussing it on IRC. Such a waste of time :(
@NikiC yeah, if it was me i'd just throw an error lol
@Jack That's what we're doing now ;)
i.e. hex2bin should be called with data from bin2hex imo
ohhh okay
haven't had a chance to compile the new goodies yet
interestingly though, how come the report is still in "reopened" state?
@ircmaxell , can you suggest a sci-fi book series ?
00:55
@Jack Because Stas wanted me to back it out again as it is a BC break
@tereško Song of Fire and Ice?
@ircmaxell sci-fi , not fantasy
i have read only Vatta's War and Deathstalker series from the genre
@Jack But now that you mention it, I can just as well close it
@NikiC =D
and Dr. Who does not count
00:57
I don't read sci-fi
okay, time to go to sleep
night everyone
nitez~
i guess @Jack does not read literature ..
01:01
@tereško depends on your definition of literature
i read my own code sometimes =p
i mean, something that has a story
@ircmaxell , if you ever try , i can recommend "Altered Carbon"
like how a variable came into existence and through a life of infinite recursion became morbidly obese ...
well, fwiw, i've read lord of the rings =D
gotta swing my car into motion and get to the office .. cheers
01:32
Evening/Afternoon/Morning depending on your locale
anyone familiar with FuelPHP and SimpleAuth
the team really needs to work on documentation >_>
If there is one thing i've learned from my years as a programmer its that EVERYONE needs to work on their documentation... It all just SUCKS
haha yeah
NFI how to call get_name();
ffs
hi guys can you help me?
ive got a logics question
on't ask whether someone is here or can help. Just tell us your problem. If anybody can and wants to help, they will.
01:42
$x = array('123', '456', '789');
$y = "789123456";

i need to search x in y
but x can be dynamicly changed
so i need to recursively implode x, and then
compare to y
y can be even
$y = "bbbbbbbb789456bbbbb";
and need to change the x array's place and search again
somebody? :)
i already did a recursive function, but it gets running and running, "llowed memory size of 134217728 bytes exhausted"
this is my code:
<?php
$strings = file_get_contents('input.txt');
$strings = preg_split("'[\n\r\s\t]'" , $strings);
$S = end($strings);
array_pop($strings);
$L = $strings;

function find($string, $needle)
{
$alreadySearched = array();
$getted = $string;
$search = implode('', $getted);

if(!in_array($search, $alreadySearched))
{
$result = stripos($search, $needle);
if($result)
{
return $result;
}
else
{
$alreadySearched[] = $getted;
shuffle($getted);
find($getted, $needle);
}
}
else
{
shuffle($getted);
find($getted, $needle);
guys? =]
02:12
hi ThreeDev, are you are here
yes :)
found any solution?
LOL...sorry i wanted to ask something from my side.....do u have any knowledge about magento
hmm yep
talk to me
well, in the backend, I have set the default display currency as USD, but still the products are shown with Australian Dollar "AUD"
maybe the current user (you) has setted your personal currency to AUD
check it
02:20
No no, thats not the case. I have used proxy websites too....I cleared all the cache. The changes are reflecting in the database table "core_config_data too, but somehow the Australian dollar is picked. A while ago, I hired a developer for theme modifications and after that this has started happening
can u send me a link?
(maybe he did it hardcoded)
so ask the dev :) flogging is in order
ok its not harcoded because when i press on other currency it works
so i think the problem is
that you got a function that sets it automaticlly to usd
you need to search your code a bit
02:24
i also assume the same. Where can i look in the code. While file or folder should i look.
it can so many, this is the real problem :)
by the way, i found the solution for the problem i had before :)
hmm.....i have trying to get this work for last 24 hours...ohh k....good for you :)
ohh k....thanks
user1385191
03:05
I need some gZip help if anyone's around
user1385191
I'm using gzencode to serve a concatenated file to the client
user1385191
it works fine in Opera, but Firefox tells me it can't be read and Chromium just implodes
03:45
@MattMcDonald can you somehow verify the file's integrity using php as well?
user1385191
hm?
user1385191
the file works fine if I don't ask for it to be gzipped
i meant after the file has been served
i.e. initiate a download and check the file contents using gzdecode?
do md5 checksum if need be ...
user1385191
I'm getting an error that says that gzdecode is undefined
actually ... you can just use ob_start('ob_gzhandler'); instead of using gzencode youself
then just echo out the file
user1385191
03:59
that works
user1385191
thanks
user1385191
it's slower and the file size is larger, but it definitely works now
the fact that the file is larger is probably a good thing :)
you can also look at: php.net/manual/en/…
to see the compression level
user1385191
the file size is the same when minified as when minified + gzipped now
06:26
may i ask an off topic question
my domain is too slow, i dont know why is there any analyzing tool available if not how i can do it myself (i've posted this question in all relative stack sites but everyone is sleeping :( )
06:49
@pbvamsi You could use something like firebug (if you use firefox) to get a general picture of how the page is loading (all of the components, and which one is slow). This will give you a very high level view.
well said, i'll jump into it thanks @Paul
@Paul if i need to analyze entire domain ... suggest me a way of doing it coz checking each page is a tedious mission
@pbvamsi Check your cpu load (look for high cpu tasks), memory usage, io statistics.
@Paul my pc is optimized one, problem is with domain, i need to find out malpractices followed in the website coz entire system(domain) is slow now
maybe its a problem with your network routing? use network tools then. traceroute, dig, nslookup perhaps? I'm not an expert in that.
07:04
i serious doubt the problem is only in the way the domain space used/structured @Paul is there a possibility, am i valid somehow
@pbvamsi I don't understand what you mean with "only in the way the domain space (is) used/structured". A network misconfiguration could easily cause a big slowdown across an entire domain though.
am able to surf rest of the things fine(other domains, sites), so am suspecting that way
@pbvamsi if you are using VirtualHosts in apache, check the log files, for something going wrong.
morning
morning
 
1 hour later…
08:58
mornin'
09:14
how can i speed up file upload time
get a better connection
morning @hakre, @tereško
heya ;)
09:37
hi guys
How can i get my test tracking number for FEDEX
That cv-pls was just posted to clean up the site, that user hasn't been seen for years.
I thought I once wrote the reverse of this: stackoverflow.com/a/7603547/367456
With a little helper function to pass "named" arguments to any PHP callback. But looks like that I lost it.
@gowri , that has nothing to do with
Most of the Php developers may experienced the same problem
Is it ok / ethical to post links to you questions on hackernews or Redit (programming)?

plus On which stackexchange site should i ask this questions?
@UmerHayat , most likely it will be reported as spam on the reddit/hn side
09:47
I believe this place is mainly for sharing knowledge and problems. So if anybudy has experience with fedex integration in PHP may help me
you can always ask it on meta.stackoverflow.com
@tereško: you mean meta stack will help for shipping issue
hehe
Guys any twig developers here?
Would anyone know, how to pass a template variable to template custom function?
posted on June 15, 2012 by Lorna Mitchell

Just wanted to share news of an event that I'll be at in a couple of weeks: LAMP and Beyond. This event is organised by PHPNW and held at Madlab in Manchester on June 30th (it's a Saturday). The idea is that we bring together a bunch of interested developers plus a few people who know something about some of the technologies which are often used with LAMP but aren't part of the acronym - and

10:13
Okey. Solved.
@hakre Nice duplicate ;)
10:30
@Leigh Yeah, I have got more of these: gist.github.com/2768567 ;)
I use OperaNotes for this
@tereško yeah rocks ;) But I dind't know they support gist store.
@hakre no , its not tied to gist
Sam
Sam
Morning everyone
10:41
How can i get the last action visited in cakephp.Please help
put it in session
the whole question makes no sense
no no this is only for 1 page not for all
for this one page to work, you have to save the state in every other page
extending controller might let you do this without resorting to complete rewrite
or even better : extending the dispatching mechanism
what? The stackoverflow community bot adds even content? stackoverflow.com/posts/7639426/revisions
@hakre No, it owns edits from anonymous users.
@Gordon Then why you don't just delete it?
@hakre because "Sorry, this question has answers and cannot be deleted; flag it for moderator attention instead." which only resulted in a close.
11:14
@tereško actually there are two pages containing 2 links which will send parameter =1 for link 1 and parameter=0 for link 2 but not by url(attaching parameters to url),It should be onclick .So when user click 1st link parameter 1 will be saved for that page and same for link 2
@Sparkx , how is it in any way, shape or form related to your original question ?
38 mins ago, by Sparkx
How can i get the last action visited in cakephp.Please help
@Gordon Which is a good reason not to delete it...
@Gordon , i have been trying to get rid of one question i asked for at least half-a-year
11:31
I managed to get one of my questions deleted when it was down to like -20+ downvotes :D - And that is only because SO is full of "you shouldn't do that" evangelists who don't care about actually answering the question.
@NikiC is $GLOBALS just a copy of some sort of other global scope? because codepad.viper-7.com/Y3JH8P
apparently $foo = 1 will not go through $GLOBALS but some other mechanism. it will eventually change the value in $GLOBALS though.
@Gordon to be honest, I wouldn't even expect offsetSet to be called for $GLOBALS when you create a new variable. It's obviously not "just a PHP array", but some sort of pseudo-array hooked up to an internal list of variables in the global scope
11:48
@Leigh i didnt expect it to work either, especially not from inside some class scope
@Leigh Do you have a link to taht question?
@PeeHaa No it's deleted. It was about how I could get VC++ to stfu about pointer types, because I knew that my data was in the correct format, but VC++ wouldn't let me pass it to the winapi function that required it
in the end I did inline asm to force the value into a typed pointer
@Leigh .. well .. my issue-question is tied to OperaUnite (which has been dropped as of v12) , with a very specific setup and description which makes it unfindable for anyone with similar problem
Hi
I need help with encoding
in PHP
I am passing chinese characters to the function
@Gordon lxr.php.net/xref/PHP_5_4/Zend/zend.c#629 I might be completely off, but it seems it's just mapped to a symbol table.
12:00
function convertChinesetoNumeric($ChineseString){
$NumericString = mb_encode_numericentity($ChineseString, array (0x0, 0xffff, 0, 0xffff), 'UTF-8');
$NumericString = str_replace('&#','',$NumericString);
$NumericString = str_replace(';,',',',$NumericString);
return $NumericString;
}
and want to get character in their unicode numbers
but I am not sure.. why its returning me wrong unicode numbers
when I have the function working in a separate PHP file it works
Am I the only one reading this guys name as pee pants?
but when I load the characters from CSV file
I get absurd numbers which dont translate back to the original characters
could anyone please volunteer to fix this with me?
Sam
Sam
Volunteer... lol
12:07
i'll volunteer to be tribute
12:18
@Leigh How do you read my name? ;)
thanks for your reply
@ca
stackoverflow.com/questions/10050415/… - useless question rotting around
@carrieKendall: Do you have a localhost server setup?
you might need that to debug a bit
@ppant i was making a book reference :] i am not interested in debugging your project
@PeeHaa is issue #1 on github for cv backlog still an issue?
12:22
@carrieKendall: Alright.......
thanks anyway
one day I will do it !
@ppant Just don't give up!
@Gordon Nopez solved and closed
@Donut: I can't afford to... :D
12:38
I suggest to down-vote this answer so that we can close-vote it than: stackoverflow.com/a/3075484/367456
It's misleading and wrong, also PHP 5.4 answers the question as the OP was asking for. I edited correct answer and extended it with the new feature
The state of commands in linux (especially 3rd party popular programs like git) are just awful.
@hakre We must leave a comment
@Donut There is a comment that this is overhead.
Del-voting works now.
@hakre I'd rather that question and answer wasn't edited, unless you're also willing to do the same for every single Q/A where the subject has changed over time.
12:44
@salathe Well, I just found that question, and comments were already there so I completed it a bit. It's not that I actively look for them.
@hakre That's entirely my point. :)
Solved it.. it was just a matter of using save as UTF8 in notepad
thanks for your time
Sure, linux isn't supposed to be user-friendly, at all. But what's the big idea about over-complicating stuff?
The question has a historical basis, it was asking about the state of PHP at the time of writing; answers should not be downvoted just because they don't mention the 5.4 behaviour.
Each time I look at linux console, I remember PHP. The bad side of PHP, that is. :(
12:46
@Christian You mean terminal?
Terminals are awesome.
@salathe The answer is downvoted because it was a technically wrong suggestion, even that time. You should not make a detail (how to access a newly created object) make introduce design changes to your code, e.g. turning objects into singletons. That is plain wrong.
@Christian whats wrong with linux console?
It's freaking sweet I tells ya :)
@Christian wow, what did happen?
@hakre I don't know where you got singletons from, and it was an perfectly fine literal answer to the question. But I see we'll just disagree.
12:54
some people are just impossible to reach
You're right as far as what you've stated above. I was actually meaning it's a great platform to start learning with. I know Code-Igniter is actually a Front-End Controller architecture tied with MVC and others and has issues, as all do, but it still represents a great learning environment. — ars265 1 min ago
this is completely an utterly hopeless
@salathe For example "It can work if the object has singleton" and then for another bad suggestion: "BTW: it doesn't have to be even singleton but also static method which returns the instance". - for the same said reasons. It's not specifically about singletons, but how you deal with problems.
@hakre If you see it that way, happy down voting.
also .. i find this epic:
5
A: PHP header("Location: $url");

Oli CharlesworthThis is your problem: <?php ^^^^ You cannot have output any content before the headers have been sent; that includes whitespace.


« first day (608 days earlier)      last day (4566 days later) »