FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when i try to install
#1
Exclamation 
Hello all. When i reach the "Create Database Tables" step, after i press the create database tables button i get this error:
Code:
The following error occurred:

•  INSERT INTO ft_field_type_validation_rules VALUES(6, 2, 'required', '{$LANG.word_required}', '{$field_name}', '', '', '{$LANG.validation_default_rule_required}', 1) - Data truncated for column 'custom_function_required' at row 1

Can you please help me. Thanks
Reply
#2
Hi Bizkit1,

Thanks very much for reporting this. I'm just debugging some other stuff right now, but I'll get back to you later today.

- Ben
Reply
#3
Hi Bizkit,

Do you have access to phpMyAdmin on your database? Mind running this query for me & posting back with what it returns?

Code:
SELECT @@GLOBAL.sql_mode

Thanks!

- Ben
Reply
#4
Code:
@@GLOBAL.sql_mode
STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Reply
#5
Yeah... that's the culprit!

The problem is that you have "strict mode" running for your database, so it's throwing an error when it tries to insert empty strings into NULL fields (or vice versa). I'm working on 2.1.5 right now that includes a fix for this - among other things. But in the meantime, I'm afraid you'll have to ask your host to disable strict mode for the database.

Sorry about that.

- Ben




Reply
#6
Hmm... actually, if you feel like editing one of the PHP files, I may have a solution for you.

Edit the /install/files/code.php and in the ft_install_create_database function (around line 260), right after these lines:

PHP Code:
// connect to the database
  
$link = @mysql_connect($hostname$username$password);
  @
mysql_select_db($db_name); 

Add the following two lines:

PHP Code:
// suppress strict mode
  
@mysql_query("SET SQL_MODE=''"$link); 

Let me know if that works for you!

- Ben
Reply
#7
solved it by disabling strict mode, from mysql Smile thanks!
Reply
#8
Oh, nice! Smile

Well, just to you know (a) the next version of the Core won't have any problems in Strict mode and (b) will suppress it anyway, like the Core does.

So thanks for reporting this!

- Ben
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)