Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
| Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 25th, 2007, 03:48 PM
Registered User
 
Join Date: Feb 2007
Location: West Kingston, RI, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem MYSQL password() Function

Hi everyone
    I am teaching myself PHP & MYSQL programming with the book, "Beginning PHP 4". In chapter 11 we create a database and two tables then enter data into the tables using the command line. I am using Windows 2000 PHP 5.2.0 and MYSQL 5.0.27. The problem I am having is MYSQL will not accept data entered into the user table in the userpassword column using the password('12345') function. An error is returned that the data is too long to fit in the column even though the column is VARCHAR(20). The column will accept up to 20 characters without the password() function, but not even ONE character sent to MYSQL password() function. I searched MYSQL home page and I seem to be the only one with this problem. Even searching GOOGLE only shows up problems with encoding foreign characters. Thanks.

everetts

  #2 (permalink)  
Old March 5th, 2007, 03:53 PM
Registered User
 
Join Date: Feb 2007
Location: West Kingston, RI, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have stumbled on the solution to my problem. The column width to use with the password function has to be large. I started with 128 characters, and then I am going to go smaller until I get an error again

  #3 (permalink)  
Old March 23rd, 2007, 11:34 PM
Friend of Wrox
 
Join Date: Jul 2003
Location: South San Francisco, CA, USA.
Posts: 128
Thanks: 0
Thanked 1 Time in 1 Post
Default

Everetts,
I believe 40 characters on password function is the minimum for MySQL started from version 4.1 and updward. I remembered vividly when I upgraded from 4.0 version to 4.1
Hope this helps.
John



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql function ashuphp MySQL 1 April 18th, 2007 11:35 PM
function syntax on Mysql robprell MySQL 0 May 15th, 2006 04:10 PM
MySQL Password and username Yee MySQL 2 November 1st, 2004 01:31 PM
MySQL password reset tdewitt274 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 August 10th, 2004 06:24 AM
Changing password in MySql thegooner BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 May 24th, 2004 05:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.