Re: [PHP] SQL Password() function

2005-11-28 Thread David Grant
Ahmed Saad wrote:
> On 11/26/05, Yaswanth Narvaneni <[EMAIL PROTECTED]> wrote:
>> I 'dont' want to use something like select * from table where
>> table.passwd=password($passwd);
> 
> (IIRC. they broke backward compatibility in
> version 5).. 

4.1 :(

Cheers,

David Grant

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SQL Password() function

2005-11-27 Thread Gustavo Narea

Hi.

Ahmed Saad wrote:

On 11/26/05, Yaswanth Narvaneni <[EMAIL PROTECTED]> wrote:


I 'dont' want to use something like select * from table where
table.passwd=password($passwd);



Well, i think you  better use a specific password hashing function
rather than MySQL's password() 'cause it's implementation is not
consistent across versions (IIRC. they broke backward compatibility in
version 5).. Use md5() or sha1() so you know what alghorithm is used
and you can be almost sure that implementation across langauges and
versions is the same.


Yes, That's something important.

Yaswanth, take a look at: 
http://phpsec.org/articles/2005/password-hashing.html


Regards.

--
Gustavo Narea.
PHP Documentation - Spanish Translation Team.
Valencia, Venezuela.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SQL Password() function

2005-11-27 Thread Ahmed Saad
On 11/26/05, Yaswanth Narvaneni <[EMAIL PROTECTED]> wrote:
> I 'dont' want to use something like select * from table where
> table.passwd=password($passwd);

Well, i think you  better use a specific password hashing function
rather than MySQL's password() 'cause it's implementation is not
consistent across versions (IIRC. they broke backward compatibility in
version 5).. Use md5() or sha1() so you know what alghorithm is used
and you can be almost sure that implementation across langauges and
versions is the same.

so when you store the password do a query like:

$sql .= "INSERT INTO sometable (name, password) VALUES ('someuser',
md5('somepassword'))";

PHP has an md5() and sha1() too, check the manual for  them

-ahmed


[PHP] SQL Password() function

2005-11-26 Thread Yaswanth Narvaneni
Hi!

Is there a function (or a code snippet) in PHP for mysql password() function?

I 'dont' want to use something like select * from table where
table.passwd=password($passwd);

Is there any other alternate way to do it?

Regards,
Yaswanth


--
"In theory there is no difference between theory and practice.
In practice there is." -- Fortune Cookie

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] sql password

2001-12-18 Thread Jeremiah Jester

Im attempting to install mysql. The service started and everything seems to
be going ok except for that I can't set the root password for the mysql
server.

To reset password i type:

/usr/bin/mysqladmin -u root -p mypassword

Then I get the following error:

/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'

Can anyone help?
Thanks,
JJ


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] sql password

2001-12-18 Thread Jeremiah Jester

Im attempting to install mysql. The service started and everything seems to
be going ok except for that I can't set the root password for the mysql
server. Whenever i type:

I get the following error:


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]