[CWB] how to fix Base class package "CWB::CEQL" is empty

Hardie, Andrew a.hardie at lancaster.ac.uk
Tue Sep 24 18:59:06 CEST 2024


That makes no sense - I thought you were debugging something in CQPweb? That error is in TEITOK code, which is totally unrelated except that it also uses a CWB back-end. I think you may have got two different problems confused here.

From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> On Behalf Of Andrés Chandía
Sent: 18 September 2024 18:10
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it>
Subject: Re: [CWB] how to fix Base class package "CWB::CEQL" is empty

Solved!!
the proc_open() generating the error is located in /home/git/TEITOK/common/Sources/cwcqp.php

The parameters for proc_open() should be:
1. The command to run ($cqpapp.' -r '.$registryfolder.' -c').
2. The descriptorspec defining how the process's standard input, output, and error streams will be handled.
3. An array to store the pipes ($this->pipes here).
4. The working directory (optional; here it is '-c').
5. The environment variables (optional, passed as $env).

Currently, in proc_open() function is '-c' as the working directory, which doesn't seem correct. The -c flag should probably be part of the command (if that's what it's meant for), not the working directory.

To fix the working directory argument I tried:
$this->prcs = proc_open($cqpapp.' -r '.$registryfolder.' -c', $descriptorspec, $this->pipes, null, $env);

And this did it...

... Andrés Chandía


Missatge de Andrés Chandía <andreschandiaf at gmail.com<mailto:andreschandiaf at gmail.com>> del dia dc., 18 de set. 2024 a les 16:04:
Ok, thanks for making it clear!!

El mié, 18 sept 2024 a las 16:01, Hardie, Andrew (<a.hardie at lancaster.ac.uk<mailto:a.hardie at lancaster.ac.uk>>) escribió:
>>Anyway, I was not clear, but I was asking about:
>>$use_external_ceql_parser =
>>I see no change when adding it with any value, false or true...

Of course there's no change, because that setting doesn't exist in the version you are running.
>> The setting is called $use_the_new_ceql in v3.2 (for no Perl, set to true), but $use_external_ceql_parser in 3.3 (for no Perl, set to false).


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 Andrés Chandía
Sent: 18 September 2024 14:44
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>>
Subject: Re: [CWB] how to fix Base class package "CWB::CEQL" is empty

Thanks Andrew,
$use_the_new_ceql completely deleted from config.inc.php
Since I commented out no further perl errors have appeared though...
Anyway, I was not clear, but I was asking about:
$use_external_ceql_parser =
I see no change when adding it with any value, false or true...

And no, I have not implemented any change at all on query-lib.php

El mié, 18 sept 2024 a las 15:31, Hardie, Andrew (<a.hardie at lancaster.ac.uk<mailto:a.hardie at lancaster.ac.uk>>) escribió:
Then something is very wrong because CQPweb should not even invoke Perl to begin with if  $use_the_new_ceql  was true.

I suggest you delete that variable from your config completely allowing it to default to true. That should mean no more Perl errors. If you do still get Perl errors, as I say, you have a much worse issue of an unknown cause.

(Have you manually changed any of the code at all? Esp the file query-lib.php? If so you may need to revert those changes)

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 Andrés Chandía
Sent: 18 September 2024 11:18
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>>
Subject: Re: [CWB] how to fix Base class package "CWB::CEQL" is empty

Yes, of course...
CQPweb v3.2.44 © 2008-2021
IMS Open Corpus Workbench v3.5.0
perl 5, version 38, subversion 2 (v5.38.2) built for x86_64-linux-gnu-thread-multi

thanks!

El mié, 18 sept 2024 a las 12:12, Hardie, Andrew (<a.hardie at lancaster.ac.uk<mailto:a.hardie at lancaster.ac.uk>>) escribió:
My recommendation is you should tell us what version of the code you're running, for a start.

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 Andrés Chandía
Sent: 18 September 2024 04:13
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>>
Subject: Re: [CWB] how to fix Base class package "CWB::CEQL" is empty

Thanks Andrew,
that was it...
I had In my config:
$use_the_new_ceql = true;
changing it to
$use_the_new_ceql = false;
made no effect, so I commented out
while adding (or not)
$use_external_ceql_parser =
with either true or false value does not (at least visibly) affect the query
So, what's your recommendation for this feature...?


... Andrés Chandía


Missatge de Hardie, Andrew <a.hardie at lancaster.ac.uk<mailto:a.hardie at lancaster.ac.uk>> del dia dt., 17 de set. 2024 a les 16:59:
You could alternatively just use the internal parser and remove the Perl dependency entirely. That's been the default since version 3.2.38 in 2019.

Check your config.php file. The setting is called $use_the_new_ceql in v3.2 (for no Perl, set to true), but $use_external_ceql_parser in 3.3 (for no Perl, set to false).

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 Andrés Chandía
Sent: 17 September 2024 12:53
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>>
Subject: Re: [CWB] how to fix Base class package "CWB::CEQL" is empty

Thanks again Stephanie...
So I have to tell apache to work with a different perl version?

your command output: MU(meet [word="cat"%c] [word="dog"%c] s)

El mar, 17 sept 2024 a las 13:41, Stephanie Evert (<stefanML at collocations.de<mailto:stefanML at collocations.de>>) escribió:


> On 16 Sep 2024, at 22:23, Andrés Chandía <andreschandiaf at gmail.com<mailto:andreschandiaf at gmail.com>> wrote:
>
> Hi again Stephanie, I have reinstalled with CPAN, and now the message is different...
> Syntax error
> Sorry, your simple query [[[ word ]]] contains a syntax error.
> Parser.c: loadable library and perl binaries are mismatched (got first handshake key 0xcd00080, needed 0xf380080)

Either you installed CWB modules with an old version of Perl, or the Apache server uses an old version of Perl (have you configured a specific Perl version for CQPweb) but picks up the CWB modules from a newer version's library.

I'm afraid you'll have to manage to unbreak your Linux system to get things to work again.

What happens if you load CWB::CEQL from the command line?

        perl -e 'use CWB::CEQL; $parser = new CWB::CEQL; print $parser->Parse("cat <<s>> dog");'

> Query with cqp syntax still works though...

... because that doesn't call any Perl code.



_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb


--
Andrés Chandía
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb


--
Andrés Chandía
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb


--
Andrés Chandía
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb


--
Andrés Chandía
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20240924/bb7d3ebc/attachment-0001.html>


More information about the CWB mailing list