« first day (1779 days earlier)      last day (3168 days later) » 

5:29 PM
exception 'UnexpectedValueException' with message 'Decode error: Empty domain name at position 0x1e4' in /Users/Bob/amp-dns/vendor/daverandom/libdns/src/Decoder/Decoder.php:255

that now sounds more like an actual error now...
 
5:40 PM
Given CQS, what about the edge case of querying, "How many queries have been run?"
Not being silly, but curious about meta-queries.
Just treat them as an exception to the rule in an otherwise absolute system?
 
hello
i got a question
which i really need to be answered
 
i'm pretty new to web development, currently working on a test site/project which features user authentication system
and in case user forgets his/her password system is intended to send him a reset link to his mail id,, my question is how it's going to come true
while href mailto requires a mail client to send mail to a specific address
and i don't know what's the procedure with hosts, how do i get this done?
any tutorials?
help would be much much appreciated mates. thank you
 
I'm kinda confused here
what exactly is the part you cannot figure out?
how to send the mail or how to make the "reset link"?
 
how to send the mail actually
 
5:48 PM
you should use either PHPMailer or SwiftMailer library
 
sir will you plz elaborate how php mailer differs from a regular mailto tag?
and does it not require a mail client to send mail?
and how i'm going to configure it
 
What is a "mailto tag"?
 
html <a mailto"">
attribute sorry
 
those are not used to send amail
 
you see i'm a student and beginner in this field trying my luck to learn soemthing
so i hope you would forgive me for my silly mistakes :)
 
5:51 PM
the mailto links do not send an email
same way as 'ftp` links do not send file and http links do not make websites
 
mailto link only contains contact information
 
i get it now
 
if you want to send a mail, you will have to use the PHP part of the website
I would recommend PHPMailer since that will be easier for a beginner
 
ok , let say i've a php script to send mails, but again it gets me confused that what address it would be using to send main , i mean address of sender
 
5:54 PM
@HassanZia The difference is your server is the one sending the email with PHPMailer whereas providing a link with <a href="mailto:some@inbox.com"> does you no good since this would make it possible for the user to email you, but you are trying to email the user in this case. They aren't going to send themselves the reset link, are they?
 
also, please note that "sir" is only use in India and Pakistan .. at least in normal conversations
 
lol :D I'm from Pakistan and didn't know it that "sir" is used only in sub-continent
@Sherif didn't get completely what you are saying
 
.. honestly, neither did I
 
@HassanZia I'm saying you are trying to send someone registered on your site an email. It does you no good to give them a link to your inbox. Since they'd be sending you the email in that case.
This doesn't help you in this case.
8 mins ago, by Hassan Zia
sir will you plz elaborate how php mailer differs from a regular mailto tag?
That's the difference.
 
a user who has forgot his/her password will enter his/her mail and would click the send mail button, then he'd get a rest link or password in his mailbox, they would be sending mail to themselves not to my inbox
 
6:01 PM
no
the php script would send them that email
 
Yes Hassan Zia, they press the button but You have to send them the email.
 
especially because you actually need to create that "reset password" link
and you need to store the hash of that link in database
 
@ecantu how i'm supposed to send them the mail?? while they press the button and script behind the button works
 
my assessment is that you started learning php less than 2 weeks ago
 
@tereško it's not the good thing to send them their lost password instead of sending them the reset link?
yup,
about 3 weeks
 
6:04 PM
Have you looked at the mail() function documentation? php.net/manual/en/function.mail.php
 
@ecantu when have you last seen anyone willingly using that function?
 
i don't get anything from mail() function
it's too complicated for me at this level
 
Teresko, I used it once for a personal project. It worked. I didn't know how to send email using php. I learned how to do it using that function.
 
@HassanZia if your site is made correctly, the password is hashed ... which means that you cannot recover it even if you really want to
 
I have 3 tables (with the same structure). users selects one of them and then search in it. now, I need to create 3 separated query for each of them ? actually my question is: is it possible to I use a variable as tablename ? (and it is standard)
 
6:06 PM
good websites to not have "recover password" links ... only "reset password"
 
wait please, you upload your site to a host, and then configure it send mails, don't you?
 
@HassanZia You just spent less than 3 minutes attempting to understand it. Put in a little effort.
 
well i'm not using encryption at the moment for passwords
 
@HassanZia encryption and hashing are two completely different things
google the difference
 
@PaulCrovella thank you
@tereško i think i need to start learning much more deeply then,
 
6:09 PM
@HassanZia I would recommend this book: wrox.com/WileyCDA/WroxTitle/… (you can torrent it too)
@Sajad you cannot have table name as a named parameter, if that's what you were trying to ask
there are other ways to do that
 
@tereško ye it were.., so what way ?
 
@tereško thank you
 
hola kids
 
@Sajad I think this requires some backtracking. Do you know why you protect against SQL injections?
 
@tereško why or how ?
 
6:12 PM
"why"
 
that's clear, because user can enter a code (drop table ...) as a input and then destroy my database
 
yes, but the the important words there are "user" and "input"
 
@taco hi
 
@tereško yes they are, so ?
 
:)
 
6:15 PM
so, if you want to change the table name, you will have to use string concatenation for building the SQL query .. something like "SELECT * FROM $table WHERE id = :id"
but
for this to be secure, you must make sure that either user has no control over $table parameter or that $table can contain only permitted values
that second approach goes by the name "whitelisting"
basically, you make sure that only three exact values can be contained in $table variable
 
I can create a array containing the name of my tables, and I just get a number of user as key !
 
... that's how you do this, @Sajad
@Sajad yes, that would be a good approach to implement it
 
@tereško I understand what is your point, ok tnx :-)
 
though, as I said yesterday: you really shouldn't use SQL for search
you should be using SphinxSearch or ElasticSearch
 
honestly I can not start to learn a new thing (SphinxSearch), I will launch my beta version of my website and I will develop it later (SQL for now, SphinxSearch for next ver)
 
6:22 PM
@Sajad what your web is going to be all about and when gonna be launched?
 
fair enough
 
@HassanZia I will launch it next week (If god willing) and it is a search engine (for Persian people) it is a free encyclopedia (something like wikipedia (of course really more weak))
 
@Sajad well wishing you best of luck and what's the domain?
 
@HassanZia thanks, www.lamtakam.com
 
Hi I need help but not exactly PHP...
Does anyone know if there are online text generators, which generate text with provided pattern ?
Sorry that I ask here but I saw that it is most active room so I choosed it
 
6:28 PM
@Sajad welcome :) and i think you didn't purchase it yet
@10101101 sorry i'm a noob :P so don't know
 
@10101101 umm, text generators that output text like "Lorem ipsum..."?
 
@HassanZia I bought it 5 days ago ...
 
I mean exactly, I have 250 pictures which I want to put into html page
 
@Sajad from which provider?
 
@tereško from a Iranian website (hostiran.net)
 
6:31 PM
I dont want to manually type 250 img tags, so I thought to generate it 250 times, with pattern like <img ... src=".../img###.jpg">
 
@Sajad here's what i'm getting in my browser prntscr.com/8aohtf
 
@10101101 are you using php?
 
@10101101 why don't you use some kinda script and put it in a loop ?
 
thats a problem cause im not on my computer right now and it doesnt have any java or php
 
@HassanZia actually I don't have host now, I will buy a VPS or tomorrow or (tomorrow+tomorrow)
 
6:34 PM
@10101101 What about javascript?
 
@Sajad from Iran?
 
@HassanZia no, from www.digitalocean.com
 
@10101101 javascript can handle it too
 
@10101101 just code it yourself on 3v4l.org
 
@ecantu I know but was curious if there is something on the web already ...
 
6:36 PM
@Sajad oops i mean are you from Iran? as you said it would be a search system for persian people
 
@10101101 I tried @Danack's link.. it works ;-)
 
OK thanks guys I will code it
 
google can talk persian
 
but in Java cause i dont know php or js
 
This is the code in php: for ($i = 1; $i <= 250; $i++) { print "<img src='' >\n"; }
copy-paste it
 
6:41 PM
@10101101 ideone.com comes in handy, java is supported.
 
ya know, you can make websites in Java
 
if you hate yourself, sure
man, some questions just cry out "in over my head"
 
@PaulCrovella "Two things are infinite: the universe and human stupidity; and I’m not sure about the universe!" -- Albert Einstein
 
I just can't imagine the technical journey their life took that lead up to asking that question.
 
6:57 PM
@10101101 same is the case with me, i've been working with java, new to web development
 
@bwoebi no I didn't. Seems the mail server didn't pick it up...
Sent again
 
When practicing TDD do you really need to write a crappy test instantiating an object just to give you a reason to create that class which you always knew you were going to need anyway? My scenario is creating a Texas Holdem poker game. I knew before I wrote any tests I'd have some sort of Game, Player and Table classes but are you really supposed to start by testing one class at a time bit by bit until the tests point you in the direction of needing a new class
 
@ircmaxell Still not there… news.php.net/php.internals
 
What I did was create a game object with addPlayer(username, chips, position). Just to pass the tests of adding a player I did the bare minimum of adding an associative array of players to the Game class for holding players and their info. It is pretty obvious and makes sense to now have a Player class and Table class which holds the players and their chips and position at the table so now I have to refactor my production code and the test code to work with these new classes?
 
@bwoebi something must be wrong with listserv
Dropped a note on #php.pecl
 
7:12 PM
@ircmaxell probably. The bench robot didn't send any mail yesterday/today too.
 
Yup, nothing since Friday.
 
@bwoebi Does phpdbg use SIGCHLD for anything?
I get this when running a phpdbg -qrr vendor/bin/phpunit with a test that launches a separate process:
PHPUnit_Framework_Exception: --&gt;  STR_PARAM(//=2)
--&gt;  STR_PARAM(define('STDOUT',=16)
--&gt;  STR_PARAM(define('STDERR',=16)
--&gt;  STR_PARAM(@ini_set('highlight.comment',=29)
--&gt;  STR_PARAM(@ini_set('highlight.default',=29)
--&gt;  STR_PARAM(@ini_set('highlight.html',=26)
--&gt;  STR_PARAM(@ini_set('highlight.keyword',=29)
--&gt;  STR_PARAM(@ini_set('highlight.string',=28)
--&gt;  STR_PARAM(@ini_set('include_path',=24)
 
@Trowski looks like you compiled with --enable-phpdbg-debug ? Turn that off, it's not helpful for anyone (except devs)
 
@bwoebi This is on travis actually :(
 
can you show me a link?
 
@Trowski and btw. no it isn't
weird…
 
Here is the test that is causing that:
    public function testChildSignal()
    {
        $callback = $this->createCallback(1);
        $callback->method('__invoke')
            ->will($this->returnCallback(function ($signo) {
                $this->loop->stop();
                $pid = pcntl_wait($status, WNOHANG);
                $this->assertSame(SIGCHLD, $signo);
                $this->assertInternalType('integer', $pid);
                $this->assertInternalType('integer', $status);
            }));

        $signal = $this->loop->signal(SIGCHLD, $callback);
 
@Trowski yeah, it's trying to execute your code as commands…
> test that launches a separate process
the problem is that phpunit invokes a new process with the name of the php binary and tries to pass the code to stdin
which obviously doesn't work with phpunit
that's unrelated to SIGCHLD
@Trowski point is, it doesn't work nicely to put code to stdin with phpdbg. … Because you'd start process then… and then upon interruption (uncaught exception, whatever) you get a prompt… with a closed stdin??
 
@bwoebi It's worked well with 5.x, but obviously doesn't play nice with phpdbg.
@bwoebi This explains why the callback is invoked twice when I run phpunit only.
 
7:35 PM
@Trowski any good idea how to solve it … I mean … how could we provide a way on phpdbg side to pass code directly on stdin ?
@Trowski I could imagine a command you can pass a length to… but that's not great in case the user is using it interactively…
 
@bwoebi I don't really know enough about phpdbg to offer any suggestions.
 
@Trowski It's a generic problem, not a phpdbg specific problem…
In the sense:
how can you in an interactive program best let the user provide raw text without a specific separator
 
OK thanks guys
done :)
 
the only thing coming to my mind here are signals…
 
@10101101 what are you working on?
 
7:45 PM
like sending a sigint after all code written to stdin
 
@HassanZia yes I'm from Iran.
 
@bwoebi I suppose that could work...
 
Are there differences between interactive mode an just running a file directly? Maybe it could be allowed only when running a php file.
 
not sure what you mean?
 
7:50 PM
Running phpdbg -r file.php vs. phpdbg file.php
 
@10101101 sorry for my ignorance but, what language is that?
 
@Trowski well, no, there's no real difference… it's just implicitly invoking run command and then not going to restart after end of script.
It's both interactive mode
It's just -qrr which never shows you a prompt if there was no breakpoint or similar.
 
@bwoebi I thought so, but figured it was worth asking.
 
@10101101 according to google Polish
 
yes it is polish
 
7:59 PM
@bwoebi (or anyone but almost certainly bob), can you point to an example in php-src where an exception is detected for and replaced with a more specific exception. i.e. I did a call to a zend function, which has set an generic exception - I want to replace that with a more specific one.
 
@Danack at least that way you can look at the current execute data and decide what to do for example.
 
@bwoebi Actually, I'm failing before I even get there. Is EG(exception) meant to be set for Errors e.g. $foo->somePrivateMethod() ?
 
8:15 PM
@Danack sure… for every thrown throwable.
 
k...I must be doing something dumb then.
 
Guys what is the bets way to store page views
in mysql
Is it deserving of its own table?
 
it depends
 
8:32 PM
It's cool, i just phoned up mark zuckerberg and asked him
 
@Danack just set a breakpoint there and look what goes wrong…
Also, whose exceptions concretely are you trying to change?
 
8:46 PM
I'll check it in tomorrow for you to look at if I can't figure it out - apparently I'm just having a really off day.
 
@Danack See you tomorrow then ;-P
and…
aren't you maintaining libdns too? @Danack
 
this might not be the day to bring that up
 
@bwoebi not that much - I saw your thing earlier. I'll decompose the packets to a unit test tomorrow.
 
fine :-)
 
9:00 PM
well, fuck
I am really bad at javascript
 
9:34 PM
hello ! guys i want to create a php script when scroll down product will be display using ajax and php any help
 
yes google
 
do you actually have a question?
 
@Asif_SE what have you tried?
 
9:53 PM
@kelunik Default.
@ircmaxell @NikiC @bwoebi Can any (or all) of you explain why the random_bytes() and random_int() functions will throw Error when $max < $min or $length <=0?
Why isn't this an Exception or some specific Error?
 
@LeviMorrison you could make it a more specific Error, yes. But we didn't want to bother and bikeshed that now at this stage of RC.
 
Why not an Exception?
 
because it's actually an Error of the programmer.
a programmer should not allow $max < $min or $length <= 0 to be passed in there.
 
10:09 PM
i going to kill myself
:(
 
that's kinda your own choice
 
yeah, i found a "lib" for c# to decrypt aes with ccm mode and adata
now it bugs when you use adata
if you dont use adata, the tag is matching, if you use it with adata somthing is going wrong on verifiying but its enrypt the data successfully
decrypting*
 
@LeviMorrison though the case where the source isn't available, is an Exception, because the programmer can't really mitigate that.
 
11:01 PM
I'm trying to create a sort order by time entered.
I figured it out
Well, not quite actually
 
11:21 PM
I want my results with a time set as none to be at the bottom of the list
 
Anyone think they could help me out? stackoverflow.com/questions/32300710/…
Having a problem with getting PHP to insert data from my form into my MYSQL database
 
what have you tried
 
Should be very easy to fix however I've been sitting here for hours baffled!
 
can you format your code better in your question please
 
Honestly, it'd be easier to tell you what I haven't!! haha. I've been recommended to switch to PDO? Is it worth it? I've been coding for a couple years but haven't really done anything in over a year now and so am very behind on everything..
 
11:24 PM
@BradAndrews I'm not going to look - but I will advise you'll get better anwers if you can provide a Short, Self Contained, Correct (Compilable), Example sscce.org rather than completely unrelated stuff.
 
I can do ben how would you like me to format it?
 
Just better formatted
 
Okay, reason I put the entire code in the to be honest is with most of my other questions later along the line I've just been told to put the entire code in to try figure out the problem...
I'll format the code and post here when done okay?
Okay edited, hows that? Only included the SQL query and code I felt was relevant to the question.
 
I meant break up your code chunks and make it look clean
 
I'm not entirely sure what you mean by breaking it up? I've replied to your answer by the way... I'll try and add comments to the code and give explanations to each part of the code to make it easier for the eyes?
 
11:48 PM
@BradAndrews
 
Sorry added the code to a comment but not sure how to format it as CTRL + K didnt work...
added it to the OP as reqested.
@benlevywebdesign
 

« first day (1779 days earlier)      last day (3168 days later) »