Inkscape inside PHP/Apache doesn't render fonts to PNG
As was determined in the comments above, this was caused by an environmental difference - the HOME
env var was set differently inside the executed process. Using proc_open
instead of simple exec
gave more precise control over said process and explicitly setting that env var solved the issue.
Running inkscape without X server
Yes, if you want to make your programs not find X at all, you can unset DISPLAY
before launching the process.
You can also use Xvfb to "fake" an X server: http://en.wikipedia.org/wiki/Xvfb
You might also want to look at these tools:
- http://cgit.freedesktop.org/~cworth/svg2pdf/
- http://cgit.freedesktop.org/~cworth/svg2png/
Their source code is really small.
Lame encoder command in php shell_exec doesn't work via http server
Is lame on php's execution PATH
? Try replacing lame
with /usr/bin/lame
or whatever.
How about the relative pathnames to the file arguments? Is ../furniture/
etc. correct from the current directory as seen by PHP? If in doubt, replace these with full pathnames too and see if that fixes the problem.
Less likely but worth mentioning: You might want to check that lame
itself has all its executable bits set. If you own the file and it's only executable by the owner, apache won't be able to run it.
php exec() and tesseract goes ''Cannot open input file'
Perhaps the missing environment variables in PHP is the problem here. Have a look at my question here to see if setting HOME
or PATH
sorts this out?
Related Topics
How to Use Class Methods as Callbacks
PHP Function Use Variable from Outside
Accessing Session from Twig Template
Is It Recommended to Store PHP Sessions in Memcache
Save PHP Variables to a Text File
How to Generate an Excel Document with Multiple Worksheets from PHP
How to Build Unlimited Level of Menu Through PHP and MySQL
In PHP, How to Detect the Execution Is from Cli Mode or Through Browser
How to Fix "Set Samesite Cookie to None" Warning
Request Headers Bag Is Missing Authorization Header in Symfony 2
Passing PHP Objects to JavaScript
Codeigniter Routes Regex - Using Dashes in Controller/Method Names
PHP Regular Expression for Strong Password Validation
Xmlparseentityref: No Name' Warnings While Loading Xml into a PHP File
How to Access an Application Parameters from a Service