开发者

running tex from php script

I've installed mactex on my macbook and configured apache + php + mysql.

So when I'm running texi2pdf from bash it works fine. But when I'm trying to run it from php script the next error occurs

Font T2A/cmr/m/n/10=larm1000 at 10.0pt not loadable: Metric (TFM) file not found. 

The function is called as

exec("texi2pdf .... ") 

$PATH var is OK.

I guess the problem with access to some files but I've set permission to all necessary files (including ~/Library/texlive) and all of them are successfully read with

exec("ls ... ") 

or

exec("cat ...") 

The problem is not with cyrillic fonts, all necessary packages are installed and as I've already said texi2pdf works fine fro开发者_JAVA技巧m bash.


MacOSX 10.7

Apache/2.2.19 (Unix) DAV/2 PHP/5.3.6

TeX 3.1415926 (TeX Live 2011)


Problem solved. As PHP script uses current directory (or DocumentRoot) to load and generate necessary tex fonts the home directory should be change to user home

putenv('HOME=/Users/username');


Are you tried to allow exec? It may be blocked as default.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜