1

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 from bash.


MacOSX 10.7

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

TeX 3.1415926 (TeX Live 2011)

2
  • Have you tried pdflatex (or pdfetex) directly? Commented Sep 14, 2011 at 12:44
  • Yes, I've tried pdflatex. Same problem. Commented Sep 14, 2011 at 13:03

2 Answers 2

1

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');
Sign up to request clarification or add additional context in comments.

Comments

0

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

1 Comment

Other commands like exec("ls") works fine. And shell_exec and system and passthru also works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.