I have a php script test.php which invokes latex+biber:
`/usr/local/texlive/2016/bin/x86_64-linux/latex --interaction batchmode test.tex `;
`/usr/local/texlive/2016/bin/x86_64-linux/biber test`;
The script works fine if I run it from terminal php test.php (as root); it does not work when it is called from a browser http://localhost/test.php. In the latter case, I understand it is called from user apache. (I am testing on a Linux Fedora 29 machine).
The issue turns out to be related with `biber':
[root@fedora-pc]# su -s /bin/bash apache
bash-4.4$ /usr/local/texlive/2016/bin/x86_64-linux/biber test
Can't open test.blg (Permission denied) at /tmp/par-617061636865/cache-975de9a2a2c44ccaa5329d9695a54026ffc29f68/inc/lib/Log/Log4perl/Appender/File.pm line 151.
Also, I just discovered that
[root@fedora-pc 2019]# /usr/local/texlive/2016/bin/x86_64-linux/tlmgr update --list
/usr/local/texlive/2016/tlpkg/installer/xz/xzdec.x86_64-linux: (stdin): Unexpected end of input
[root@fedora-pc 2019]# tlmgr update --self
/usr/local/texlive/2016/tlpkg/installer/xz/xzdec.x86_64-linux: (stdin): Unexpected end of input
/usr/local/texlive/2016/bin/x86_64-linux/tlmgr: checksum error when downloading /tmp/WQEchRh21D/TzyO2wJ8pA from http://ftp.rrze.uni-erlangen.de/ctan/systems/texlive/tlnet/tlpkg/texlive.tlpdb: digest disagree
I am not so knowledgeable about LaTex to know what is going on and how to fix it. (biber is version 2.9)
.blg). If I'm not mistaken, Biber will try to write the.blgin the current working directory. Not sure what that would be in your case, but it might be in a place where you have no write permissions. The other errors have nothing to do with Biber and are TeX live infrastructure-related. TeX live 2016 is frozen and doesn't get any updates any more (just about current is TeX live 2018, TeX live 2019 should be released around May). – moewe Apr 13 '19 at 18:13.logfile and all the auxiliary files. It should be noted, though, that Biber unpacks its executable into a temporary directory (in your case/tmp/par-617061636865/cache-975de9a2a2c44ccaa5329d9695a54026ffc29f68/) and runs from there. If programs in that path are restricted compared to programs in/usr/local/texlive/2016/bin/x86_64-linux/and elsewhere (and it might not be unreasonable to apply such restrictions), that could explain things. – moewe Apr 13 '19 at 18:22PAR::Packerto unpack, apparently there is an environment variable to change the cache location: https://www.perlmonks.org/?node_id=709846. Re your error message: https://www.perlmonks.org/?node_id=1058025 – moewe Apr 14 '19 at 08:34PAR_GLOBAL_TEMPhimself, so I guess this is the intended interface. – moewe Apr 14 '19 at 08:55PAR_GLOBAL_TEMPshould be a normal environment variable. It can be set and read like other variables such asPATH,HOME,TEMP, ... If and how this can be done will depend on your server and your rights (but I would not know anything about that, I'm afraid). – moewe Apr 17 '19 at 11:39apache ALL=(ALL:ALL) NOPASSWD:/...path.../biber; hence within the php script I callbiberbysudo -u root /..path.../biber bibFile. The trick is tosudoon root (thanks) . I note that the latter is not needed to call (pdf)latex. I have setPAR_GLOBAL_TEMPto/var/www/tmp/too, but it does not help. Also, Biber does not sem to unpack its executable when called as above, it does when called from terminal. – mario Apr 18 '19 at 11:30