<div dir="ltr">Hi Andrew,<div>your suggestions led me to the solution. To test if there were any OS-level security blocks, I wrote a sample php page containing:</div><div><br></div><div><div>chdir(&#39;/usr/local/bin/&#39;);</div><div>$output2 = shell_exec(&#39;./cqp -c&#39;);</div><div>echo $output2;</div></div><div><br></div><div>And it printed out cqp version. Conversely, removing &#39;chdir&#39; line gave no output:<span style="font-size:12.8000001907349px"> clearly there was a $PATH related problem. I modified the php test page inserting:</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><div><span style="font-size:12.8000001907349px">chdir(&#39;/bin/&#39;);</span></div><div><span style="font-size:12.8000001907349px">$output = shell_exec(&#39;./echo $PATH&#39;);</span></div><div><span style="font-size:12.8000001907349px">echo $output;</span></div><div style="font-size:12.8000001907349px"><br></div></div><div style="font-size:12.8000001907349px">And the output showed only /bin and /sbin, although executing &quot;echo $PATH&quot; as wwwrun user listed many more folders, including /usr/local/bin, as I told you in a previous email. Searching around Apache documentation, I found about envvars file, that provides &quot;in a different way&quot; further variables for Apache: setting $PATH in that file solved my problems with CQPweb, now there are no errors deleting users and adding groups.</div><div><br></div><div>During my attempts, I printed out from cqp.inc.php the value of $path_to_cqp and it was always empty...although I have configured it in config.inc.php . Maybe this information can be useful to understand where I made a configuration error?</div><div><br></div><div>Thanks for all the support.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-23 2:29 GMT+01:00 Hardie, Andrew <span dir="ltr">&lt;<a href="mailto:a.hardie@lancaster.ac.uk" target="_blank">a.hardie@lancaster.ac.uk</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">OK, that version of CQPweb is the most recent, so we are both looking at the same thing.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">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 <b>false</b> to indicate an error.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">Question is, why?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">It is probably something to do with either your OS, or your Apache configuration.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p><u></u><span style="font-size:10.0pt;font-family:Symbol;color:#1f497d"><span>·<span style="font:7.0pt &quot;Times New Roman&quot;">        
</span></span></span><u></u><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">Is PHP running in safe-mode? IF so, proc_open is disabled for most of the filesystem. See here
<a href="http://php.net/manual/en/features.safe-mode.functions.php" target="_blank">http://php.net/manual/en/features.safe-mode.functions.php</a>
<u></u><u></u></span></p>
<p><u></u><span style="font-size:10.0pt;font-family:Symbol;color:#1f497d"><span>·<span style="font:7.0pt &quot;Times New Roman&quot;">        
</span></span></span><u></u><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">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/…<u></u><u></u></span></p>
<p><u></u><span style="font-size:10.0pt;font-family:Symbol;color:#1f497d"><span>·<span style="font:7.0pt &quot;Times New Roman&quot;">        
</span></span></span><u></u><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">Is there something in the Apache configuration blocking access to anything outside the default document tree?<u></u><u></u></span></p>
<p><u></u><span style="font-size:10.0pt;font-family:Symbol;color:#1f497d"><span>·<span style="font:7.0pt &quot;Times New Roman&quot;">        
</span></span></span><u></u><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">Does your Linux distro have SELinux, and if so, is it perhaps configured to not let Apache/PHP execute child processes?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">best<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">Andrew.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:cwb-bounces@sslmit.unibo.it" target="_blank">cwb-bounces@sslmit.unibo.it</a> [mailto:<a href="mailto:cwb-bounces@sslmit.unibo.it" target="_blank">cwb-bounces@sslmit.unibo.it</a>]
<b>On Behalf Of </b><a href="mailto:egobrc@gmail.com" target="_blank">egobrc@gmail.com</a><br>
<b>Sent:</b> 18 March 2015 10:41<br>
<b>To:</b> <a href="mailto:cwb@sslmit.unibo.it" target="_blank">cwb@sslmit.unibo.it</a><br>
<b>Subject:</b> Re: [CWB] ERROR: CQP backend startup failed<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Hi Andrew, first of all thanks for your answer.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">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 &quot;<span style="font-size:9.5pt">CQP
 version 3.0.0&quot; as usual.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">To get CQPweb version i found:</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt"> define(&#39;CQPWEB_VERSION&#39;, &#39;3.1.13&#39;);</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">in CQPweb/lib/environment.inc.php; if it can be of some help, I used svn checkout to download the software. </span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Am I using wrong versions of CQP and/or CQPWeb? In my environment CWB will not be used in English.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Have a nice day.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<pre style="white-space:pre-wrap"><span style="color:black">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.<u></u><u></u></span></pre>
<pre><span style="color:black"><u></u> <u></u></span></pre>
<pre><span style="color:black">If that isn’t the problem then we can consider other possibilities. Before that, however: Can you check your version of CQPweb please?<u></u><u></u></span></pre>
<pre><span style="color:black"><u></u> <u></u></span></pre>
<pre><span style="color:black">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.<u></u><u></u></span></pre>
<pre><span style="color:black"><u></u> <u></u></span></pre>
<pre><span style="color:black">best<u></u><u></u></span></pre>
<pre><span style="color:black"><u></u> <u></u></span></pre>
<pre><span style="color:black">Andrew.<u></u><u></u></span></pre>
</blockquote>
</div>
</div></div></div>
</div>

<br>_______________________________________________<br>
CWB mailing list<br>
<a href="mailto:CWB@sslmit.unibo.it">CWB@sslmit.unibo.it</a><br>
<a href="http://devel.sslmit.unibo.it/mailman/listinfo/cwb" target="_blank">http://devel.sslmit.unibo.it/mailman/listinfo/cwb</a><br>
<br></blockquote></div><br></div>