Inkscape Inside PHP/Apache Doesn't Render Fonts to Png

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



Leave a reply



Submit