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


-- 
Pavneet Arora           m: +1 (647) 406-6843
Waroc Informatik        t: +1 (416) 937-9276
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to