[CWB] CQPweb Autosetup Warning

Hardie, Andrew a.hardie at lancaster.ac.uk
Tue May 26 12:01:52 CEST 2020


PS, of the other two issues, one I'd spotted and fixe d(but not committed), the other I wasn't aware of so thanks for pointing it out! - AH

From: Hardie, Andrew
Sent: 26 May 2020 10:28
To: 'Open source development of the Corpus WorkBench' <cwb at sslmit.unibo.it>
Subject: RE: [CWB] CQPweb Autosetup Warning

Hi Florian,

>>>  It seems like the program fails on the "cqpweb_startup_environment(CQPWEB_STARTUP_DONT_CONNECT_CQP , RUN_LOCATION_CLI); line, but I have no idea what causes it.

You're correct. The actual issue is that there is no database connection when the username is looked up. This is happening because of an incorrectly cached database connection. I'll fix this in my next commit, if you want to patch it in the meantime, go to sql-lib.php and


  *   Change line 352 to read as follows:

return get_global_sql_link()->escape_string($str);
  *   Delete lines 349, 350, 351 (so, the function escape_sql will be just one line of code, the line above).

IF THAT DOESN'T FIX IT: Can you switch on backtraces in the config file?

$backtrace_on = $backtrace_for_all = $backtrace_compact = true;

And then try again, to get a more detailed error message.

best

Andrew.


From: cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it> <cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it>> On Behalf Of Frenken, Florian
Sent: 19 May 2020 18:14
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>>
Subject: [CWB] CQPweb Autosetup Warning


Hi again,



After your last email (again, thanks for the quick advice!) I figured it'd be a better idea to just install CQPweb manually instead of trying to fix an outdated version. By jumping to the trunk repository, I was now a bit overambitious perhaps. While I managed to fix two prior errors, I am now stuck on the following message when running the autosetup script:


"PHP Warning:  mysqli::escape_string(): Couldn't fetch mysqli in /var/www/html/cqpweb/lib/sql-lib.php on line 352
PHP Warning:  mysqli::escape_string(): Couldn't fetch mysqli in /var/www/html/cqpweb/lib/sql-lib.php on line 352
PHP Warning:  mysqli::escape_string(): Couldn't fetch mysqli in /var/www/html/cqpweb/lib/sql-lib.php on line 352

Invalid user name specified at database level"

Not sure whether this could be a permission issue, since the user name should be unproblematic. It seems like the program fails on the "cqpweb_startup_environment(CQPWEB_STARTUP_DONT_CONNECT_CQP , RUN_LOCATION_CLI); line, but I have no idea what causes it.

As for the other two other problems I encountered, I don't know if they're already known, but just in case they are of interest to you:

  1.  The "default_keyness_calc_stat" is not assigned to the global Config variable in autosetup.php which led to an SQL error when setting the user_info in useracct-lib.php. Adding it fixed the issue.
  2.  The "n_texts" field in sql-definitions.php for create the text_metadata_values table contained some additional whitespace which, again, led to an SQL error. Removing it also solved that problem.

Best,
Florian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20200526/0ffca004/attachment.html>


More information about the CWB mailing list