问题描述
我需要在PHP运行Inkscape中,所以我可以SVG图像转换为PDF。但是每一次我尝试:
I need to run inkscape in PHP so I can convert an svg image to PDF. However every time I try:
//一些PHP code
系统(Inkscape的-z --file = svg.svg --export-PDF = pdf.pdf);
//更多code
我没有得到任何新的文件,我得到这个在apache埃罗日志。
I get no new file and I get this in the apache erro log.
(Inkscape中:28607):libgnomevfs-WARNING **:无法创建〜/ .gnome2目录:权限>拒绝
紧急保存激活!
紧急救完成。 Inkscape的将立即关闭。
如果你能重现此崩溃,请www.inkscape.org一个bug
与导致崩溃的步骤的详细描述,以便我们能够解决它。
**消息:Error:Inkscape中遇到一个内部错误,将立即关闭
Emergency save activated! Emergency save completed. Inkscape will close now. If you can reproduce this crash, please file a bug at www.inkscape.org with a detailed description of the steps leading to the crash, so we can fix it. ** Message: Error: Inkscape encountered an internal error and will close now.
分段故障
我与Apache服务器运行的Ubuntu。我能做些什么来解决这个问题?
I am running on ubuntu with apache server. What can I do to correct this problem?
推荐答案
这是关系到系统的权限,修复更简单的方法是创建一个 .gnome2 是在用户的根主文件夹中的文件夹是谁的运行code,并给它写入权限(666应该是罚款)。
This is related to system permissions, the easier way to fix is create a .gnome2 folder at root home folder of the user who's running that code and give it permissions to write (666 should be fine).
请注意,如果你通过FTP文件夹,这样做/开头的文件。 (隐藏在Linux上的文件),在这取决于客户的配置列表可能不会显示出来。
Note that if you're doing this by FTP folders/files starting with . (hidden files on linux), might not show up on listings depending on your client's config.
例如:
mkdir -p /var/www/.gnome2 /var/www/.config /var/www/.config/inkscape
chmod 755 /var/www/.gnome2 /var/www/.config /var/www/.config/inkscape
chown -R www-data /var/www/.gnome2 /var/www/.config /var/www/.config/inkscape
这篇关于在PHP Inkscape中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!