From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95186 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: Invoking ConTeXt from inside php web appliction Date: Fri, 17 Jun 2016 15:25:32 +0200 Message-ID: References: <20160617121655.GC34324@lahore> <20160617124219.GF34324@lahore> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3583107331924253254==" X-Trace: ger.gmane.org 1466169981 8856 80.91.229.3 (17 Jun 2016 13:26:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Jun 2016 13:26:21 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jun 17 15:26:09 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bDtmh-0003gI-2C for gctc-ntg-context-518@m.gmane.org; Fri, 17 Jun 2016 15:26:07 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B1E4EF771; Fri, 17 Jun 2016 15:25:46 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3UoPqYfRzs5i; Fri, 17 Jun 2016 15:25:45 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 22565F780; Fri, 17 Jun 2016 15:25:45 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2ED7AF772 for ; Fri, 17 Jun 2016 15:25:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fA8v4lYaSLL0 for ; Fri, 17 Jun 2016 15:25:43 +0200 (CEST) Original-Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 80934F771 for ; Fri, 17 Jun 2016 15:25:33 +0200 (CEST) Original-Received: by mail-lf0-f51.google.com with SMTP id j7so60346346lfg.1 for ; Fri, 17 Jun 2016 06:25:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=CaL/RuAFjuVx+RKkgWzvZMvrtdcfjrP8rsqC6mu8O0Y=; b=szfN9P5FpmwDNnQ/N7Hz86QIiO+oMTKxIw7+mQXrR4gCwxe1nHOravddA54agtRVrj ZVj5O1n+UxW/NIsg2c4F4FVasugcfkxB44INosZt4svpbxoag86kQS1ukxmo+h85d9Hi JEHlpk+lb6smxJx8ZpvoVmU/GbBleHf6IqWV5DTNW1sDHehwKbp00FOzhAGvAyRP8bbW 53ezSmrj5utJFBPcGtHWybDWUty8iZtdL1OT4GQgdsNicuTBcoFLkzxx6Pq3Z1PmYF6B /7AiyUgkVf0FDHf/dIIzT0pTBO4iPqkwfMWxcipWnYzMn9t/U+wzFDm+v/eF2GZAbl11 InYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=CaL/RuAFjuVx+RKkgWzvZMvrtdcfjrP8rsqC6mu8O0Y=; b=iHSmacx6uRwIvFp0YSV3N+CD+iH2qcKzDuOqsPvYwtOASMq6skzTJPW1fA5onQFooj ndz5S4+PQrpR33/cSh2lwRHrdDUQFnJKg28Un4X3E0G47w0cClsHmcn7jgSEOU7XiMDg wvrU32UzxpEh1XVUfPgVjuH8ksTHbGdh1wARNWQKtICnlw4ASWFZYXsCqn//66sOtIA1 49hmrtHG75lstTcMU52v1ddNX3/su3rowAPo2E2XjDbaPNusCMuDqz0cGYKrBs+mkdIf L9eRMITal137DeeqwSR1Q6NbNnP4OKCKsTASFgYIwkF6vcyqbJpMT2JKmCu6I70RD0N1 l4qQ== X-Gm-Message-State: ALyK8tImdklOFpa8mOwjFLBcB9lZ0tg3HDs4nLJicS79wzcgPkCxBCzLy5hH67KuFMBpH2Y72dMxyC32xYLDLA== X-Received: by 10.25.3.12 with SMTP id 12mr575372lfd.110.1466169932707; Fri, 17 Jun 2016 06:25:32 -0700 (PDT) Original-Received: by 10.25.42.194 with HTTP; Fri, 17 Jun 2016 06:25:32 -0700 (PDT) In-Reply-To: <20160617124219.GF34324@lahore> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:95186 Archived-At: --===============3583107331924253254== Content-Type: multipart/alternative; boundary=001a113ec46604ff2b0535794a9e --001a113ec46604ff2b0535794a9e Content-Type: text/plain; charset=UTF-8 On Fri, Jun 17, 2016 at 2:42 PM, Pavneet Arora wrote: > Unfortunately, while the mtxrun command works for a shell user: > > $ mtxrun -script base --variables | grep cache > resolvers | lists | env: $SELFAUTOPARENT/texmf-cache > resolvers | lists | var: $SELFAUTOPARENT/texmf-cache > resolvers | lists | exp: /opt/context/tex/texmf-cache > resolvers | lists | res: /opt/context/tex/texmf-cache > > the result is the same for www-data: > > $ sudo -u www-data bash -c ". /opt/context/tex/setuptex > /opt/context/tex; mtxrun --script base --variables | grep cache" > resolvers | caches | fatal error: there is no valid writable cache > path defined > > I have to think that setuptex isn't able to set up the runtime > environment for www-data, somehow? > > Is texmf-cache writable by www-data ? When logged as www-data, the cache writable should be the /home/www-data/luatex-cache/<..> folder, while the standard one is used as readonly folder Just make a test: in www-data home # . /opt/context/tex/setuptex /opt/context/tex then make a simple "Hello world" test.tex and read the log. -- luigi --001a113ec46604ff2b0535794a9e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Fri, Jun 17, 2016 at 2:42 PM, Pavneet Arora <pavneet_arora@wa= roc.com> wrote:
Unfortunately, while the = mtxrun command works for a shell user:

=C2=A0 $ mtxrun -script base --variables | grep cache
=C2=A0 resolvers=C2=A0 =C2=A0 =C2=A0 =C2=A0| lists |=C2=A0 =C2=A0env: $SELF= AUTOPARENT/texmf-cache
=C2=A0 resolvers=C2=A0 =C2=A0 =C2=A0 =C2=A0| lists |=C2=A0 =C2=A0var: $SELF= AUTOPARENT/texmf-cache
=C2=A0 resolvers=C2=A0 =C2=A0 =C2=A0 =C2=A0| lists |=C2=A0 =C2=A0exp: /opt/= context/tex/texmf-cache
=C2=A0 resolvers=C2=A0 =C2=A0 =C2=A0 =C2=A0| lists |=C2=A0 =C2=A0res: /opt/= context/tex/texmf-cache

the result is the same for www-data:

=C2=A0 $ sudo -u www-data bash -c ". /opt/context/tex/setuptex /opt/co= ntext/tex; mtxrun --script base --variables | grep cache"
=C2=A0 resolvers=C2=A0 =C2=A0 =C2=A0 =C2=A0| caches | fata= l error: there is no valid writable cache path defined

I have to think that setuptex isn't able to set up the runtime environment for www-data, somehow?


Is =C2=A0texmf-cache writable by www-d= ata ?
When logged as =C2=A0www-data, the cache writable should = =C2=A0be the /home/www-data/luatex-cache/<..> folder, while the stand= ard one is used as readonly folder

Just make a tes= t: in www-data home=C2=A0
# . /opt/context/tex/setuptex /opt/con= text/tex
then make a simple "Hello wor= ld" test.tex and =C2=A0read the log.

-= -
lui= gi
--001a113ec46604ff2b0535794a9e-- --===============3583107331924253254== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============3583107331924253254==--