HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Error on step 5 out of 10!!! Can't proceed! Help!

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#39440 (In Topic #8839)
Avatar

Fan in training

Getting a sql error when OC tries to do the table inserts...

I am running Windows Vista Home Premium, with Apache/2.2.8 (Win32), PHP/5.2.5 and mySQL 5.0.45. I have tons of different websites and other sql apps running with no problems (local testing before making live etc…)


I have tried this SEVERAL times, each time dropping the tables from the DB so it would not choke on that as well.
:@ Here is the error I get after filling in all the stuff on step 4:





Unfortunately a query has failed [ALTER TABLE ocp2_translate ADD FULLTEXT search (text_original)] [<strong>Column 'text_original' cannot be part of FULLTEXT index</strong>]

Here is the stack trace:

File 'C:\MyStuff\localweb\ocportal\sources\minikernel.php'
Line 130
Function 'get_html_trace'
Args





File 'C:\MyStuff\localweb\ocportal\sources\database\mysql.php'
Line 171
Function 'clean_exit'
Args ocp_tempcode::__set_state(array( 'bits' => array ( 0 => array ( 0 => array ( ), 1 => 2, 2 => 'QUERY_FAILED', 3 => array ( 0 => 'ALTER TABLE ocp2_translate ADD FULLTEXT search (text_original)', 1 => 'Column \'text_original\' cannot be part of FULLTEXT index', ), ), ), 'codename' => ':container', ))





File 'C:\MyStuff\localweb\ocportal\sources\database\shared\mysql.
php'
Line 53
Function '_db_query'
Args 'ALTER TABLE ocp2_translate ADD FULLTEXT search (text_original)'

array ( 0 => NULL, 1 => 'ocportal', )





File 'C:\MyStuff\localweb\ocportal\sources\database.php'
Line 754
Function '_db_create_index'
Args 'ocp2_translate'

'#search'

'text_original'

array ( 0 => NULL, 1 => 'ocportal', )





File 'C:\MyStuff\localweb\ocportal\install.php'
Line 1120
Function 'create_index'
Class 'database_driver'
Object database_driver::__set_state(array( 'table_prefix' => 'ocp2_', 'connection_read' => array ( 0 => NULL, 1 => 'ocportal', ), 'connection_write' => array ( 0 => NULL, 1 => 'ocportal', ), ))
Type '->'
Args 'translate'

'#search'

array ( 0 => 'text_original', )





File 'C:\MyStuff\localweb\ocportal\install.php'
Line 766
Function 'step_5_core'
Args





File 'C:\MyStuff\localweb\ocportal\install.php'
Line 159
Function 'step_5'
Args



SO much time and SO little to do! :P
Back to the top
 
Posted
Rating:
#39441
Avatar

Hi,

This one's new to me but it looks like it might be caused by your default mySQL character set. What do you have this configured to?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#39446
Avatar

Fan in training

Chris Graham said

Hi,

This one's new to me but it looks like it might be caused by your default mySQL character set. What do you have this configured to?
 

I have the default char set to latin1, why would that be an issue? Should it be set to utf8? Doesn't make sense to me though….hmm…O_o



SO much time and SO little to do! :P
Back to the top
 
Posted
Rating:
#39447
Avatar

According to some searching and by looking at the mySQL code, this error happens when there is some kind of character set problem in the fields a fulltext search index is created for. Either they are a unicode format that isn't supported (wide-character), or there's something else strange. As I say, I've never seen it before, so I suspect it is an obscure bug in mySQL.

A workaround for ocPortal would be to disable full-text search. Change this code in sources/database/mysql.php:

Code

function db_has_full_text($db)
{
   if (using_innodb()) return false;
   $mysql_version=mysql_get_server_info($db[0]);
   return ($mysql_version{0}!='3');
}
to:

Code

function db_has_full_text($db)
{
   return false;
}


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#39448
Avatar

Fan in training

Chris Graham said

According to some searching and by looking at the mySQL code, this error happens when there is some kind of character set problem in the fields a fulltext search index is created for. Either they are a unicode format that isn't supported (wide-character), or there's something else strange. As I say, I've never seen it before, so I suspect it is an obscure bug in mySQL.

A workaround for ocPortal would be to disable full-text search. Change this code in sources/database/mysql.php:

Code

function db_has_full_text($db)
{
   if (using_innodb()) return false;
   $mysql_version=mysql_get_server_info($db[0]);
   return ($mysql_version{0}!='3');
}
 to:

Code

function db_has_full_text($db)
{
   return false;
}
 
 Thanks Chris. After making the change you suggested I got this: (same step) :(

Unfortunately a query has failed [ALTER TABLE ocp2_translate ADD FULLTEXT search (text_original)] [<strong>Column 'text_original' cannot be part of FULLTEXT index</strong>]

Here is the stack trace:

File 'C:\MyStuff\localweb\ocportal\sources\minikernel.php'
Line 130
Function 'get_html_trace'
Args





File 'C:\MyStuff\localweb\ocportal\sources\database\mysql.php'
Line 174
Function 'clean_exit'
Args ocp_tempcode::__set_state(array( 'bits' => array ( 0 => array ( 0 => array ( ), 1 => 2, 2 => 'QUERY_FAILED', 3 => array ( 0 => 'ALTER TABLE ocp2_translate ADD FULLTEXT search (text_original)', 1 => 'Column \'text_original\' cannot be part of FULLTEXT index', ), ), ), 'codename' => ':container', ))





File 'C:\MyStuff\localweb\ocportal\sources\database\shared\mysql.
php'
Line 53
Function '_db_query'
Args 'ALTER TABLE ocp2_translate ADD FULLTEXT search (text_original)'

array ( 0 => NULL, 1 => 'ocportal', )





File 'C:\MyStuff\localweb\ocportal\sources\database.php'
Line 754
Function '_db_create_index'
Args 'ocp2_translate'

'#search'

'text_original'

array ( 0 => NULL, 1 => 'ocportal', )





File 'C:\MyStuff\localweb\ocportal\install.php'
Line 1120
Function 'create_index'
Class 'database_driver'
Object database_driver::__set_state(array( 'table_prefix' => 'ocp2_', 'connection_read' => array ( 0 => NULL, 1 => 'ocportal', ), 'connection_write' => array ( 0 => NULL, 1 => 'ocportal', ), ))
Type '->'
Args 'translate'

'#search'

array ( 0 => 'text_original', )





File 'C:\MyStuff\localweb\ocportal\install.php'
Line 766
Function 'step_5_core'
Args





File 'C:\MyStuff\localweb\ocportal\install.php'
Line 159
Function 'step_5'
Args



SO much time and SO little to do! :P
Back to the top
 
Posted
Rating:
#39449
Avatar

Please try this change in addition. In sources/database/shared/mysql.php change:

Code

function _db_create_index($table_name,$index_name,$_fields,$db)
{
   //removed-assert

   if ($index_name{0}=='#')
   {
      if (using_innodb()) return;
      $index_name=substr($index_name,1);
      $type='FULLTEXT';
   } else $type='INDEX';
   _db_query('ALTER TABLE '.$table_name.' ADD '.$type.' '.$index_name.' ('.$_fields.')',$db);
}
to:

Code

function _db_create_index($table_name,$index_name,$_fields,$db)
{
   //removed-assert

   if ($index_name{0}=='#')
   {
      return;
   } else $type='INDEX';
   _db_query('ALTER TABLE '.$table_name.' ADD '.$type.' '.$index_name.' ('.$_fields.')',$db);
}


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#39450
Avatar

Fan in training

Chris Graham said

Please try this change in addition. In sources/database/shared/mysql.php change:

Code

function _db_create_index($table_name,$index_name,$_fields,$db)
{
   //removed-assert

   if ($index_name{0}=='#')
   {
      if (using_innodb()) return;
      $index_name=substr($index_name,1);
      $type='FULLTEXT';
   } else $type='INDEX';
   _db_query('ALTER TABLE '.$table_name.' ADD '.$type.' '.$index_name.' ('.$_fields.')',$db);
}
 to:

Code

function _db_create_index($table_name,$index_name,$_fields,$db)
{
   //removed-assert

   if ($index_name{0}=='#')
   {
      return;
   } else $type='INDEX';
   _db_query('ALTER TABLE '.$table_name.' ADD '.$type.' '.$index_name.' ('.$_fields.')',$db);
}
 
 
:rockon: YOU ARE THE MAN Chris!!! That got it. I look forward to exploring the system now tha I got it running. It would be interesting to find out what the issue with mysql is though..



SO much time and SO little to do! :P
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: