Different output when compile from PHP and from console

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I am creating cards with tasks in tex format. Card sample

\documentclass[14pt]{book}
\usepackage{color}
\usepackage[utf8x]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[english,russian]{babel}
\usepackage{ucs}\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\pagestyle{empty}
\begin{document}
Карточка №1
\begin{equation*}\text{Решите уравнение}\space \log_{9}{(4x+5)}=5           \end{equation*} \\ 
\begin{equation*}\text{Решите уравнение}\space \log_{4}{(4x+(-1))}=4 \end{equation*} \\ 
\begin{equation*}Решите\space уравнение\space \log_{2}{(1x^2+(-2))} = \log_{2}{6x} \end{equation*} \\ 
\begin{equation*}\text{Решите уравнение}\space \log_{4}{x} = 5 \end{equation*} \\ 
\begin{equation*}\text{Решите уравнение}\space \log_{7}{x} = 2 \end{equation*} \\ 
\noindent\makebox[\linewidth]{\rule{\paperwidth}{0.4pt}}
\end{document}

When I compile this file via shell_exec in PHP, resulting PDF doesn't have any letters, just formulas. But, if I run /usr/bin/pdflatex -output-directory /var/www/files --interaction batchmode 2016-06-15.00-30-46576031369d029.tex in console, PDF will contain symbols.

What can cause this problem?

profilepic.png
manpreet 2 years ago

As a temporary workaround, I finish with this

$output = system("echo 'pass' | sudo -u user /usr/bin/pdflatex -output-directory /var/www/files --interaction batchmode files/".$name.".tex");


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.