我正在尝试从dokuwiki网站运行LaTeX解析器。 LaTeX解析器依赖于mimetex cgi模块,它是使用以下命令从PhP脚本执行的:
shell_exec('/var/www/cgi-bin/mimetex.cgi -f /var/www/html/test1.tex -e /var/www/html/test1.gif');
但是,运行PhP脚本时,命令未正确执行。我运行了一个测试命令,例如:
shell_exec('cp test1.tex test2.tex');
,并且能够检查文件test2.tex
是否确实已创建。我还运行了命令:
/var/www/cgi-bin/mimetex.cgi -f /var/www/html/test1.tex -e /var/www/html/test1.gif
在终端上执行,没有错误。我还确保已配置apache服务器,以便它可以执行https://www.ionos.com/community/server-cloud-infrastructure/apache/enable-cgi-scripts-on-apache/
之后的cgi脚本。我在这里丢失了一些东西...但是我看不到...