Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 25th, 2007, 02: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

Reply With Quote
  #2 (permalink)  
Old March 5th, 2007, 02: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

Reply With Quote
  #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

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 12: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



All times are GMT -4. The time now is 03:59 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.