Jump to content

Recommended Posts

Hi,

 

I am trying to set up an GUI for proftpd. I am using the files found here: http://sourceforge.net/projects/proftpd-admin/ I have proftpd installed but I don't know if it's working. I wanted to install a GUI that would make testing and configuring easier. I did a google search and found this download.

 

So far I have proftpd installed. I added the credentials for the mySQL database but that's all I've done to the config file so far.

 

I created the database for proftpd in phpmyadmin. I tried to use the .sql file found in the folder linked above but then I got the #1067 - Invalid default value for 'uid' error. I copied and pasted the code. I have not modified it in any way. I don't know much about either php or mySQL so I'm having a really hard time figuring this out. Please help

 

Code:

#
# Table structure for table `groups`
#

CREATE TABLE `groups` (
  `groupid` varchar(10) NOT NULL default '',
  `gid` int(10) unsigned NOT NULL auto_increment,
  `members` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`gid`)
) TYPE=InnoDB ;

#
# Table structure for table `users`
#

CREATE TABLE `users` (
  `id` smallint(2) NOT NULL auto_increment,
  `userid` varchar(10) NOT NULL default '',
  `uid` int(10) unsigned NOT NULL default '',
  `gid` int(10) unsigned NOT NULL default '',
  `passwd` varchar(255) NOT NULL default '',
  `homedir` varchar(255) NOT NULL default '',
  `comment` varchar(255) NOT NULL default '',
  `disabled` int(10) unsigned NOT NULL default '0',
  `shell` varchar(20) NOT NULL default '/sbin/nologin',
  `email` varchar(255) NOT NULL default '',
  `name` varchar(255) NOT NULL default '',
  `ul_bytes` bigint(20) NOT NULL default '0',
  `dl_bytes` bigint(20) NOT NULL default '0',
  `login_count` bigint(20) NOT NULL default '0',
  `dl_count` bigint(20) NOT NULL default '0',
  `ul_count` bigint(20) NOT NULL default '0',
  `last_login` datetime default NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB ;

Link to comment
https://forums.phpfreaks.com/topic/166067-1067-invalid-default-value-for-uid/
Share on other sites

What version of MySQL are you using?  Version 5 is picker about the default int definitions.

 

Try changing tables.sql to this:

 

#
# Table structure for table `groups`
#

CREATE TABLE `groups` (
  `groupid` varchar(10) NOT NULL default '',
  `gid` int(10) unsigned NOT NULL auto_increment,
  `members` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`gid`)
) TYPE=InnoDB ;

#
# Table structure for table `users`
#

CREATE TABLE `users` (
  `id` smallint(2) NOT NULL auto_increment,
  `userid` varchar(10) NOT NULL default '',
  `uid` int(10) unsigned NOT NULL default 0,
  `gid` int(10) unsigned NOT NULL default 0,
  `passwd` varchar(255) NOT NULL default '',
  `homedir` varchar(255) NOT NULL default '',
  `comment` varchar(255) NOT NULL default '',
  `disabled` int(10) unsigned NOT NULL default '0',
  `shell` varchar(20) NOT NULL default '/sbin/nologin',
  `email` varchar(255) NOT NULL default '',
  `name` varchar(255) NOT NULL default '',
  `ul_bytes` bigint(20) NOT NULL default 0,
  `dl_bytes` bigint(20) NOT NULL default 0,
  `login_count` bigint(20) NOT NULL default 0,
  `dl_count` bigint(20) NOT NULL default 0,
  `ul_count` bigint(20) NOT NULL default 0,
  `last_login` datetime default NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB ;

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.