rhushikeshc / clients-oriented-ftp

Automatically exported from code.google.com/p/clients-oriented-ftp
0 stars 0 forks source link

Error on install, columns without default values #268

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. When trying to install

What is the expected output? What do you see instead?
Sucessuful install. Mysql warning that some fields dont have default values.

What version of the product are you using? On what operating system?
r405. Windows 7.

Please provide any additional information below.

When i try to install in my local enviroment with default collation for the 
Mysql DB, i get an error telling me that the field 'address' doesn´t have a 
default value. I debugged it and i found out that it is a mysql warning. 

WARNING LIST:

Warning Code : 1364
Field 'address' doesn't have a default value

Warning Code : 1364
Field 'phone' doesn't have a default value

Warning Code : 1364
Field 'notify' doesn't have a default value

Warning Code : 1364
Field 'contact' doesn't have a default value

Warning Code : 1364
Field 'created_by' doesn't have a default value

Warning Code : 1265
Data truncated for column 'timestamp' at row 1

Original issue reported on code.google.com by jojove...@gmail.com on 22 Apr 2013 at 8:15

GoogleCodeExporter commented 8 years ago
I had the same issue. I deleted all of the databases, then went into 
"/install/database.php" and changed this table creation script:

    $q3 = '
    CREATE TABLE IF NOT EXISTS `tbl_users` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `user` varchar('.MAX_USER_CHARS.') NOT NULL,
      `password` varchar(32) NOT NULL,
      `name` text NOT NULL,
      `email` varchar(60) NOT NULL,
      `level` tinyint(1) default NULL,
      `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP(),
      `address` text COLLATE latin1_general_ci default NULL,
      `phone` varchar(32) COLLATE latin1_general_ci default NULL,
      `notify` tinyint(1) default NULL,
      `contact` text COLLATE latin1_general_ci default NULL,
      `created_by` varchar('.MAX_USER_CHARS.') default NULL,
      `active` tinyint(1) default NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=latin1;
    ';

(changing "NOT NULL" to "default NULL")

Then retry installation. Worked for me, but I haven't started using the app 
yet, so who knows what other problems I may run into)

Original comment by rodmande...@gmail.com on 14 May 2013 at 8:27

GoogleCodeExporter commented 8 years ago
The level field needs to be set to default to 0 or self-registering clients 
will not appear in the user management interface. I *think* the line needs to 
read as below, but I am not a frequent SQL user:

`level` tinyint(1) NOT NULL DEFAULT 0,

Original comment by SimonAGo...@gmail.com on 12 Sep 2013 at 4:36

GoogleCodeExporter commented 8 years ago
I have te same problem with version r514.
How can i fix this??

Original comment by Nielsvar...@gmail.com on 13 Nov 2013 at 8:36

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
For r514 change the tbl_users section to 

'2' => '
CREATE TABLE IF NOT EXISTS `tbl_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user` varchar('.MAX_USER_CHARS.') NOT NULL,
`password` varchar('.MAX_PASS_CHARS.') NOT NULL,
`name` text NOT NULL,
`email` varchar(60) NOT NULL,
`level` tinyint(1) NOT NULL DEFAULT \'0\',
`timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP(),
`address` text COLLATE latin1_general_ci NULL,
`phone` varchar(32) COLLATE latin1_general_ci NULL,
`notify` tinyint(1) NOT NULL DEFAULT \'0\',
`contact` text COLLATE latin1_general_ci NULL,
`created_by` varchar('.MAX_USER_CHARS.') NULL,
`active` tinyint(1) NOT NULL DEFAULT \'1\',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
',

Have included updated database.php file form Installs folder for working 
installation (with amendments also covered by bug 379)

Original comment by sprocket...@gmail.com on 24 Jan 2014 at 11:54

Attachments: