[CWB] Cwb binaries not in PATH, setting up PHP
Hardie, Andrew
a.hardie at lancaster.ac.uk
Wed Aug 31 01:14:42 CEST 2022
Hi Jori
Look at sec 2.3.1 of the manual, available here.
https://cwb.sourceforge.io/files/CQPwebAdminManual.pdf
best
Andrew.
-----Original Message-----
From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> On Behalf Of Jori Mantysalo
Sent: 30 August 2022 10:09
To: cwb at sslmit.unibo.it
Subject: [CWB] Cwb binaries not in PATH, setting up PHP
Hi all. I am an IT admin at University of Tampere, Finland.
I was asked to install CWB corpus tools and www-gui for those. In Ubuntu 20 I was able to build CWB and it seems to work from the command line. PHP almost work too, but unfortunately exec() (and system()) does not found binaries outside normal /bin/, /usr/bin etc.
First, how to set "binaries root" for the system?
Second, if that is not possible: To the Apache config I put
<Directory /var/www/html/mytest>
SetEnv PATH /usr/bin:/sbin: . . . :/mytest/cwb-3.4.22/cqp:/mytest/cwb-3.4.22/utils
</Directory>
and now print getenv("PATH"); on /var/www/html/mytest/showpath.php shows directories I set to config. But still exex() and system() (and passthru() etc, I suppose) does not found binaries.
I guess others have already figured out how to this. I could do something like
find cqp utils -perm /100 | while read f; do ln -s ... /usr/local/bin/$(basename $f); done
but that feels clumsy.
--
Jori Mäntysalo
Tampereen yliopisto - Ihminen ratkaisee
More information about the CWB
mailing list