« first day (2447 days earlier)      last day (2501 days later) » 

user5876173
12:01 PM
i have a condition like this

if(mysqli_num_rows($query) == 1)
{
$rand = time().rand(1000,9999);
$encr = sha1( $rand );
$row = mysqli_fetch_array($query);
$id=$row['id'];
$update_query = "UPDATE `users` set `key` = '$encr' where `id`='$id'";
$result1=mysqli_query($conn,$update_query);
echo mysqli_error($conn);
$redirect_url='http://localhost/sharemoog/resetpassword.php?token=';
echo "Click below link to reset your Password <br> <a href=".$redirect_url.$encr.">Reset Password</a>";
}
else
{
echo "Email ID Not Found";
 
@user3663 you may want to search for "how to redirect in php"
 
@user3663 printing a message that an email wasnt found allows me to brute force valid emails on your system.
 
user5876173
i know how to redirect in php..in that link i have to pass those 2 variables
 
@user3663 where are you getting these 2 variables from?
 
user5876173
in the same page above form i have those two variables
 
12:13 PM
@user3663 what is the error that is coming up?
 
user5876173
when i use that link directly in my button it showing url like this
 
user5876173
localhost/sharemoog..$redirect_url.$encr.
 
printf("http://localhost/sharemoog/resetpassword.php?token=%s", $encr);
 
I still don't understand your issue @user3663
Ohhh
My bad didn't expand your initial text
Does it keep showing the "Email id not found" echo?
 
12:28 PM
morngingin all
 
0
Q: percentage and vice versa calculations has issue in points jquery or javascript

Ram SinghI have three textboxes one for Quantity, second for amount and third for percentage. If i enter any value in quantity then according to it, i have to calculate the other two things and need to do this for all textboxes. I have separately the total amount of quantity and all other factors. Please ...

please help me
 
happy birthday @Jimbo!
 
Anonymous
yo haackdia
 
I have only seen rain since I am back in the country... :(
 
user5876173
12:32 PM
no the thing is i ha$redirect_url='http://localhost/sharemoog/resetpassword.php?token=';
echo "Click below link to reset your Password <br> <a href=".$redirect_url.$encr.">Reset Password</a>"; ve a url like this
 
user5876173
so when ever i enter password and click on reset password it showing like this Click below link to reset your Password "resetpassword"..so when i click the restpassword link it goes to another page.
 
user5876173
so instead of showing this message..i want to give thatlink in my resetpassword button it self...
 
user5876173
i dont want to show this message
 
user5876173
Click below link to reset your Password "resetpassword"
 
12:35 PM
Does the HREF echo out as you want it to @user3663?
 
user5876173
yes
 
Anonymous
@PeeHaa :(. If it makes you feel any better, I'm going here soon bhmallorca.com
 
user5876173
i want that href link in my resetpassword button
 
@Patrick it was beautiful to me up until I saw that you put opening brackets on a new line :P
 
@JayIsTooCommon Looks noice
 
12:38 PM
@user3663 are you using bootstrap?
 
user5876173
yes
 
@Patrick how is that beautiful? it's a controller with business logic.
 
@sutt0n that really what put you off?
 
user5876173
@MinistryofChaps yes i am using bootstrap
 
Anonymous
Also using else in a method.. gross.
 
12:40 PM
@Gordon it's a refactoring exercise
I tried to make it as bad as possible
 
Anonymous
ohh, this is your task for applicants?
 
@Patrick ah, that explains why it's full of sql injection
and missing headers
 
@JayIsTooCommon one of them
 
and all the things
 
@kelunik no
but you can already use mixed, which was my whole point
 
12:43 PM
@kelunik uh, where did the Aerys docs end up actually? … can't find the Aerys tutorial anymore?
 
@user3663 gimme a sec
 
user5876173
@MinistryofChaps yeah ok
 
lol I love that $sth->fetchAll(2) as $r
 
Anonymous
@Patrick what would be your brief out of interest? Just, refactor this?
 
@user3663 echo '<a href="' . $redirect_url . $encr . '" class="btn btn-default">Reset Password</a>';
All you need to do is add a Bootstrap button class to your href and it will make it look like a button.
@user3663 is that what you were looking for?
 
user5876173
12:48 PM
no i already have a button after input box
 
@JayIsTooCommon pretty much. got a testsuite that should still pass. Refactor until you are happy with it
 
user5876173
@MinistryofChaps no i already have a button after input box i have to give this link in the button it self
 
found a way to add references as well :D
 
user5876173
here is my from <form role="form" data-parsley-validate="" novalidate="" class="mb-lg" name="form" method="post">
<input id="key" type="hidden" name="key" placeholder="Email" autocomplete="off" required class="form-control">
<div class="form-group has-feedback">
<input id="email" type="email" name="email" placeholder="Email" autocomplete="off" required class="form-control">
<span class="fa fa-envelope form-control-feedback text-muted"></span>
</div>

<button type="submit" name="reset_password" value="reset my password" class="btn btn-block btn-primary mt-lg">Reset Password</button>
 
user5876173
in this button i want to give that link
 
Anonymous
12:50 PM
@Patrick what's the position?
 
@user3663 you could put it as the value in your button.
 
@JayIsTooCommon php dev, whatever we can get from junior to senior...
 
user5876173
@MinistryofChaps how should i give ?can you please explain a little bit more
 
value="reset my password" would be value="$redirect_url . $encr"
 
@Patrick you guys allow remoting?
 
12:52 PM
@FélixGagnon-Grenier only partially (I do 50% remote)
I don't think they like the idea of 100% remote
 
user5876173
@MinistryofChaps if i gave like this it's not directly redirecting to my resetpassword page
 
user5876173
it again showing forgotpassword page
 
@user3663 your forgotten password functionality is very odd, bare with me.
 
Anonymous
@Patrick refreshing to see a refactor task instead of a 'make this'. A high percentage of most developer roles involves refactoring
 
user5876173
12:57 PM
@MinistryofChaps hmm ok
 
@user3663 I'd recommend asking an actual question on stack overflow, I wish I had more time to help your implementation of the forgotten password functionality is a bit more complex than usual.
*time to help but your implementation
 
user5876173
@MinistryofChaps ok..thanks for your help..
 
@user3663 No problem.
This bloody imap_list doesn't want to work for me at the moment.
 
shouldnt your form tag have a action attribute?
 
user5876173
1:00 PM
@RonniSkansing no i didn't gave action attribute in my form tag
 
user5876173
i didn't gave
 
Why not?
 
user5876173
if i agve also i can give file name that's it right?i can't gave varibales..
 
user5876173
i want to give a link attach with varibales
 
1:02 PM
<form action="resetpassword.php"
I cant make sense of what you are saying
 
action="resetpassword.php?variable=myvalue"
this works.
hidden inputs would work as well
 
@user3663 ^ you can add all the query variables you need
 
user5876173
ok i will try..i never gave variables in my action attribute
 
Halp I have lost my pusername and assword!
 
if action is omitted it will submit to current page
 
1:04 PM
Yes
Which I think is one of the reasons the OP is a bit confused.. mangling together logic
 
off to work
 
Enjoy works
 
\o
 
user5876173
@RonniSkansing i gave like this action="resetpassword.php?token=$encr"
 
user5876173
so it redirects me to the login page
 
1:08 PM
@bwoebi Nobody migrated them yet.
I can't do all the things.
 
@user3663 is that what you expected?
 
user5876173
noo
 
user5876173
i want to redirect to resetpassword page with token value
 
so if you write die('LOL'); in the top of your resetpassword.php file
 
@kelunik Yes, but where is the old version right now?
 
1:09 PM
it never hits it?
 
user5876173
@RonniSkansing yeah it redirect to reset password page and it showing LOL..but in url i can't able to see my token value
 
did you var_dump($_GET, $_POST); die('LOL');
 
user5876173
noo
 
user5876173
ok in the top of the page right?
 
1:13 PM
yea just before the die(..
 
@bwoebi in the repos history somewhere
 
@kelunik ugh, you just killed it wholly? :-/
why?
 
@user3663 if the token is not there, and not in the url. That probably means that action="resetpassword.php?token=$encr" failed
 
@bwoebi because all new docs are in the package repos now
I told you that weeks ago
 
user5876173
@RonniSkansing yes exactly it happens
 
1:15 PM
@kelunik … except amp docs?!
 
user5876173
no token value
 
user5876173
array(1) { ["token"]=> string(6) ".$encr" } array(3) { ["key"]=> string(0) "" ["email"]=> string(15) "admin@gmail.com" ["reset_password"]=> string(21) "$redirect_url . $encr" } LOL
 
@bwoebi also those
 
@user3663 then you never got the token value printed in the form
 
user5876173
1:16 PM
so..there is no way to get the token value?
 
user5876173
oh my god..
 
yes you never put it in
only the variable name as a string
 
user5876173
ohh ok
 
@kelunik or … better question: Where on the website is the new docs format accessible?
(e.g. https://github.com/amphp/amp/tree/master/docs)?
 
1:18 PM
Please look at your form in the browser (hit F12 goto Elements ) and look at what the action attribute on the form element actually ends up being
before you click it
 
@bwoebi amphp.org/amp
 
imap_open finally works... but gotta make it work on 993 instead of 143...
 
@bwoebi redirects
 
@kelunik oh … didn't look at the contents.
 
user5876173
@RonniSkansing okk..
 
1:22 PM
@kelunik let's say I import aerys docs into aerys repo … how do I now link this together? The documentation link in header links only to amp docs?
 
@bwoebi link it from the packages site.
 
@kelunik okay
 
user5876173
@RonniSkansing it showing the action attribute as action="resetpassword.php?token=.$encr"
 
1 hour ago, by Gordon
printf("http://localhost/sharemoog/resetpassword.php?token=%s", $encr);
 
h@user3663 yes and that is wrong
it should be like
resetpassword.php?token=a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 or etc
so you see the token is never printed in the string
 
user5876173
1:31 PM
yess
 
["token"]=> string(6) ".$encr" <---
 
user5876173
yes it showing like this
 
so, can you fix it? @user3663
 
user5876173
no i don't know..
 
user5876173
how to fix that issue
 
user5876173
1:33 PM
can you please help me how to do that?
 
Yes
It's failing at where the script is printing out the form
 
user5876173
yes exactly
 
Can I see the code where you print the form with the action attribute?
 
user5876173
yeah sure..i wil upload my code here..
 
user5876173
<?php
if( isset( $_POST['reset_password'] ) && trim( $_POST['email'] ))
{
include("include/db.php");
$email = $_POST['email'];
$key=$_POST['key'];
$query=mysqli_query($conn,"select * from users where email='$email'");
if(mysqli_num_rows($query) == 1)
{
$rand = time().rand(1000,9999);
$encr = sha1( $rand );
$row = mysqli_fetch_array($query);
$id=$row['id'];
$update_query = "UPDATE `users` set `key` = '$encr' where `id`='$id'";
$result1=mysqli_query($conn,$update_query);
echo mysqli_error($conn);
 
1:34 PM
okay so noticed that you closed php with ?>
 
user5876173
yes..
 
so that means no PHP will work
so instead of action="resetpassword.php?token=.$encr"
you could do action="resetpassword.php?token=<?php echo $encr ?>"
or action="resetpassword.php?token=<?= $encr?>"
 
user5876173
if i did like this it showing error
 
what is the error?
 
@user3663 your code is vulnerable to SQL injections. Please learn to use prepared statements.
 
user5876173
1:37 PM
Undefined variable: encr
 
Anonymous
ugh, phinx got moved to cake..
 
@user3663 yes, so the variable $encr was never declared
 
@JayIsTooCommon So it's now a piece of cake?
 
@user3663 because that variable is only set if f( isset( $_POST['reset_password'] ) && trim( $_POST['email'] ))
 
Anonymous
@Machavity ugh, it was a good library as well. Wonder how long until their devs shit in it.
 
1:38 PM
which it is not when you load the form before having submitted it
 
user5876173
haa yes
 
user5876173
@RonniSkansing so tell me the way how can we do that
 
@user3663 I think I pointed out the flaws in your script that make sit not work. From here you should try to fix it yourself
 
user5876173
@RonniSkansing yeah ok thank you for your help
 
np good luck
 
1:45 PM
halp, me not englishing better
what should I call the service, which is responsible for managing the Company entities?
 
CompanyManagerAndOrService?
 
what kind of managing?
 
creation, retrieval, removal, transfer of ownership
 
Anonymous
what @Sean said
 
CompanyRegistry?
 
1:49 PM
@tereško Company ?
(=
 
I really can't tell whether you people are trolling or you are really bad at naming stuff.
:(
 
i like company registry :(
 
unfortunately, the name "registry" will come with a potential for confusion
but I could go with Services\Registrar
 
CompanyBook?
 
Anonymous
lol
 
Anonymous
1:55 PM
@tereško registrar is nice.
 
google says it's a word
 
2:10 PM
@DaveRandom I've restarted the opengrok01 VM several times :(
 
@LeviMorrison can you get console access to it?
 
No - it's not even responding to pings.
 
damnit
 
I'm compiling software today so I'll keep prodding it while I wait for things to compile.
 
no sword duels?
 
Anonymous
2:14 PM
is that what you call it?
 
what your mom taught me (i'm gonna assume it's some sexual innuendo)
 
@DaveRandom Okay, I have a console to it during the reboot process so hopefully I'll be able to see where it goes wrong.
 
@LeviMorrison OK cool, it's possible that iptables has gone into uber-paranoid mode, so it doesn't even respond to pings even though it's online
 
... it's sitting at a login screen.
... syntax error at something or other but didn't get to see exaclty what before it rebooted.
You mess with any init files?
 
no, I never touch init, I'm afraid of it
for exactly this reason :-P
 
2:21 PM
> /etc/rc.local: Syntax error: Unterminated quoted string
Given that it doesn't allow me to login I don't think I can recover it, @Dave.
 
you probably could recover it from single user mode
 
:( looks like a corrupted rc.local file
@DaveRandom You are sure you don't have any scripts that touch this file?
 
I'm not even sure what that file is, moment
so it gives you that message at what point, when you try to log in? as root?
 
@DaveRandom Regular boot process; I can log in through recovery mode as root
 
Can you mount the filesystem in recovery mode and cat the file?
I don't remember ever touching that file, nor would there be any reason to
 
2:33 PM
#!/bin/sh -e
sh /etc/init.d/S97-setup.sh
exit 0" >>/etc/apt/sources.list
echo 600 > /sys/block/sda/device/timeout
echo 600> /sys/block/sr0/device/timeout
test -f /etc/ssh/ssh_host_dsa_key || dpkg-reconfigure openssh-server
Note that rc.local looks generated and whatever is generating it is actually the one with the mistake; That's why I ask.
 
That quote is the issue, I assume
@LeviMorrison yeh that is completely unfamiliar to me
 
Some script is trying to append to /etc/apt/sources.list and messing up.
 
Well... my best attempt at fixing it is to simply remove the quoted portion
 
must be something in the hosts OS image, I've never touched any of that stuff, no need to, I basically just installed nginx and docker from apt and everything else is stock
 
2:36 PM
oh my goodness... I finally built TensorFlow! It doesn't have all the features I want but OMG WOW finally!
 
cat /etc/init.d/S97-setup.sh ?
That looks non-standard, feels like there might be some auto-update magic in there
wait, is web01 doing the same thing @LeviMorrison? I can't hit that either
daverandom@ubuntu:~$ cat /etc/rc.local
#!/bin/sh -e
sh /etc/init.d/S97-setup.sh
exit 0" >>/etc/apt/sources.list
echo 600 > /sys/block/sda/device/timeout
echo 600> /sys/block/sr0/device/timeout
test -f /etc/ssh/ssh_host_dsa_key || dpkg-reconfigure openssh-server
that's from web02, which I can log in to fine
looks identical
 
... no syntax error?
Looks like it should have one.
FYI I can ping it now; no logins
 
/etc/init.d/S97-setup.sh is empty
@LeviMorrison when I actually execute it manually, I get a syntax error, but apparently does not prevent login (which in fact I would expect it not to)
that may be a red herring
 
Well... doing host updates.
 
kk
@LeviMorrison check web01 as well, I can't see it either so it may be the same deal, in which case it's probably some issue with the controlling host boxes in that data centre
 
2:45 PM
Sigh...
updates failed.
> No space left on device
It's only at 45% ...
 
@bwoebi oh. yeah, I didn't know there was already an RFC for this particular variant. if it can have a patch written…
 
@LeviMorrison Oh I remember at some point it mounted the filesystem as read-only for no apparent reason
 
@DaveRandom Not the case here.
var has 4.5G and srv has 7.9G
Know of anything I can delete?
 
3:03 PM
Hi all, im really struggling with using php/wordpress (im used to just making html, css, js sites). I basically chopped up my html into 3 sections - header.php, home.php, and footer.php. If i'm on a subpage and i want to create a link back to my home page, am i supposed to be creating a link with href pointing to index.php? or to the html file (except that I cut it into little pieces)?
 
Anonymous
@MatthewSirkin not many, if any, of us work with Wordpress here. You have a better chance getting help on SO main or WP forums wordpress.org/support.
 
Anonymous
 
@JayIsTooCommon Okay, i'll try. It's hard since I can't access the WP chat-room without rep. Was hoping for a simple solution but I'll try posting a question there and see if I happen to get lucky
 
someone gracefully made me know that, when texting, I also do the smilies I'm writing with my face.
:S
 
@MatthewSirkin You don't link to files ever
With or without wordpress
 
3:10 PM
oh, i must not know my terminology (i'm a beginner) What's it called when you have <a href="www.mysite.com/home.html"> I've been calling that a link to my home.html file
 
Your terminology is just fine, but in general you don't link to pages like that
 
or rather like that^ sorry typo
 
The home usually is something like /
The actual file behind it doesn't matter that much
 
okay so If i've constructed my homepage using php files do I still create a link to /?
 
Also surely wordpress has some url helper you should use
 
3:12 PM
also use home_url()
 
@Sean seems to know what the helper is called ^
Use those instead of what you are doing now
 
okay ill look that up
what is being called when you link to /? Is it index.html in the root directory? or index.php? or something else?
 
/ is the root
 
@MatthewSirkin Depends
 
Oh I misread.
 
3:15 PM
right but if I have a link to / it loads the home page, not everything in the root?
 
What it points to depends on your webserver config
 
Most pages on the front end of a WordPress site will go through index.php
 
ah okay both of those things make sense to me, still reading about home_url()
is there a place to see my webserver config
 
If you have access to your server files, yes
 
kk i should be able to find that
I'm still a bit confused about home_url() and when I would use it
 
3:22 PM
Well you said you wanted to create a link to your home page. In WordPress you'd use that in your href attribute when adding a link
<a href="<?php echo home_url(); ?>">Homepage</a> As an example
 
Ah, okay so that is what's confusing me. I have an html template where there are a whole bunch of standard html links with no php in it
I thought I was meant to be going into the php files and just referencing the html files in the template that I downloaded, but you're saying to actually change the html hrefs that point to the homepage from / to that line of php?
sorry that was really poorly phrased and sounds confusing
 
> the implementation in the PECL module in my opinion would need to be improved if shipped as part of core PHP.
> But we are for example still hitting some corruption issue with array references on a daily basis.
worlds_tiniest_violin.gif
 
Maybe I should have speciied, My goal is just to use wordpress as the base for my website, but I don't actually want to do any editing in wordpress. I want to just work in sublime and use an ftp client to do all my editing
 
@MatthewSirkin Doesn't change anything
If you use WP as the base actually use it
 
@DaveRandom Know of anything I can delete?
 
3:32 PM
@LeviMorrison Logs?
 
Anonymous
@LeviMorrison @DaveRandom ?
 
What happened to lxr? :x
 
just realized @Jimbo is this room's Bimbo.
 
@Leigh We are working on it!
 
I think there's some stiff competition with @JayIsTooCommon Tbh
 
3:39 PM
hokay
 
@Sean true dat, but with the name being so close, it's really tough competition
 
this day is going by too slow
 
Anonymous
right? I could murder a few shots right now.
 
I took a walk around the college to break the monotony, but I have to get back to what I was working on
so many random little requests
"can you upload this?" "can you remove this?"
 
@Tiffany ugh, one of those days
 
3:51 PM
My brain becomes a jumble of thoughts and it's hard to get back to the project I was working on
oh and the project I'm working on is boring too. downloading documents...individually...then uploading them to sharepoint
 
onchange="showUser(this.value,'txtHint{$i}')" getting errors based on quotation marks
is there something wrong with that?
 
@sean As you suggested, <a href="<?php echo home_url(); ?>">Homepage</a> works great. Should I be doing something similar if I'm referencing other pages?
 
@Jola post more source
just a couple lines above and below
 
onchange=\"showUser( this.value, 'txtHint{$i}' )\" I originally had this. When I remove the \ it causes the error. But when I don't it works fine. What does the \ mean?
 
it escapes the "
like var x = "Hello \"Joe\"!"
 
4:01 PM
@Tiffany at least it's Friday tomorrow.
 
Anonymous
i hate you so much @Danack
 
Hi folks! Who's owning lxr machine? lxr.room11.org gives 502 again (or it was down for the past few days?)
 
Top men are working on it.
 
We know lxr is down. We sent our best minions in to investigate.
6
 
good morning
 
4:07 PM
o/
 
@PeeHaa if they will be there, can they fix laravel by chance, please?
 
Anonymous
minions != miracle workers
 
@pinepain I said minions. Not miracle workers
watt @JayIsTooCommon
 
Anonymous
haha
 
:D
 
Anonymous
4:08 PM
@Ekin this is what true love looks like.
 
ok, no miracle today =(
 
4:24 PM
@Danack I have next Monday off, so I get a four day weekend.
so there's that to look forward to
 
5 messages moved to Trash
3 messages moved to Trash
 
lxr is up. I did nothing.
4
 
\o/
 
/cc @Dave
 
Evenin room
 
4:54 PM
<3
 
ghibli <3
also, happy birthday @Jimbo
 
@Tiffany Me too! Too bad I'm moving that weekend. Hopefully that'll be done first 2 days, and I can relax Mon/Tues
 
for anyone looking for an anime to start off with, I recommend 'boku no pico'
 
@Kurisu ...
 
@JayIsTooCommon Sorry to have to disappoint you, but nope :P
 
5:03 PM
@NikiC don't you agree?
 
ah ffs. lost a few hours because somehow, I configured (and quickly forgot) a nginx server to auto start on my vm a few months ago. every fukken binding was having problems
 
@Kurisu Nice
 
5:33 PM
@Dereleased ouch, I hate moving.
@Dereleased I wish you luck
 
@PeeHaa Did you run the DNS tests yet? :P
 
Nope. Not yet. Still trying a bit to get used to being home again
Can run them now
 
@Kurisu ugh 31:43 is such a rip off of wagner's ride of the valkyrie
 
Western European Summer Time (WEST) should be corrected in the timezone map – #74824
 
(ok, not rip off, but strongly ressembling. strings with major scales, over a ground of flutes in tremolo, with horns with even the resembling harmonies / rythms)
 
5:40 PM
@FélixGagnon-Grenier lol i haven't got that far yet...
mm
 
hmmm. is your time slowlier than mine?
 
nah, been busy :P
like... homework :B
on a side note, ride of the valkyrie is one of my favs
 
:)
that is a legitimate assessment of one of the most iconic piece of all times ;)
 
Anonymous
5:57 PM
@Gordon stop lying, you look 32 :)
 
D:\Web\amp-playground\dns [master ≡ +1 ~0 -0 !]> php -v
PHP 7.1.3 (cli) (built: Mar 14 2017 23:33:39) ( ZTS MSVC14 (Visual C++ 2015) x64 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
D:\Web\amp-playground\dns [master ≡ +1 ~0 -0 !]> phpdbg -qrr .\vendor\phpunit\phpunit\phpunit
PHPUnit 6.2.2 by Sebastian Bergmann and contributors.

............................................                      44 / 44 (100%)

Time: 1.01 seconds, Memory: 6.00MB
@kelunik ^
Looks a bit on the low side though the tests
 
that's a suspicious amount of tests for one second.
 

« first day (2447 days earlier)      last day (2501 days later) »