<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Operating System - LinuxのトピックRe: PHP &amp;amp; MySQL related query</title>
    <link>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925478#M67467</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I presume that you are having a problem getting the password into the database in a valid format in the first place. Why not, when you insert the userid/password into the database, use the MD5 function in MYSQL?&lt;BR /&gt;&lt;BR /&gt;eg. INSERT into table SET password=MD5('string');&lt;BR /&gt;&lt;BR /&gt;Regards</description>
    <pubDate>Wed, 19 Oct 2005 01:41:12 GMT</pubDate>
    <dc:creator>David Logan_2</dc:creator>
    <dc:date>2005-10-19T01:41:12Z</dc:date>
    <item>
      <title>PHP &amp; MySQL related query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925470#M67459</link>
      <description>Hi friends,&lt;BR /&gt;&lt;BR /&gt;Not sure I'm putting my query inside proper category.This is related to password() function of MySQL and md5() function of PHP. I'm wondering that the result (encryption) produced by both command options is same or different. I want to make login procedure secure into my webpage, and using password() option to encrypt passwords into mysql databse. also I MD5ed  the password entered by user at login.php by md5() option. but when I'm making a match expression (if password of php == password of database), i found i'm not able to  login, which means both are not matching. It works fine if I enter text password in database and accept plain-text password from login.php. It shows that the encryption made by both commands are different, that's why the match exp. not resulting true.&lt;BR /&gt;&lt;BR /&gt;Also, I'm getting an error display "cannot jump to row 0..." on login page. I know it is because of mysql_result() function, but I don't want it to be displayed on my login page.&lt;BR /&gt;I'm attaching the simple login.php script for your review.&lt;BR /&gt;&lt;BR /&gt;thanks in advance&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Sep 2005 00:43:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925470#M67459</guid>
      <dc:creator>kcpant</dc:creator>
      <dc:date>2005-09-13T00:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: PHP &amp; MySQL related query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925471#M67460</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Why do you use password function in mysql? &lt;BR /&gt;The PASSWORD() function is used by the authentication system in MySQL Server, you should not use it in your own applications. For that purpose, use MD5() instead. &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Sergejs</description>
      <pubDate>Tue, 13 Sep 2005 07:11:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925471#M67460</guid>
      <dc:creator>Sergejs Svitnevs</dc:creator>
      <dc:date>2005-09-13T07:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: PHP &amp; MySQL related query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925472#M67461</link>
      <description>The encryption used by MySQL's 'password()' function is very different from the 'md5()' based encryptions.&lt;BR /&gt;&lt;BR /&gt;You either use PHP's md5 functions, and store the md5 string (as plain-text) in the MySQL database, or you just use MySQL's password() function.&lt;BR /&gt;&lt;BR /&gt;One, or the other.</description>
      <pubDate>Wed, 14 Sep 2005 03:20:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925472#M67461</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2005-09-14T03:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: PHP &amp; MySQL related query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925473#M67462</link>
      <description>Also, remember that there is a difference in the password function btw versions 3.2 and 4.0 (Esp the length of the encrypted string is different). Make sure you use the 4.0 correct MYSQL client library on the application side of your system - I guess this would be in apache. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Sep 2005 02:49:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925473#M67462</guid>
      <dc:creator>Karsten Breivik_1</dc:creator>
      <dc:date>2005-09-15T02:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: PHP &amp; MySQL related query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925474#M67463</link>
      <description>Hi Friends,&lt;BR /&gt;&lt;BR /&gt;Thanks for the help provided by you all, but I'm sorry I think I was not able to explain the problem to you properly.  Let me do it again:&lt;BR /&gt;&lt;BR /&gt;scenario is : I'm using Mysql database to store username, password and group into a table. password is encrypted inside the table by using passoword('actual password entered by user') function at the time of inserting data. Now, I want to use a php login page on my website to authenticate user matching mysql data. I'm using php's md5() function to encrypt password entered by user on login.php form, and then I'm matching it against mysql's password. I found they are not getting matched, I understood ( as SB explained) that it is because of different type of encryption by md5() &amp;amp; password().&lt;BR /&gt;&lt;BR /&gt;Now, as SB suggested to use either password() or md5(), I'm not able to understand if I use encryption on only one end ( either in database or in login.php form), how could they match and return true? please guide me to understand this...&lt;BR /&gt;&lt;BR /&gt;thanks in advance, and please also let me know the solution for the error display  as explained in first post.</description>
      <pubDate>Thu, 15 Sep 2005 03:10:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925474#M67463</guid>
      <dc:creator>kcpant</dc:creator>
      <dc:date>2005-09-15T03:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: PHP &amp; MySQL related query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925475#M67464</link>
      <description>Not entierly sure if this is what you are looking for, but with mySql version 4.1, MySQL ODBC 3.51 Driver users must use a password coded 'old-style'. &lt;BR /&gt;To accomplish this, update users with the following SQL: &lt;BR /&gt;&lt;BR /&gt;mysql&amp;gt; USE mysql;&lt;BR /&gt;mysql&amp;gt; UPDATE mysql.user SET Password = OLD_PASSWORD('newPassword') WHERE Host = 'someHost' AND User = 'someUser'; &lt;BR /&gt;mysql&amp;gt; FLUSH PRIVILEGES; &lt;BR /&gt;</description>
      <pubDate>Thu, 15 Sep 2005 03:18:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925475#M67464</guid>
      <dc:creator>Karsten Breivik_1</dc:creator>
      <dc:date>2005-09-15T03:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: PHP &amp; MySQL related query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925476#M67465</link>
      <description>MySQL entry:&lt;BR /&gt;&lt;BR /&gt;insert into usertable (user, group, password) values ('userone', 'group1', password('actualpasswordenteredbyuser'));&lt;BR /&gt;&lt;BR /&gt;Pretty standard, you'll have&lt;BR /&gt;&lt;BR /&gt;Login.php:&lt;BR /&gt;&lt;BR /&gt;select user, group, password from usertable where user = 'userone' and password = password('passwordfromlogin.php');&lt;BR /&gt;&lt;BR /&gt;Basically, you get MySQL to do the password matching.  If you get a record back, then you've successfully entered the password.  If you don't get any records back, then they made a boo-boo.</description>
      <pubDate>Thu, 15 Sep 2005 03:18:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925476#M67465</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2005-09-15T03:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: PHP &amp; MySQL related query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925477#M67466</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;In the /etc/httpd/conf.d/auth_mysql.conf there are a few comment lines how to manage your issue. Look in that file and find your answers.&lt;BR /&gt;&lt;BR /&gt;Hope that helps,&lt;BR /&gt;&lt;BR /&gt;Renarios</description>
      <pubDate>Wed, 21 Sep 2005 05:58:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925477#M67466</guid>
      <dc:creator>renarios</dc:creator>
      <dc:date>2005-09-21T05:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: PHP &amp; MySQL related query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925478#M67467</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I presume that you are having a problem getting the password into the database in a valid format in the first place. Why not, when you insert the userid/password into the database, use the MD5 function in MYSQL?&lt;BR /&gt;&lt;BR /&gt;eg. INSERT into table SET password=MD5('string');&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Wed, 19 Oct 2005 01:41:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925478#M67467</guid>
      <dc:creator>David Logan_2</dc:creator>
      <dc:date>2005-10-19T01:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: PHP &amp; MySQL related query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925479#M67468</link>
      <description>Closing threads open from a long time....</description>
      <pubDate>Wed, 04 Jan 2006 02:05:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/php-amp-mysql-related-query/m-p/4925479#M67468</guid>
      <dc:creator>kcpant</dc:creator>
      <dc:date>2006-01-04T02:05:42Z</dc:date>
    </item>
  </channel>
</rss>

