[CWB] ERROR: CQP backend startup failed

Hardie, Andrew a.hardie at lancaster.ac.uk
Mon Mar 23 02:29:28 CET 2015


OK, that version of CQPweb is the most recent, so we are both looking at the same thing.

Now, the reason that you are getting the message you are getting is that when the proc_open function is called in the PHP code to create the slave cqp process, it is not returning a process-resource: instead it is returning false to indicate an error.

Question is, why?

It is probably something to do with either your OS, or your Apache configuration.

Running external processes from a PHP web-script is seen as insecure, for obvious reasons. So, several Linux distros have taken it upon themselves to distribute Apache/PHP with configurations set by default to disallow this. But this functionality is critical for CQPweb, again for obvious reasons.

I am afraid I am not familiar with SUSE. However, here are the things that I know of that might be causing the problem, based on my experience with Debian and Fedora.


·         Is PHP running in safe-mode? IF so, proc_open is disabled for most of the filesystem. See here http://php.net/manual/en/features.safe-mode.functions.php

·         Do you have AppArmor installed and running? If so, is it blocking web scripts from accessing the part of your filesystem where CQP lives? Look in /etc/apparmor.d/…

·         Is there something in the Apache configuration blocking access to anything outside the default document tree?

·         Does your Linux distro have SELinux, and if so, is it perhaps configured to not let Apache/PHP execute child processes?

Let us know if one of these pans out!  If it turns ou that this is a “gotcha” likely to affect many people, then I will add it to the manual.

best

Andrew.

From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of egobrc at gmail.com
Sent: 18 March 2015 10:41
To: cwb at sslmit.unibo.it
Subject: Re: [CWB] ERROR: CQP backend startup failed

Hi Andrew, first of all thanks for your answer.
I logged in as apache user (in my case is wwwrun since it is a Suse SLES 11 Linux) and cqp is included in $PATH because it is in /usr/local/bin. I also tried to run cqp logged in as wwwrun and it starts normally, printing out "CQP version 3.0.0" as usual.

To get CQPweb version i found:

 define('CQPWEB_VERSION', '3.1.13');

in CQPweb/lib/environment.inc.php; if it can be of some help, I used svn checkout to download the software.
Am I using wrong versions of CQP and/or CQPWeb? In my environment CWB will not be used in English.

Have a nice day.


One think comes to mind: is the CQP executable on the PATH of the username that Apache runs under? If not,  then that’s the problem, and you need to add the path to the location of the executable to the CQPweb configuration file.



If that isn’t the problem then we can consider other possibilities. Before that, however: Can you check your version of CQPweb please?



note also that using the core CWB version 3.0.x with CQPweb will work, but is not recommended (since CQPweb works solely in UTF-8, and v3.0 of the core doesn’t support utf8 regular expressions). for English you wouldn’t notice much difference, for other languages you might.



best



Andrew.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://devel.sslmit.unibo.it/pipermail/cwb/attachments/20150323/a41d5d00/attachment-0001.html>


More information about the CWB mailing list