« first day (2153 days earlier)      last day (3021 days later) » 

00:19
Can we convince StackOverflow that if a questions contains mysql_* in the code to automatically close the question? It would make life so much better!
let's close all questions by default and open them when five people vote so
@FélixGagnon-Grenier Now you're thinking!
heh
hmm there's no tag for deprecated ext/mysql. I propose we add one and build a close vote queue from that ^^
oh, never mind, EVERYTHING that matters is here phpinternalsbook.com/classes_objects/custom_object_storage.html <3
00:34
hey that thing is still online?
I thought it was abandoned 3 years ago when it was started.
it's still very useful.
Just like the "Zend Hacker's Guide"
@marcio A hell of a lot more useful than the manual, sure.
I'm just surprised someone kept it online this long.
maybe because there will be complains if it gets shut down
Given that's there's only Sara's book, that, and the manual, I would imagine so.
yea, it's not easy to navigate the PHP source if you do it only once in a while
00:40
@marcio Yea, like I haven't touched php-src since php7 and I don't even recognize half the code anymore :/
I feel like a tourist in downtown Moscow.
It's amazing how quickly you forget things once you stop writing code in a certain language. I've been writing mostly Scala for the last two months and I actually spent 5 minutes this morning trying to remember how static variables worked in PHP.
Or it could just be that I'm getting senile. You never know.
Certainly not. I've been using Golang and Rust more and more, sometimes I come back to PHP trying to define type information with function($var string), the other day I was in doubt if I should use static:: or self:: and was surprised __CLASS__:: is a syntax error.
programming is hard stuffs man :/
The funny thing is that these corners will be quickly erased from your memory, but the core concepts of every language you learn will stick easily.
00:59
Yeah, you can only know the full details of one or maybe two languages…
perhaps it was a mistake to fill the first slot with PHP :D
...not really
I filled my very first slot with BASIC... it was all down hill from there.
Actually, that's not entirely accurate. I spent a week trying to learn C when I was 9.
I gave up after the compiler spit out 1000 errors at me for a missing semicolon.
PHP => HTML+JS+CSS => Java => Obj-C => C => Asm => Go
That's pretty much the order in which I learned (and seriously used at least once) languages…
That PHP ghost surely will haunt me for the rest of my life :-D
Ah, yeah… between C and Asm I missed Pascal.
PHP => JS => Lisp (meh) => C => Java (hated) => Go => Haskell (hated) => Rust
@marcio Haskell hated? Interesting… It's one of the languages I've always wanted to try (but never gotten to as I didn't know what to do with it).
@marcio Rust is scaring me with their lifetime management… somewhat…
01:17
I found haskell too dificult to read :x but maybe I didn't persisted enough to become "fluent" in it.

The biggest problem with Rust to me is that they can't decided how to design their things and keep it as it is. Even after 1.0. But hopefully it will stabilize more in the future. The compilation time is unbearable once you start to add larger deps to your project.
@bwoebi You and just about everyone else that learned Haskell who wasn't into research.
@Sherif I mean, I never even learned it
Good. It's useless otherwise.
Haskell's drive towards purely functional makes it impractical for the real world.
I've always wanted to learn it for it's paradigms (?) but never saw any reason actually compelling me to learn it.
There isn't one, really. There are functional languages out there more pragmatic than Haskell.
01:20
@Sherif I wonder whether/why @Andrea is differing here… … AFAIK she's done some real things with it…
@bwoebi I didn't say you can't do real things with it. I'm just saying it's insane to want to, unless your driven by a research project.
@marcio Isn't it a bit like C where every file can be compiled at its own?
(I thought so at least)
@bwoebi per dep yes, but if you add a big dep you will have to compile the dep on the next cargo build. Some deps take almost 10~15 minutes.
@marcio well… then compile it first and start integrating (aka coding) the dep while you're compiling in background?
@marcio but, uh well… that's part of why you install things in shared libs (you pull from a distro or such) in order to avoid recompiling everything on a fresh machine.
@bwoebi I started with Rust not too long ago, my steps between code > debug are quite small compared to Go, for example. But they promised compilation time will be much smaller soon.
01:25
ah
Elixer, Erlang, Go, and Rust... they're all just spokes on a wheel that turn and turn. The spokes may change. The wheel never stops.
Hey, I just realized I sorted those in alphabetical order! What a happy coincidence :)
My brain must be on quicksort today.
@Sherif With a brain being a brain… sure it's not actually quantum sort?
@bwoebi Maybe. Who knows how the brain works :/
I have a hard enough time just trying to figure out how computers work.
> So i'm trying to make a push notification for my social network which was built using php...
This is how it starts people ^
Oh … oh … he opened the box.
Look there's no step-by-step guide on the Internet on how to build facebook! WTF
Or I guess twitter.
01:35
@Sherif Step 1: Go 10 years back in time. Step 2: Impersonate Zuckerberg.
@bwoebi All that gets you is Harvard dropout look-alike.
<?php

$obj = new stdClassImmutable(['foo' => 'bar']);
$obj->foo = 'blah'; // Exception: stdClasImmutables->foo cannot be reassigned \o/
but how to block $foo = &$obj->foo; $foo = 'blah'; ?
not sure if there is a handler for reading properties as references :/
@marcio you found the issue with typed properties.
[hint: it ensures at least a structure change of zend_reference]
can't we "just" add a handler for property reads as references?
we always know it's read as reference at compile time, I guess.
@marcio do you want to forbid = & (i.e. making it a ref in the first place) or only assigning to the ref?
01:44
I want to forbid the &$foo->foo access in the first place so there is no need to worry about what happens next
Well, if it was that easy you guys would have found a solution and the RFC would have been approved :P
@marcio so, do not provide a property_ptr_ptr access and check in the write handler whether a ref is being written to it?
in my case, the write handler is just rejecting any access
@marcio It's on my TODO list for sometime between October and December
but I understand that forbidding &$->foo for typed properties is too unpopular.
@bwoebi yes, please. That's an RFC that should have passed already.
Just get rid of references. All is well in the world again.
01:49
@Sherif references solve quite a few problems
+ it won't pass without by ref support, even if refs are used mainly for garbage code.
@bwoebi None that you can't solve better with objects.
you do not need tons of them, but they're handy quite some times.
references create more problems than they solve. They're a bad form of indirection.
@Sherif are objects really superior?
01:50
@bwoebi In my opinion they are. You don't need to tie the value to a variable to use an object.
references are more confusing.
I mean, objects are always by-object and you can't just forward an object by-value to a function without explicit clone
Because they create indirection to an indirection object.
@Sherif indirection to an indirection object? How do you mean?
@bwoebi You don't need to. function foo($obj) { $obj->prop = "change"; } $obj = new Obj; $obj->prop = "not changed"; foo($obj); // $obj is mutated without references!
@bwoebi Because a reference is tied to a zval, which is just another form of indirection. But one the user doesn't really know about or have direct control over. So references are more confusing. They're tied to the variable that created them.
An object, at least, is stored in an object store. The variable is moot.
@Sherif An easier view is having values and references just making multiple vars point to a same value.
01:55
got stuck trying to make &$obj->foo access an error and ...it's late, I'm going out for a run. Good night! :)
usually you have a single variable per value, but if you do $a = &$b, you make $a also point to the value pointed to by $b.
@bwoebi The problem is... variables are confusing things in PHP. They're structs of unions. That makes the thing we call variable very confusing.
@marcio you can't.
except by… uh…
overloading the assign_ref handler.
@Sherif they are held that way in memory, yes. But that doesn't quite matter for an user.
That's my point. The user makes poor assumptions about what a reference is because they don't know that.
I'm not saying it should matter to the user. I'm saying there's too much magic there for the user not to make a mistake.
With an object you can't easily make those same mistakes, because the behavior is easier to understand.
@bwoebi no idea how to do it, but I'll try that tomorrow. Ty.
01:57
@Sherif What's very magical about "a same value can be held by multiple variables through references"?
@bwoebi $arr = [1,2,3]; $arr2 = &$arr; function foo(Array $arr) { unshift($arr); } foo($arr2);
@Sherif with objects it's easy for users to inadvertently alter the object in a called function and wonder why it is changed after the func
There are maybe 1 in 100 people that even understand how that works in PHP.
@bwoebi I disagree. If you understand how object visibility works in PHP you have fewer chances of misunderstanding mutation.
But even if you understand how references work you still have a million places where you can misunderstand variable mutation.
@Sherif uhm? no?
Explain?
02:01
how do you misunderstand variable mutations if you know how refs work?
Because I've run into about 10 people every day for the last 6 years in PHP that misunderstand how references work in PHP.
@Sherif how do people think they work?
@bwoebi Easy, you use them for all the wrong reasons. For example, some people thing it's a good way to optimize memory usage. But if you break the is_ref you could end up increasing memory.
What's the meaning of "I'm crazy about it" ?
@bwoebi Mostly they don't, because there's too much magic going on under the hood that they aren't aware of.
02:03
@Sherif I mean how … what do they expect?
4 mins ago, by Sherif
@bwoebi $arr = [1,2,3]; $arr2 = &$arr; function foo(Array $arr) { unshift($arr); } foo($arr2);
^ show that to a PHP noob. They will never understand why that works the way that it does.
@Sherif yes, $arr will remain unaltered … would noobs expect the array to be unshifted?
Even if they understood references generally.
@bwoebi Sorry, wrong example. Make that by ref in the function.
@Sherif but TBH, if I showed them $arr = [1,2,3]; function foo(Array $arr) { unshift($arr); } foo($arr); they'll likely be wrong.
most noobs do not really even grasp by-value correctly; in many case it just works.
@bwoebi The confusion isn't the variable scoping. It's that arrays themselves also carry another level of indirection. So it's actually possible to send an array that contains references to other variables to the function, which might alter them, and they wouldn't expect the global variables to be altered.
@bwoebi True enough, but my point still stands. Objects are better for all the problems that references were meant to solve without any of the confusion.
I've seen noobs wrap their heads around objects more quickly than references.
In PHP, anyway.
References are just obscured by the fact that they deal directly with variables, which in PHP are very unobvious. For example, in PHP $a = 1; $b = $a; // you don't understand the distinction that $a and $b both carry the same value until someone tells you
02:09
Anyway, foreach by ref ftw.
So it's easy to make the assumption, oh, I know how to save memory. I'll just use a reference!
and now you have OOM everywhere :/
Copy on write semantics are confusing, but a necessary evil in PHP.
@Sherif References may even save memory…
If … you do it correctly. Obviously.
@bwoebi may ... you and I know that. The average PHP guy doesn't understand the may part.
@Sherif not arguing.
And it would give them a headache to try and understand it.
02:11
I really wouldn't even tell them that references save memory.
I find it easier to explain how to accomplish this feat with objects instead. Because I have to do less explaining.
Only use refs if you are sure that refs are suited…
@bwoebi That's the issue. You don't. They arrive at that conclusion all on their own.
They deduce this by their vague understanding of values vs. name values.
Which is how references are usually explained in most languages.
Nobody every tells you PHP is copy-on-write until you ask.
@Sherif the sad part is that people just conclude things without measuring/verifying.
I do sometimes conclude bullshit too, but not by that order of magnitude
@Sherif If people come from other languages, their primary cardinal mistake is to assume arrays being by-object…
(But yeah, the ref mistakes are much more subtle)
@bwoebi Actually, I find that the ones struggling the most with these issues aren't the ones coming from other languages. When you explain to someone coming from C or C++ that references aren't pointers in PHP they usually get it right away. But when you try explaining that to someone that has no preconceived notion of indirection in programming, they wrestle with it quite a bit.
If we just remove references from the language the vast majority of people will not suffer, because there are better ways of doing everything that a reference does in PHP without the added subtle side effects.
Of course, this is just my opinion. Obviously, some people out there will object.
02:36
@Sherif dude replaced "no working here"... you should check it out
02:47
morning
03:01
@PaulCrovella I didn't even get it. What exactly is the problem?
// not inserting here cause of error ... What error?
There should be a website ... howfuckedismyprogrammer.com like howfuckedismydatabase.com
First question: Is your question "why isn't this working?".... answer: You're fucked!
Wes
Wes
03:27
O/
03:41
"Look, I attempted to solve a problem that takes the average programmer thousands of lines of code to solve well, in a single line of code, and for some very strange and inexplicable reason--it didn't work :("
^ Said every programmer ever!
@Sherif header('Content-type: text/plain'); in that answer is going to confuse some people
@PaulCrovella shrug feel free to remove it ... I just copy/pasted from my IDE.
I have a directory of "common examples for SO" sadly :/
k, will do.. didn't know how you felt about me editing it
No reservations. I only answered to point them in the right direction tl;dr style. The question will likely be closed anyway.
cool
I actually have a live template set up so that ht<tab> automatically inserts
$html = <<<'HTML'
$HTML$
HTML;

$dom = new DOMDocument();
$dom->loadHTML($html);
$xpath = new DOMXPath($dom);
(with the cursor in place of $HTML$)
and a similar one for xml - makes setting up examples super quick
03:55
@PaulCrovella Template in where? Can you do that crap with phpstorm? I never bothered to find out.
I mean I'm sure you can... just too lazy to RTFM.
yep, in phpstorm. go into settings > editor > live templates
Ahh, I never go in there!
That's crazy I just guessed right before you said that.
<--------- lazy programmer is lazy
Anyone here working with Cassandra? please let me know.
@NandanPriyadarshi Don't ask to ask if asking about the thing you want to ask about is worth asking about to the person that is willing to ask what you want to ask about. Just ask! If someone knows they'll answer.
@She
@Sherif thanks to correct me..
Wes
Wes
04:13
@Wes if you put in the link to the comic rather than the image directly we get the mouseover text too, ya know
Wes
Wes
til
Hi!
I'm new to php, and am stuck somewhere
Can someone please tell me why $nextp = $_REQUEST['post'] + 1; is giving me an error?
04:30
@Rahul2001 Not unless you tell us what the error was.
Wes
Wes
also don't use $_REQUEST, use either $_GET, $_POST or $_COOKIE
I was using it to get the url...
Wes
Wes
then use $_GET
ah, okay
is there a specific reason why?
@Rahul2001 Completely and utterly irrelevant information. Try providing the error message you got rather than arguing over moot, subjective, tid bits of suggestions that have probably have nothing to do with solving you problem.
04:33
okay, sorry
Reading the actual error probably already tells you why. Your question is most likely "how can I fix it".
Nobody can answer that question for you without knowing what it is that is broken in order to need fixing.
Wes
Wes
switching to $_GET won't solve the error, of course
Uh... okay, I just found the error...
sorry for wasting your time...
It was caused by some incorrect syntax
thanks, anyway
Imagine that. Reading the error message results in solving the problem and avoiding a useless argument on the Internet about "the right way" to do something.
It's like I died and gone to stackoverflow.
Wes
Wes
lol
@Rahul2001 anyway, $_REQUEST is the sum of _GET, _POST and _COOKIE. it is basically a very effective way to make an incomprehensible mess and should be avoided
also could be a vector for attacks
04:40
that panda is too cute..
Wes
Wes
so, don't use it, use plain $_GET, $_POST, $_COOKIE
@Linus i know right, i love it :D
:D
@Wes Correction: $_REQUEST is the union all of variables_order. There may be cases when you want $_REQUEST. Don't make blanket statements of right from wrong. Instead, teach people what something does and let them make their own decisions about what is right for them.
Trying to teach people right and wrong in programming is like trying to teach people what is impossible. If we did that we'd never make any strides in technology. Instead, teach people what is possible and let them figure out what they can do with it.
Telling someone that they should never use $_REQUEST because FUD is useless information that only serves to scare people away from understand what $_REQUEST is or how it could be useful to them. But explaining to people exactly what $_REQUEST is and how to control it's behavior (i.e. request_order), on the other hand, allows you to make a sensible decision about its usefulness.
Wes
Wes
completely disagree with that. "just don't do that for now" and "you'll eventually figure out why" works for novices. the reason hardly can be understood by a beginner, and frankly if i was a beginner i would be scared to hear it
Imagine I have a search parameter and I don't care if I receive the value from the query string or in the HTTP body. $_REQUEST makes perfect sense.
Wes
Wes
04:49
yes, if you are completely aware of the risks of using $_REQUEST
@Wes Right, and it only took me one sentence to explain all those risks to you. I can definitely see how a beginner could hardly understand that.
Sometimes our reasoning for defending a bad idea is based on our own lack of understanding.
The better outcome is to always educate rather than say "because FUD"
Beginners often don't have the understanding problem. We do. Because we're filled with years of failure. It's in our bones to tell people NO because where we only remember pain, trouble, and crisis, they have no such memories. They don't yet know right from wrong. They can't tell the difference because they don't know anything yet.
All they know is what you tell them and if what you tell them is to fill their head with fear, then they will never bother to learn.
That fear only stands to grow inside them. It will become more difficult to replace it with knowledge.
Wes
Wes
i don't think so. i've been taught to do certain things but eventually i wanted to know what i was doing and i started questioning anything. it just takes time. on the opposite, having to worry about REQUEST would have scared me, while being a beginner
i don't think people being told what to do lose the ability or will to learn
It can. When you're constantly told not to do something, because it's bad you have less and less reason to try and understand why or how it's bad. That's not really going to encourage you to want to figure it out later.
You forget that fear is based on a lack of knowledge and to a beginner, they are lacking in all knowledge. So what they have to be afraid of is equally distributed to everything they're learning.
The difference between just don't do this because it's bad and this is what this does is that one ingrains the fear permanently as they knowledge faucet has now been cut-off permanently. The other just turns down the pressure a little.
You can't prevent confusion. You can only try to manage it.
depends on ones ablity to question what he is doing why people telling him to do something and sometimes not.
Wes
Wes
It can. When you're constantly told not to do something, because it's bad you have less and less reason to try and understand why or how it's bad. > i don't think it's like that. maybe it's just me
05:01
@Linus If the responsibility of the student is to ask questions. Then it is the responsibility of the teacher to foster curiosity in the student.
Which one fosters more curiosity?
Put it this way: which one is more inviting to open up a dialogue? The approach that reminds the student they are not knowledgeable and that they should accept the dogmatic information you provide? Or the approach that reminds them we weren't born knowing everything and these things can all be learned slowly.
In order to keep learning you must be stimulated to continue asking questions. You aren't likely to continue asking questions about the thing that everyone hates and reams you out for.
Sherif I teach students in part time. I have seen some students they started generating curosity after I taught them and some not
@Linus Not everyone is naturally curios. But in a class-room setting it is definitely the teacher's responsibility to create a petri dish for inciting questions from their students.
@Linus It's the Socratic method!
Without critical thinking all knowledge becomes useless.
Wes
Wes
communication in here is most of times limited to few messages. mine wasn't a "listen to me, i know what i'm doing, then just do this" as i'm a complete nobody on the internet, but more like an invite to question what he was doing if he's interested in doing so
@Wes Except that it didn't pose a question. It made a definitive blanket statement. The intention may be good, but long-term that type of messaging typically just results in even more disastrous outcomes. Not trying to point the finger at you, by the way. I'm just making a general observation that should be taken with a grain of salt.
Wes
Wes
curiosity is theirs. i suggest something is potentially wrong but i won't force them to listen the reason unless they express interest into doing so
05:13
Yea, but the message doesn't say "this is potentially wrong". It says "this is wrong". I get that your intentions are good. But I would rather start off with a question than a statement. "Why are you using $_REQUEST?" Perhaps they know ... and perhaps they don't. But at the very least the discussion moves from being confrontational to being educational.
Otherwise, it's a waste of time to even make that statement. For all we know they know $_REQUEST is perfectly OK for that use case.
But since we never bothered to discuss the use case and moved directly to "you're wrong" it becomes confrontational.
Wes
Wes
maybe that's our problem. i still think _REQUEST has zero use cases :P
@Wes Why do you think that? I just provided one such use case.
I think most people just don't know what $_REQUEST is in the first place, because just like you, they were once told don't use it and they never bothered to figure out why.
You have complete control over $_REQUEST. It's 100% under your control. It's well-defined. It's just another super global. So it makes no sense to say that super global X is wrong and super global Y is right.
Wes
Wes
what is it then? what's wrong with doing just $a = $_POST['a'] ?? $_GET['a'] ...;
@Wes Nothing. But that begs the question what's wrong with doing $a = $_REQUEST['a'] if they both do the same thing?
Wes
Wes
it's redundant information
05:18
See the difference is I'm not saying one is right and the other is wrong. I just know what they do.
@Wes How is $a = $_REQUEST['a'] more redundant than $a = $_POST['a'] ?? $_GET['a'] exactly?
Now you're just making no sense.
Wes
Wes
i won't have myself or anyone else be in the situation to have to decide or be forced to figure out if they should use $_REQUEST or one of the other sg's
@Wes Wait, so what you're saying is because you don't wish to think nobody else should either?
wha?
Are you trolling right now?
Wes
Wes
i'm not trolling. my time like yours costs money and it shouldn't be wasted on that
but you are free to do anything you want, of course
No idea what any of that means, but feel free to answer any of the questions above that you so elegantly evaded.
4 mins ago, by Sherif
@Wes How is $a = $_REQUEST['a'] more redundant than $a = $_POST['a'] ?? $_GET['a'] exactly?
4 mins ago, by Wes
i won't have myself or anyone else be in the situation to have to decide or be forced to figure out if they should use $_REQUEST or one of the other sg's
Does any of that sound like someone that values their time and wishes to use it wisely?
Your thesis statement here was that thinking is bad ... yet what you've demonstrated is that a lack of thinking isn't very good :)
Wes
Wes
reminder to self: when enter room warn everybody that i just woke up and can't even feel my face yet so they won't think i'm elegantly evading discussions
:D
@Wes I'm sorry. I don't understand how a picture of a USB cable answers that question.
Could you try putting that into words?
Wes
Wes
:P how many times did you try to insert the usb plug the wrong way? and how many the ethernet cable?
@Wes I have no idea what rhetorical point you're trying to make here. $_REQUEST is not ambiguous. It is well-defined by request_order.
Again, the intent of $_REQUEST is that you don't care where it came from.
Also, you're really bad at making rhetorical points. I wouldn't use that as a tool if I were you. You took the very definition of redundancy and tried to use it as an example of something that's less redundant. Way to go! :D
05:41
well i agree with both of you :D
Wes
Wes
@Sherif except request_order is customizable in php.ini. how many times did you not care of where the data came from? it's the same that happens with people defending static methods. of course you can use them so that code will be fully testable, so that everything will look and behave perfectly, yet no one is able to tell why i should use them rather than just using regular methods, which can serve the same purpose without being (even if just slightly) ambiguous or redundant
@Wes Not many, but that's not the same as never. Also static methods are yet another bad example, because you're defending the wrong thing there.
What you're saying is a biproduct of a lack of understanding. That's not a defence for I shouldn't use it. It's one for I still don't know how to use it.
Those are two very different arguments.
I use a static method because I don't need access to the object instance.
There I just told you why I should use it.
Now... what was your question again?
;)
Wes
Wes
and what you are saying it's not a defence for "i should use it" which is my whole point. their existence is not a good reason to use them
@Wes I never claimed to defend that point. That wasn't my point. It was yours. The only thing I claimed was knowing what it's for. Not saying whether it was good or bad, right or wrong,.
There is existence is explainable. When you have input variables that can come from either the HTTP body or the query string, and you don't care which one it comes from, all you care about is the variable's value, then $_REQUEST becomes useful.
It's existence explains how it can be useful...
But if you ignore the very thing that makes that possible, then I agree ... will never understand how it's useful.
The fact that you personally haven't found a use for it is irrelevant to that.
Knowing what something does usually suffices to explain where it can be useful and where it is not. Not knowing what something does, on the other hand, only serves to further your confusion. Because you're then only making assumptions about what it does, which can only lead to assumptions about whether or not you need it.
How will that ever result in an understanding of it's usefulness? I posit never since here you are clearly demonstrating a lack of understanding in the thing you claim isn't useful.
You can't claim something is or isn't useful without first understanding what it does. Because without that you don't have enough information to arrive that conclusion.
Wes
Wes
again i'm not saying that they can't work sanely. they can, of course, but at the price of something
confusion, ambiguity, even just being out of conformity with the rest of the php community's code
05:58
And informing them what it is and how it works clears up all of that confusion and ambiguity. One's code need not be conforming with everyone else's code unless everyone else plans on working with the same code.
The point here is that you suffer from the very lack of understanding that you detest in others.
I know, because I used to suffer from it too.
Once I tell someone about request_order all of the confusion usually dissipates and they can immediately tell whether or not they actually wanted $_REQUEST or one of the other GPC variables for their use case. Most of the time they don't, but every now and then it actually turns out they do.
The difference, you begin by assuming you know everything there is to know about the problem and work your way up to the solution. That's a hard way to solve a problem. Because a single faulty assumption results in the sum and total of your work being for nothing. The easier approach is to begin by assuming you don't know anything about the problem and work your way from the top-down, learning as you go.
Any single mistake then stands out like a sore thumb, and correcting it is trivial. You need only go one step back to continue progressing.
when i try to check any email address exist or not by SMTP by PHP script.
getting following error.....
Warning: fsockopen(): unable to connect to gmail-smtp-in.l.google.com:587
@babi Here's a hint: It usually tells you a little more than that.
this script is work in localhost my port no was 25 but when i used this script in server i have foolowing error Warning: fsockopen(): unable to connect to gmail-smtp-in.l.google.com:587 i have searched thru net someone suggest me to change port no
I used smtp_validateEmail.class.php library
if ($this->sock = fsockopen($host, $this->port, $errno, $errstr, (float) $timeout)) {
stream_set_timeout($this->sock, $this->max_read_time);
break;
}
}
@babi Here's a hint: The error message usually tells you a little bit about why it couldn't connect. Is that the entire error message you got?
I'm willing to bet that it's not and you left the most important part of the error message.
Warning: fsockopen(): unable to connect to gmail-smtp-in.l.google.com:587 (Connection timed out) in /home/manishm2/public_html/screening/recruiter/file_upload/mail/smtp_validateEma‌​il.class.php on line 155 it is the actual message
06:07
Ahhh!
So then the connection timed out.
yes
someone suggest me to change port no so i have changed port no 587 my actual port was 25
Great, so at least we know it's a timeout problem. Which means that neither party sent anything down this pipe for the duration of the timeout setting.
ummm, if the server isn't listening on that port that wouldn't help. Your issue is most likely that your server doesn't have those ports open.
Wes
Wes
@Sherif i would never engage myself into arguments i don't have a complete understanding of them nor i would force my thought to other people. so this ends here
Talk to your host.
1 hour ago, by Sherif
Without critical thinking all knowledge becomes useless.
Sir but this code is worked in localhost
with the port no 25
06:12
@babi Yes, I got that part already. You ran it on your own computer where you have control over which ports are open. Now you're running it on someone else's computer where you don't. Go ask your webhost to open up ports 25 and 587 for you.
thanx for helping me
06:31
Does anyone know the current KBFS quota?
> KBFS & KYDT are multi-dimensional radio stations
I'm gonna say nope
Sorry, Keybase Filesystem
Hi..
...and what the hell are multi-/dimensional/ radio stations?
I am working with my local host i connect the live server database.. i connects but took much time near 0.247 + for an connection.. how can i resolve it
06:38
@dinesh Rebuild the Internet and solve the latency problem.
Q: kopy.io/S86hA I get this response, the only thing I can be 100% sure of is that "photo index" always starts with 1, I also only have to grab the first one ( so the one with photo index 1). Is there a way to find that one fast?
@m6w6 I had the same question. First google search result for kbfs was kbfs.com
only in america
@Duikboot Nope. You have to search every value in the array. That's how array values work, unfortunately.
fast is not possible with O(n) search.
You're using XML so I'd say just put in your xpath query.
But trying to find a faster way of searching this array is an exercise in futility.
ugh, and stop using simplexml
(because I hate it and said so)
Hello i have checked port no 25 is open in web server by ip address using tool. I have check status of port no using this site yougetsignal.com/tools/open-ports
06:46
@PaulCrovella That was a 100% convincing argument. I'm actually sold.
It tell me port no 25 is open in my website
then why this error is come connection time out
@babi It might only be open for incoming. Clearly it's not open for outgoing. Talk to your host.
Step 1) Stop not doing the one thing you were told to do. Step 2) Profit
@Sherif sorry i dont think it was Internet problem, load on my live server connection Time - 0.0048551559448242, and same time i run my local host connection Time - 0.95328593254089
@dinesh You're trying to connect to a database that is likely thousands of miles away. Your live server is connecting to a database that is likely 10 centimeters away. Which do you think will take more time?
I'll let you mull that over.
Good morning you sexy people
06:49
@Epodax I feel that is discrimination against the otherwise unsexy. Where do I file my complaint?
@Sherif So - array_search() could help me?
@Sherif Right How can I improve my speed
@Duikboot Sure, it would help with the finding the value part, but an xpath query is likely to help you with the faster part.
@dinesh Go a shorter distance.
@Sherif I don't know why you are complaining, you are the concept of sexy :D
@Epodax awwe, now I retract my complaint :D
@dinesh Let's put it this way: speed isn't your problem. The speed is beyond your immeidate control. The problem is in time, which has to do with distance over speed. time traveled = distance to travel / rate of travel. So the only thing you can do to reduce time spent making a connection here is to reduce the distance that you need to travel. Why are you connecting to a database over the Internet from your local environment and not a database in your local environment?
06:58
Yes database was present in my local host even though i tried to connect my live server and need to work with that, If i live my site with different Servers means files all to be present in a server and database will be in another server, so that only i tried this @Sherif
Blasphemy! Heresy! Defection! Iconoclasm! <insert more synonyms with negative connotations here>!
!!dad
I just watched a program about beavers It was the best dam program I've ever seen
@dinesh Well, what you're doing is the equivalent of making a trip to the supermarket every single time you need a glass of water. I don't think you will be happy with the amount of time spent making trips to the supermarket after a while.

« first day (2153 days earlier)      last day (3021 days later) »