[CWB] CQPWeb 3.2.11 autosetup MySQL error

Stephen Barrett Stephen.Barrett at glasgow.ac.uk
Fri May 13 10:37:18 CEST 2016


Thanks Andrew,

We took your advice and checked out the trunk - 3.2.15. The autosetup ran just fine and we got a corpus installed and up-and-running. 

When I tried to delete a corpus, however, the system failed with a MySQL error (copied below with the PHP backtrace).

Cheers

Stevie

---

CQPweb encountered an error and could not continue.

 

A mySQL query did not run successfully!

 

 

Original query: SELECT count(*), sum(words) FROM text_metadata_for_ WHERE (`geographical`='35') && (`register_ed`='6') /* from User: admin | Function: initialise_size() | 2016-May-10 12:23:43 */

 

 

Error # 1146: Table 'cqpweb.text_metadata_for_' doesn't exist

 
PHP debugging backtrace

array(13) {
  [1]=>
  array(4) {
    ["file"]=>
    string(40) "/var/www/html/corpus/lib/library.inc.php"
    ["line"]=>
    int(270)
    ["function"]=>
    string(20) "exiterror_mysqlquery"
    ["args"]=>
    array(3) {
      [0]=>
      &int(1146)
      [1]=>
      &string(47) "Table 'cqpweb.text_metadata_for_' doesn't exist"
      [2]=>
      &string(181) "SELECT count(*), sum(words) FROM text_metadata_for_ WHERE (`geographical`='35') && (`register_ed`='6')  
	/* from User: admin | Function: initialise_size() | 2016-May-10 12:23:43 */"
    }
  }
  [2]=>
  array(4) {
    ["file"]=>
    string(42) "/var/www/html/corpus/lib/subcorpus.inc.php"
    ["line"]=>
    int(1555)
    ["function"]=>
    string(14) "do_mysql_query"
    ["args"]=>
    array(1) {
      [0]=>
      &string(103) "SELECT count(*), sum(words) FROM text_metadata_for_ WHERE (`geographical`='35') && (`register_ed`='6') "
    }
  }
  [3]=>
  array(7) {
    ["file"]=>
    string(42) "/var/www/html/corpus/lib/subcorpus.inc.php"
    ["line"]=>
    int(1186)
    ["function"]=>
    string(15) "initialise_size"
    ["class"]=>
    string(11) "Restriction"
    ["object"]=>
    object(Restriction)#10 (15) {
      ["serialised":"Restriction":private]=>
      string(38) "$^--text|geographical~35.register_ed~6"
      ["parsed_conditions":"Restriction":private]=>
      array(1) {
        ["--text"]=>
        array(2) {
          [0]=>
          string(15) "geographical~35"
          [1]=>
          string(13) "register_ed~6"
        }
      }
      ["stored_text_metadata_where":"Restriction":private]=>
      string(44) "(`geographical`='35') && (`register_ed`='6')"
      ["stored_idlink_where":"Restriction":private]=>
      NULL
      ["cpos_collection":"Restriction":private]=>
      NULL
      ["corpus":"Restriction":private]=>
      NULL
      ["item_type":"Restriction":private]=>
      string(4) "text"
      ["n_items":"Restriction":private]=>
      NULL
      ["n_tokens":"Restriction":private]=>
      NULL
      ["freqtable_record":"Restriction":private]=>
      NULL
      ["hasrun_initialise_text_metadata_where":"Restriction":private]=>
      bool(true)
      ["hasrun_initialise_idlink_where":"Restriction":private]=>
      bool(false)
      ["hasrun_initialise_cpos_collection":"Restriction":private]=>
      bool(false)
      ["hasrun_initialise_size":"Restriction":private]=>
      bool(false)
      ["needs_to_be_added_to_cache":"Restriction":private]=>
      bool(false)
    }
    ["type"]=>
    string(2) "->"
    ["args"]=>
    array(0) {
    }
  }
  [4]=>
  array(6) {
    ["file"]=>
    string(42) "/var/www/html/corpus/lib/subcorpus.inc.php"
    ["line"]=>
    int(2984)
    ["function"]=>
    string(18) "new_by_unserialise"
    ["class"]=>
    string(11) "Restriction"
    ["type"]=>
    string(2) "::"
    ["args"]=>
    array(1) {
      [0]=>
      &string(38) "$^--text|geographical~35.register_ed~6"
    }
  }
  [5]=>
  array(7) {
    ["file"]=>
    string(42) "/var/www/html/corpus/lib/subcorpus.inc.php"
    ["line"]=>
    int(2957)
    ["function"]=>
    string(13) "parse_content"
    ["class"]=>
    string(9) "Subcorpus"
    ["object"]=>
    object(Subcorpus)#8 (13) {
      ["id"]=>
      string(1) "1"
      ["name"]=>
      string(19) "--last_restrictions"
      ["corpus"]=>
      string(4) "dasg"
      ["user"]=>
      string(5) "admin"
      ["content":"Subcorpus":private]=>
      string(38) "$^--text|geographical~35.register_ed~6"
      ["n_items":"Subcorpus":private]=>
      NULL
      ["n_tokens":"Subcorpus":private]=>
      NULL
      ["mode":"Subcorpus":private]=>
      int(2)
      ["item_list":"Subcorpus":private]=>
      NULL
      ["item_type":"Subcorpus":private]=>
      NULL
      ["item_identifier":"Subcorpus":private]=>
      NULL
      ["restriction":"Subcorpus":private]=>
      NULL
      ["freqtable_record":"Subcorpus":private]=>
      NULL
    }
    ["type"]=>
    string(2) "->"
    ["args"]=>
    array(0) {
    }
  }
  [6]=>
  array(7) {
    ["file"]=>
    string(42) "/var/www/html/corpus/lib/subcorpus.inc.php"
    ["line"]=>
    int(2917)
    ["function"]=>
    string(4) "load"
    ["class"]=>
    string(9) "Subcorpus"
    ["object"]=>
    object(Subcorpus)#8 (13) {
      ["id"]=>
      string(1) "1"
      ["name"]=>
      string(19) "--last_restrictions"
      ["corpus"]=>
      string(4) "dasg"
      ["user"]=>
      string(5) "admin"
      ["content":"Subcorpus":private]=>
      string(38) "$^--text|geographical~35.register_ed~6"
      ["n_items":"Subcorpus":private]=>
      NULL
      ["n_tokens":"Subcorpus":private]=>
      NULL
      ["mode":"Subcorpus":private]=>
      int(2)
      ["item_list":"Subcorpus":private]=>
      NULL
      ["item_type":"Subcorpus":private]=>
      NULL
      ["item_identifier":"Subcorpus":private]=>
      NULL
      ["restriction":"Subcorpus":private]=>
      NULL
      ["freqtable_record":"Subcorpus":private]=>
      NULL
    }
    ["type"]=>
    string(2) "->"
    ["args"]=>
    array(1) {
      [0]=>
      &resource(56) of type (mysql result)
    }
  }
  [7]=>
  array(7) {
    ["file"]=>
    string(42) "/var/www/html/corpus/lib/subcorpus.inc.php"
    ["line"]=>
    int(2854)
    ["function"]=>
    string(19) "load_from_db_result"
    ["class"]=>
    string(9) "Subcorpus"
    ["object"]=>
    object(Subcorpus)#8 (13) {
      ["id"]=>
      string(1) "1"
      ["name"]=>
      string(19) "--last_restrictions"
      ["corpus"]=>
      string(4) "dasg"
      ["user"]=>
      string(5) "admin"
      ["content":"Subcorpus":private]=>
      string(38) "$^--text|geographical~35.register_ed~6"
      ["n_items":"Subcorpus":private]=>
      NULL
      ["n_tokens":"Subcorpus":private]=>
      NULL
      ["mode":"Subcorpus":private]=>
      int(2)
      ["item_list":"Subcorpus":private]=>
      NULL
      ["item_type":"Subcorpus":private]=>
      NULL
      ["item_identifier":"Subcorpus":private]=>
      NULL
      ["restriction":"Subcorpus":private]=>
      NULL
      ["freqtable_record":"Subcorpus":private]=>
      NULL
    }
    ["type"]=>
    string(2) "->"
    ["args"]=>
    array(2) {
      [0]=>
      &resource(56) of type (mysql result)
      [1]=>
      &bool(false)
    }
  }
  [8]=>
  array(6) {
    ["file"]=>
    string(42) "/var/www/html/corpus/lib/admin-lib.inc.php"
    ["line"]=>
    int(262)
    ["function"]=>
    string(18) "new_from_db_result"
    ["class"]=>
    string(9) "Subcorpus"
    ["type"]=>
    string(2) "::"
    ["args"]=>
    array(1) {
      [0]=>
      &resource(56) of type (mysql result)
    }
  }
  [9]=>
  array(2) {
    ["function"]=>
    string(25) "delete_corpus_from_cqpweb"
    ["args"]=>
    array(1) {
      [0]=>
      &string(4) "dasg"
    }
  }
  [10]=>
  array(4) {
    ["file"]=>
    string(40) "/var/www/html/corpus/lib/execute.inc.php"
    ["line"]=>
    int(157)
    ["function"]=>
    string(20) "call_user_func_array"
    ["args"]=>
    array(2) {
      [0]=>
      &string(25) "delete_corpus_from_cqpweb"
      [1]=>
      &array(1) {
        [0]=>
        string(4) "dasg"
      }
    }
  }
  [11]=>
  array(4) {
    ["file"]=>
    string(46) "/var/www/html/corpus/lib/admin-execute.inc.php"
    ["line"]=>
    int(138)
    ["args"]=>
    array(1) {
      [0]=>
      string(40) "/var/www/html/corpus/lib/execute.inc.php"
    }
    ["function"]=>
    string(7) "require"
  }
  [12]=>
  array(4) {
    ["file"]=>
    string(42) "/var/www/html/corpus/lib/adminhome.inc.php"
    ["line"]=>
    int(39)
    ["args"]=>
    array(1) {
      [0]=>
      string(46) "/var/www/html/corpus/lib/admin-execute.inc.php"
    }
    ["function"]=>
    string(7) "require"
  }
  [13]=>
  array(4) {
    ["file"]=>
    string(34) "/var/www/html/corpus/adm/index.php"
    ["line"]=>
    int(3)
    ["args"]=>
    array(1) {
      [0]=>
      string(42) "/var/www/html/corpus/lib/adminhome.inc.php"
    }
    ["function"]=>
    string(7) "require"
  }
}

CQPweb v3.2.15 (c) 2008-2016 	Help! on CQPweb 	You are logged in as user [admin]


-----Original Message-----
From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Hardie, Andrew
Sent: 28 April 2016 17:01
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it>
Subject: Re: [CWB] CQPWeb 3.2.11 autosetup MySQL error

This is a bug that *really has* been fixed subsequent to the 3.2.11 branch.

Can I suggest you switch to 3.2.14, ie the latest from the subversion trunk?

best

Andrew.

-----Original Message-----
From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Stephen Barrett
Sent: 28 April 2016 12:19
To: 'Open source development of the Corpus WorkBench'
Subject: Re: [CWB] CQPWeb 3.2.11 autosetup MySQL error

Many thanks for this, Andrew. That did the trick and the system is up-and-running. I have come across another issue:

When attempting to use the Word Lookup tool I get a blank screen. Checking the error log I find:
PHP Catchable fatal error:  Object of class DbType could not be converted to string in /var/www/html/corpus/lib/db.inc.php on line 600, referer: http://xxx.xxx.xx.xxx/corpus/dasg/index.php?thisQ=lookup&uT=y

I'm attempting the lookup on an untagged corpus FYI.

Cheers

Stevie

-----Original Message-----
From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Hardie, Andrew
Sent: 27 April 2016 05:28
To: Open source development of the Corpus WorkBench
Subject: Re: [CWB] CQPWeb 3.2.11 autosetup MySQL error

This is a bug which I thought I'd fixed but apparently not! I have added a new fix to both the trunk (v3.2.14) and the most recent branch (v3.2.11) in the svn repo. 

If your copy is not checked out from the branch, then you can fix it manually by changing line 78 of autosetup.php to the following:

$Config->default_colloc_calc_stat = $default_colloc_calc_stat;

best

Andrew.


-----Original Message-----
From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Stephen Barrett
Sent: 26 April 2016 14:21
To: 'Open source development of the Corpus WorkBench'
Subject: [CWB] CQPWeb 3.2.11 autosetup MySQL error

Hi,

I downloaded and installed the most recent version of CQPWeb (3.2.11) from cwb.sourceforge. The autoconfig seemed to run fine but when I run autosetup I get a MySQL error. I turned on print_debug_messages with the output copied below. Can anyone help with what might be causing the problem here, please?
    
Many thanks
    
Stevie
   
 ---
     
INSERT INTO user_info (
                    username,
                    realname,
                    email,
                    passhash,
                    acct_status,
                    expiry_time,
                    acct_create_time,
                    conc_kwicview,
                    conc_corpus_order,
                    cqp_syntax,
                    context_with_tags,
                    use_tooltips,
                    thin_default_reproducible,
                    coll_statistic,
                    coll_freqtogether,

- Ignored:
                    coll_freqalone,
                    coll_from,
                    coll_to,
                    max_dbsize,
                    linefeed
                    )
                    VALUES
                    (
                    'admin',
                    'unknown person',
                    'not-specified at nowhere.net',
                    '$2a$11$......................ZLXvySjf6/.CiTNyQGIjw.wMWUXzaS.',
                    1,
                    0,
                    CURRENT_TIMESTAMP,
                    1,
                    1,
                    0,
                    0,
                    1,
                    1,
                    ,
                    5,
                    5,
                    -3,
                    3,
                    1000000,
                    'au'
                    )
            /* from User: ??? | Function: add_new_user() | 2016-Apr-26 12:45:36 */
    
    
    
    Error # 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
                    5,
                    5,
                    -3,
                    3,
                    1000000,
                    'au'
                    )
            /* from User: ??? | Function: add_' at line 38 _______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://devel.sslmit.unibo.it/mailman/listinfo/cwb
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://devel.sslmit.unibo.it/mailman/listinfo/cwb
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://devel.sslmit.unibo.it/mailman/listinfo/cwb
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://devel.sslmit.unibo.it/mailman/listinfo/cwb


More information about the CWB mailing list