« first day (1275 days earlier)      last day (3677 days later) » 

5:01 PM
lol, for anyone to question the clarity of that answer is to question the clarity of black and white.
 
@BhavikAmbani: Actually, it provides a perfectly clear, concise and correct answer to the question. No. — Second Rikudo 1 min ago
 
No got more upvotes than characters.
 
@DanLugg why is it CW?
 
@Gordon the post notice is kinda moot since the question is closed...
Also, there's not really much further to explain, you know... Read the question...
 
@bwoebi because I made it CW
 
5:10 PM
@SecondRikudo I am tempted to reopen it
 
@Gordon Really? Is it that "answerable"?
 
@SecondRikudo Yes, I think so.
 
Does anybody know how to fix next error: Mysql has gone away #2006
 
@Gordon TBH I haven't voted down, close or delete
 
I see this error in non-stop execute script(socket)
 
5:13 PM
@tereško yes, why?
 
But I still don't think it's reopen worthy @Gordon
For the exact reason it was closed in the first place.
 
@Anton_Sh iirc, mysql will only keep the connection for about a couple hours. Then it will go away. PHP will only realize this when it tries to do something with the connection resource. If you use mysqli, you can use mysqli_ping. If not, try/catch.
 
I use pdo. I create a singleton for mysql connection. Where I have to use ping?
before every query?
 
@Anton_Sh yes, but I dont think PDO has ping. And your connection shouldnt be a Singleton btw
 
please, never use singletons for DB connections
 
5:17 PM
why?
If I dont use singleton I have to create new pdo object (and new connection) for every query
 
@Anton_Sh No, you don't.
 
@Anton_Sh wrong
 
You just use the same $pdo instance for everything.
 
@SecondRikudo well, its a programming question. And its certainly not explicitly explained in the manual why it doesnt make sense to extend from StdClass, so while not a stellar question, I think it's good enough. And it might benefit future visitors coming from other languages like Java where every object inherits from the Base object.
 
morning
 
5:19 PM
@Gordon Yes, but even on those other languages you don't inherit explicitly from the base Object.
The notion in the question is counter-intuitive. In either case, you're welcome to reopen it, I don't mind either way.
But, don't expect me or @tereško to improve our answers, because I don't see what more can be said.
 
wow I think I slept for more than 12 hours oO
 
what is the different if I use same instance for everything or if I use singleton..The singleton do same like that..just save the instance
 
@Anton_Sh Because Singleton uses the global space, which means all sorts of bad things.
 
@PeeHaa Happened to me one Sunday :D I got home at 16h and slept until 12h on Monday.
 
Ok but I don`t undesrtasnt how to fix my problem
 
5:21 PM
229
A: Is there a use-case for singletons with database access in PHP?

GordonSingletons have very little - if not to say no - use in PHP. In languages where objects live in shared memory, Singletons can be used to keep memory usage low. Instead of creating two objects, you reference an existing instance from the globally shared application memory. In PHP there is no such...

 
@Gordon I'm missing the "use singleton" endpoint in your flowchart
 
@Gordon In the company I'm entering soon, only my team head and me truly understand DI, so I'm guessing most of my initial work would be to move most of the singletons to ServiceLocators (at first) then to proper DICs (later)
 
Later never dies.
 
5:36 PM
Hi
can I suggest to re-open stackoverflow.com/questions/3203092/… ?
 
@bwoebi I can't see you failed?
 
I would like to answer the question. There do not seem to be any question that already cover this.
 
@GajusKuizinas You sure can! But I'm going to tell you now, it's not going to happen.
 
@DanLugg Please elaborate
 
@GajusKuizinas Okay. It won't be reopened.
 
5:38 PM
@GajusKuizinas Why do you think it should be reopened?
 
What's better - 100 million rows in a MySQL database with proper relational database design or 5 million rows with poor relational database design (eg, no many to many tables, data held within rows (poor normalization))?
 
@TOOTSKI yep, forgot to add it before…
 
@jskidd3 Neither.
 
Well I have to choose one so that doesn't help :p
 
@bwoebi Two busty ladies in bed.
 
5:39 PM
@Gordon but is the singleton the reason form my error(mysql has gone away)
 
100 million. As in, 100,000,000 rows.
 
In total yes
As in the whole database
 
May I ask, of what?
 
All bus timetable data in the UK in a normalized format
 
@Anton_Sh no, it was just a side note. the reason for the mysql gone away is that mysql will drop the connection eventually
 
5:40 PM
All of it is parsed from XML files
 
@bwoebi That's why I'm making this syntax crap, to prevent commit if it's not OKish.
 
and to be honest it's more like 60 mill if it makes much difference :p
 
@Gordon ok but how to fix it
 
What effect does it have on SELECT statements if the data is setup as a proper relational database?
 
3
Q: How long does a mysql_connect stay open?

NealI have a CLI script which when you first start it: function __construct(){$this->connectToDatabase();} protected function connectToDatabase(){ try{ $this->databaseName = $this->dbname; $this->posName = $this->posName; $this->vlog = $this->vlogName; $this->data...

 
5:42 PM
@SecondRikudo I did explain why I think it should be re-opened: It has not been asked elsewhere and it is a constructive question addressing a genuine issue.
 
@GajusKuizinas It asks for a library, which is off-topic.
 
@bwoebi I still have 0 commits there :( Good job.
 
It does not display research or effort
 
Is asking for a library is off-topic? There are thousands of questions about libraries. Should I go and close them all?
 
5:43 PM
@bwoebi That commit needed prior discussion
 
@GajusKuizinas Yes, that's correct.
 
@Gordon ok but if I increase the time_out I don`t fix the problem because my script never stop to execute, not only for 2-3 days
 
Questions asking for a library means the answers will be a popularity contest.
I'll offer CodeIgniter, and you'll offer CakePHP, and because CodeIgniter is more popular it'll gain more votes, not necessarily because it's most helpful.
Also, Questions asking for a best library are opinion based, and have no concrete answer or solution.
 
@Anton_Sh try/catch
 
In short, the question is rightfully closed. And if it gets reopened, we will probably close it again.
 
I will try
 
And end discussion.
 
thank you
 
WHY IS THIS QUESTION OPEN AGAIN? stackoverflow.com/questions/23045119/…
 
Yeah, I agree. @TOOTSKI
@NikiC @Gordon
 
5:46 PM
@NikiC @Gorzon
 
@NikiC because its good enough
 
Uh, whatever
 
@Gordon good enough for waht ?
 
I sometimes forget that I don't give a damn about question quality on SO anymore (being hopeless and all)
2
 
5:48 PM
@tereško to be answered. its certainly not obvious from the manual why it doesnt make sense to extend stdclass. after all, other languages have their base classes as well. just that in php its not stdclass.
 
@SecondRikudo So why is this not closed? stackoverflow.com/questions/883907/…
 
It will be soon. Thank you. Keep them coming.
 
@NikiC It did? Why…? There's no BC break, it's doable in a way which satisfies the interface... And it's really a minor change.
 
One moar ^
 
5:51 PM
@NikiC put a cv on it… It's definitively opinion based.
 
@GajusKuizinas Done, it's not closed.
 
stackoverflow.com/questions/3596584/… "or are there any other frameworks that simplify "form generation on the fly"?"
 
3 mins ago, by NikiC
I sometimes forget that I don't give a damn about question quality on SO anymore (being hopeless and all)
@bwoebi Expectations change
 
@NikiC Same feeling mate.
 
Agree ^^
@NikiC explain?
 
5:52 PM
Now an implementation of Countable MUST implement the options as well, to comply with the expectation of them working
Currently the options just don't work for Countable and that's that.
 
@GajusKuizinas Please don't forget that those questions were asked (and answered) based on old rules and community consensuses.
 
Which means that when they were asked they were considered to be valid questions, but not anymore.
 
@NikiC I consider that a nice side effect, so that we can make the parameter obligatory in PHP6
 
@bwoebi Please write an internals mails after-the-fact at least
 
5:54 PM
@NikiC You mean $deep = true kind of things?
 
@LeviMorrison yes
 
And btw. until people realize that it works, it will take time I think…
 
@GajusKuizinas For questions that should be closed, please type in the format of [tag:cv-pls] <QUESTION LINK>
See the ones I'm posting.
 
I don't like the inconsistency the API has concerning deep counting.
However, I don't like the idea of Countable having a deep option.
 
5:55 PM
(We have several scripts and extensions for dealing with requests)
 
Seems to violate encapsulation.
 
0
A: When creating my own classes in PHP should I extend stdClass?

TOOTSKIStdClass is empty and therefore you don't have any benefit in extending it. You are just wasting extend in your __CLASS__˙. php --rc StdClass Class [ <internal:Core> class stdClass ] { - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { ...

Close the f* Q now :)
It shows lack of reasearch... that information is available already.
Thanks @NikiC, awesome.
 
@TOOTSKI I removed from there..
irrelevant
crappy question, btw
 
Yeah :D Actually, it's OKish, but that info is available on the internetz already and it's not some jewel.
 
@JoeWatkins should I merge phpdbg into php-src/sapi/phpdbg ?
 
5:59 PM
@TOOTSKI Apparently it does. Thanks! — deceze 56 mins ago
@AlmaDo like this ^ :P
3
A: What is the Best Secured PHP Framework

mandeeyaI use Laravel 4 and it has been amazing. It has awesome security, makes you write smart and clean code and is really strong for php. This framework in my opinion revived php and made me respect the language again. Checkout this blog on why you should try the Laravel Framework. 5 Reasons You S...

OMFG, awesome security.
 
@TOOTSKI gone
 
6:10 PM
@TOOTSKI Needs moar downvotes
Get it to -3
 
Done my share.
 
I fixed the stdClass question as best I could.
 
@TOOTSKI MOAAARRRRR
 
FOR THE LOVE OF GAWD
I can't vote on this locked question, you guys?
 
6:13 PM
nope
Ask @Gordon. Problem here is that it contains information which just might get outdated. Better to just kill it.
 
Kill it @Gordon, you know you want to.
The best part is troubling me.
 
@bwoebi lets test couple of days first
 
good idea
 
What a lame accepted answer.
> However: The bulk of Python can be learned in an afternoon.
 
@TOOTSKI DV all answers too, to make it easier to delv
 
6:22 PM
Done, 2 more delv?
 
@TOOTSKI 5 more, according to what's written to me.
 
Ah, so it needs 8.
 
@Gordon ^
@SecondRikudo Hah, he's on interview atm.
"Developers" from my country are retarded, they mostly learn what OUTSOURCING companies are looking for.
I'm out of votes, was good while it lasted :)
 
        $auth = (new AdminAuthentication($this))->authenticate($request->getPost("username"),
            $request->getPost("password"));
Is this a syntax error?
PHPStorm says its fine..
Yet on demo I get Parse error: syntax error, unexpected T_OBJECT_OPERATOR
 
6:29 PM
Your PHP is less that 5.4 on "demo".
 
user2286243
Hi, I want to run a PHP script continously but don't want the wait web browser for its finish. Any clue how can I do this?
 
ignore user abort
 
PHP Version 5.3.5 - YOu're right :P
 
Yes I am :)
 
user895378
3
A: How do I stop PHP from sending data to client while still running PHP code in server?

rdlowreyYes. This can easily be done without any asynchronous processing if you correctly utilize HTTP headers. Under normal conditions PHP will stop processing as soon as the client on the other end closes the connection. If you want to continue processing after this event, you need to do one thing: t...

 
6:31 PM
@VarunAgw You want it activated by a user's request, but not wait for it to finish?
 
@rdlowrey ooooooor run a real background process
 
user895378
@PeeHaa E_TOO_FANCY_FOR_WEB_SAPI
 
user2286243
I want a mix of ignore_user_abort and header('Connection: close');
 
E_THE_WEB_SAPI_ALREADY_CREATES_ALL_THE_PROCESSES_YOU_CAN_CREATE_AND_STILL_SCALE
 
@PeeHaa Sometimes you don't actually need a car; a mattress on wheels works just fine.
 
6:34 PM
lol
 
user895378
@JoeWatkins that too.
 
user895378
Creating new processes inside the web SAPI is a great way to blow up your server.
 
user895378
And establishing a socket connection (even if it's unix://) inside a web SAPI process to a background worker is usually overkill for what people asking that question actually want.
 
user2286243
Thanks everyone from answer. I guess browser will close the connection after reading content of length "Content-Length" header?
 
6:36 PM
@rdlowrey one of your answers I haven't upvoted yet?! Insta-upvote!
 
user895378
@VarunAgw yes.
 
FORK TIME
 
user895378
@bwoebi \o/
 
@bwoebi I upvoted when it was 0 -1.
Beat that!
 
user2286243
@TOOTSKI Because of me, it got 4 more upvotes. Beat that!
 
Actually it's because of good answer :P
 
@SecondRikudo Haven't I already delv that? :P
Ah, ah, FINISH HIM
 
@TOOTSKI last vote put!
 
/me waiting for GIF police
 
6:41 PM
@TOOTSKI done!
 
@bwoebi When did @PeeHaa recruit you?
 
:D .. @SecondRikudo think it was other way around :D
 
@SecondRikudo I recruited myself. @PeeHaa is not guilty.
 
user895378
I actually need to update that answer to show how to do the same thing with chunked-encoding so you don't have to close the TCP connection to accomplish it ...
 
user2286243
6:55 PM
One more question. Suppose two PHP files are running concurrently. Can I transfer data between them directly w/o creating a file?
 
@VarunAgw You can't share between PHP processes, no. You can use database or some other permanent storage.
 
user895378
Directly? Only with a socket connection ... this is likely to be a very bad solution depending on your problem.
 
You can also use Cache, see apc
 
@SecondRikudo there's one u missing.
 
Although I don't know if it would work, never tried.
@bwoebi Hmm?
 
user2286243
6:57 PM
I think sharing data using sessions will help as both will run by web browser
 
@SecondRikudo apcu.
 
user2286243
but any better solution not based on any extension or setting change
 
@SecondRikudo APC is not really available in 5.5
 
user895378
APCu is, and it's aliased so it's more or less the same thing ...
 
@VarunAgw You'll need permanent storage.
Sessions don't work in a non-web context AFAIK.
 
7:17 PM
btw, people, if you happen to be using cygwin, you might want to update it
 
and have a long hard think about what kind of person you really are ...
 
?
 
can't think of a good reason to use cygwin ?
 
what the fuck are you talking about
 
being forced to use windows? … well… just use some ± compatible POSIX system
 
7:22 PM
@JoeWatkins i assume, you are attempting to sound funny .. but it comes out slightly retarded
 
Why to update?
4 hours ago, by TOOTSKI
Could someone please check if something like this would work php -l <<< '<?php die();', can't POSIX right now.
 
because it'll be effected by the heartbleed thing ...
it was meant to be funny ...
it's pretty damn retarted to be relying on cygwin for anything if you ask me ...
 
>openssl version
OpenSSL 0.9.8h 28 May 2008
Argument. Invalid.
@JoeWatkins It's handy because of the tools, but more or less, it's useless for plethora of reasons.
 
root# openssl version
OpenSSL 0.9.8y 5 Feb 2013
@TOOTSKI go upgrade.
 
OpenSSL> version
OpenSSL 1.0.1g 7 Apr 2014
 
7:27 PM
OK, let me sound dumb, but why? I don't use any of its functionality, directly.
 
@TOOTSKI out of principle.
 
if you cygwin installation is 6 years old, you really should update
 
so, all windows users have this then looks like ?
what kind of tools do you use for that that aren't available for windows ?
 
@JoeWatkins No, fuck no, I said Cygwin is useful because the tools on Windows are crap.
If they even exist.
 
well what do you mean by tools ? name one so I know what kind of thing you mean
 
7:30 PM
openssh, wget, ls, git, grep
 
oh ...
 
@TOOTSKI are you sure that your git version is not using openssl?
 
@JoeWatkins ssh, wget, grep, ls, git, awk, sed ... pipes (this is broken)
 
git is painful slow but there is a windows build ... don't blame you for wanting to avoid that ...
 
user895378
TIL the headers_sent() function returns true in the CLI once you've echoed/printed something.
 
7:31 PM
the others seem bit strange tho in windows ...
 
@tereško Not sure about that really.
 
Is there any SMTP class I can use thats released?
 
@rdlowrey Yeah, basically any output?
 
@user3123545 phpmailer, swiftmailer
 
kk ty
 
user895378
7:32 PM
@TOOTSKI apparently so.
 
@JoeWatkins is ssh/scp and grep really so strange usecases ?
 
putty/winscp are still around ?
 
Yes, use them.
 
@rdlowrey the 1 byte long header consisting of the first printed char? :-D
 
user895378
yup :)
 
7:34 PM
:D
@tereško You can't really blame the man, have you tried compiling php or anything else?
 
@TOOTSKI looks like Windows. Must resist ... the ... urge .. to .. bin... err ... trash it!
 
Still better than OSX :P
I'm in process of making my machine Windows free. Will have it on other 'puter for stuff.
 
@JoeWatkins I prefer my SSH on windows to look like this : i.stack.imgur.com/OopJN.png
 
@tereško rsync, 0 points.
 
7:35 PM
last time I installed cygwin it took up a massive amount of space, took absolutely forever to setup and was awful once it got going, none of the cross compilers ever seemed to work on anything that wasn't the build host, it was a pretty terrible place to be ... I prefer winscp/putty over that yeah ... I have no real idea how to be a windows user ...
 
@bwoebi Exactly what I said to wife now.
I'm maybe using GnuWin32, not sure if Cygwin, I recall I couldn't get that to work.
 
what about msys do people still use that ?
(that was the solution to the compilers from cygwin being broken iirc)
 
/me is not a "windows user"
 
There is git with msys or something?
I think git uses that, not sure.
 
@TOOTSKI Just fyi: you're the one who is wrong.
 
7:38 PM
@tereško required for work ?
 
@TOOTSKI I'm debating between dual-boot and a VM (with Linux as the host)
 
@SecondRikudo That becomes a PITA soon, might work for you.
@bwoebi Kidding, I can't blame what I never used.
 
@TOOTSKI Which will?
 
Sorry, I assumed it was only dual boot.
 
vm is okay, unix is good at vm's ... I have to use windows occasionally in a vm ... that's the limit of my usage ... I don't see the point in dual boot setups, i never shut down if I can help it ...
 
7:40 PM
That sucks for average daily use IMHO.
>net statistics server
Server Statistics for \\N76
Statistics since 3/13/2014 18:56:33
@JoeWatkins ^ a month :D
Hmmm, it could fancy a restart.
 
this is pretty suspicious ...
 
What is?
 
had a power cut yesterday so didn't expect big uptime
but
there are not 6 users
20:42:31 up 1 day, 10:24, 6 users, load average: 0.17, 0.16, 0.15
there's just me
 
hahaha
 
wtf does that mean ...
 
7:43 PM
your webserver has a separate user
so does you rdbms
it just indicated hoe many active accounts UIDs are being used
 
yep, it'll be that ...
thought the nsa had got in for a minute there man ...
 
NSA would just ask for a VMs snapshot from your hosting provider
 
yeah it's dbus/gdm//polkit etc
local machine ... (my pc)
 
@tereško they would ask?
 
@bwoebi well .. those are the finicky details
lets use s/ask/get
 
7:48 PM
How to call a script that fixes code style etc., crapfix?
 
"beautifier"
 
formatter too
 
@tereško better^^
 
that sounds too much like format C: /F /Q
 
beautimatter it is.
 
7:50 PM
vajazzle
 
Had to Google that and... LOL.
 
hehe
 
Looks cool :D
 
@TOOTSKI did it too. First though: ...
 
Does ON DUPLICATE KEY UPDATE take unique indexes into account as well as primary keys? Do I have to explicitly define which index it should be checking?
 
7:56 PM
> return str_replace("\r\n", "\n", $content);
Oh, fapbot...
 
@TOOTSKI oh, I've read fabpot...
 
@bwoebi Imagine you didn't know about it and seen it live.
Yeah, whole thing is broken per design.
 

« first day (1275 days earlier)      last day (3677 days later) »