Search code examples
phplatexfedorapdflatexphp-5.2

I can't find the format file `pdflatex.fmt'!


I want to run pdflatex from php on user request. Running from terminal works fine [php file.php] and creates pdf file. But when I try to run from browser by sending request to php, It gives this error "I can't find the format file `pdflatex.fmt'!"

I am working with php5.2.6, OS is Fedora 9, and safe_mode is turned off.

Code -

    $cmd = "/usr/bin/pdflatex /home/deep/public_html/resume/Folder/deependra.tex 2>&1";
    $output = exec($cmd);
    echo $output;

Solution

  • the pdflatex.fmt must be readable by the web browser in order to be accessible for the exec command, also the server might be chrooted and if so, the chroot folder might not have access to all the pdflatex parts. check it...