« first day (1384 days earlier)      last day (3790 days later) » 

user895378
23:00
Any server stuff can't do real TLS without 5.6
@Ocramius ok, then let's exchange payments
@rdlowrey wait one year, then you can make it 5.6+ only ^^
do you guys know which is the strongest weapon of a man ?
@zeeks the stupidity. In your stupidity you always do unbelievable things.
i am serious. you do not even know me, why do you insult -_-
and the answer is sunglasses
23:09
that was not a personal you, but a general one.
user895378
my answer was going to be is now tiny avatars.
even if it was on me, i do not care.
@rdlowrey That's actually quite the performance hit....for other people.
user895378
@Danack not sure what you're saying.
user895378
Do you mean require_once ?
23:20
@rdlowrey I thought it did use require_once, but apparently it doesn't....but it still means that every library that you use that has a files entry gets processed on every request. Even without the once it seems not optimal.
user895378
If my application needs the code, it needs the code.
user895378
And that slowdown is more a side-effect of what I consider the ridiculous "reload the entire application on every request" architecture of the web SAPI.
user895378
My main concern is long-running processes and in that arena it makes no difference whatsoever.
Yeah....tbh I think this is just PSR-0 sucking balls. It should be possible to do things like "If any code in this namespace gets loaded, also load this functions file"
user895378
Yeah, that would be a sensible thing.
23:34
good moaning, i saw that AST Christmas is coming early this year :)
good morning jack
how come noone says here good morning or hello -_- so rude
guys, to check if mysql database connection is correctly established , i execute this sql query : "SELECT 1 FROM user;" . i wonder if this is a secure way to do this ?
@redaa i hope you don't do that for every request.
@redaa Your code should throw up if the connection failed
@PeeHaa depends on how long the connection has been idle.
I think .. not 100% sure actually.
23:38
@Jack ?
Yeah I am thinking in terms of requests and share nothing
like ... it may seem connected until you try to perform a query and it then realises it's no longer connected, iono
Hi
Is md5 one way?
sure
ok this is actually for a desctop application with .NET; i want to test the connection string with the user and password ...
23:39
it's a one-way hash if that's what you mean
@Jack In terms of web requests that hardly ever is a problem
Oh dammit
Even if it is. The query will throw up
How should I be hashing an email?
I'm making a verify script.
@PeeHaa yeah, for sure .. never worked with connection pools but surely in terms of a single web request there's typically no issue
23:40
@PeeHaa Hows your CMS doing?
@PeeHaa i wonder if there is a minimal sql query to do just to test if the connection string is fine ?
@redaa you can be reactive instead; only when a query fails you reconnect ... in any case, is this actually a problem you're having or ....?
@redaa Do you use pdo?
@RahulKhosla md5($email)?
@PeeHaa it's a desktop application (c#/.net)
23:41
@RahulKhosla I hit an issue that I need to solve / think about
and you ask the php room about a c# thingie?
@PeeHaa Oh right, well it looked great last time.
tnx :)
$loginStmt = $db->prepare("UPDATE users SET verify = 2 WHERE email = :email");
$loginStmt->execute([':email' => md5($_GET['auth'])]);
^Im doing that wrong I guess.
@jack sorry :3 but the thing is mainly mysql not php or c#
23:42
Why are you hashing the emailaddress?
I need to some how verify the md5 auth part.
@PeeHaa Account verification email.
Can't you just generate a token?
Like a access code thing?
Log in, type a code etc?
Like a unique token you can send to verify the account
Yeah, verification token makes more sense and is more random too
23:43
Oh right
More random in the sense that it's not dependent on other information, such as email address.
Well the user has to TYPE the code in an input to verify it?
Is that what you mean?
Just add it to the verification link
in the confirmation mail
You should probably md5() the verification token in the db though
Mmm
Well what im doing now sounds better?
23:45
you send the clear token to the user and store the hashed version.
the token must be accompanied by an identifier, though .. otherwise you don't know which account you're verifying :)
User types details, gets the $_POST['email'] from registration. MD5's it and makes a link called domain.com/auth.php/?auth=ajfdodsfsifjjfosjdofjosdjafo.
hash the current date and save it in the db. then use it as a token in the verification email
that link is sent to users email, and once clicked, it updates table to auth = 2 (meaning they can log in).
@zeeks If I md5 a date, then they wont me unique?
md5(unique_id.date) = unique token per user.

i did not understand your question
guys, i took a look at this : stackoverflow.com/questions/261735/…
23:50
@zeeks it's better to use openssl_pseudo_random_bytes().
user924016
i don't know what issues can i get using "SELECT 1 FROM database";
Random Lib is fine too, of course
@jack @PeeHaa help :/
Ok so using a token seems like the best way. But isnt that what im doing now!?
$activationLink = $weburl."/activate.php/?auth=".md5($_POST['email']);
$to = $_POST['email'];
$subject = 'Account Activation';
$message = '<a href="'.$activationLink.'">Activate</a>';
$headers = 'From: localhost';

mail($to, $subject, $message, $headers);
md5($_POST['email']) is the tocken.
23:59
@Jack did not know that, thanks for telling me :)
@RahulKhosla What prevents me from creating 1000 acounts without an actual working emailaddress behind it?
no sarcasm, i am serious

« first day (1384 days earlier)      last day (3790 days later) »