On Fri, Jun 17, 2016 at 2:16 PM, Pavneet Arora <pavneet_arora@waroc.com> wrote:
I am stuggling with getting ConTeXt to run from inside a php script
under Apache.  First off, let me say that the installation works fine
from the command line as a logged in user.

Initially, I tried to do it inline:

  cmd = ". /opt/context/tex/setuptex /opt/context/tex/setuptex; cd $spool_dir; context $full_input_filename";
  system($cmd);

which returns exit status 2, "Incorrect usage".

Then I created a small bash script with the following lines:

  #!/usr/bin/env bash

  . /opt/context/tex/setuptex /opt/context/tex
  context $1

When I trap the output, I get the following error in the log file:

  resolvers       | caches | fatal error: there is no valid writable cache path defined

I also attempted this manually at a bash prompt resulting in the same
error:

  sudo -u www-data bash -c bin/proccontext.sh $FILENAME

What would be the correct design pattern to invoke ConTeXt from a web
application?  This is all under Ubuntu 14.04, BTW.

advTHANKSance


permissions ?

--
luigi