Can't convert a svg file to pdf on debian server from php.

Asked by Denis Darii

Hello, my problem is as follows:

I installed inkscape on my debian server and everything goes well... i can convert from the command line any file in any format even if I get the following error:

(inkscape:25152): Gdk-CRITICAL **: gdk_display_list_devices: assertion `GDK_IS_DISPLAY (display)' failed

But when I want to run the command from php ( with exec('inkscape file.svg --export-pdf=file.pdf') ) it doesn not give me any results. And watching the apache logs I saw the following errors:

// -------- START apache error.log --------- //

** (inkscape:24784): WARNING **: Cannot create directory /var/www/.inkscape.
Although Inkscape will run, it will use default settings,
and any changes made in preferences will not be saved.

(inkscape:24784): libgnomevfs-WARNING **: Unable to create ~/.gnome2 directory: Permission denied

** (inkscape:24784): WARNING **: Could not create extension error log file '/var/www/.inkscape/extension-errors.log'

(inkscape:24784): GLib-CRITICAL **: g_hash_table_lookup: assertion `hash_table != NULL' failed

(inkscape:24784): libgnomevfs-WARNING **: Internal error: the configuration system was not initialized. Did you call _gnome_vfs_configuration_init?

(inkscape:24784): GLib-CRITICAL **: g_hash_table_lookup: assertion `hash_table != NULL' failed

(inkscape:24784): libgnomevfs-WARNING **: Internal error: the configuration system was not initialized. Did you call _gnome_vfs_configuration_init?

(inkscape:24784): libgnomevfs-CRITICAL **: gnome_vfs_uri_is_local: assertion `uri != NULL' failed

(inkscape:24784): GLib-CRITICAL **: g_hash_table_lookup: assertion `hash_table != NULL' failed

(inkscape:24784): libgnomevfs-WARNING **: Internal error: the configuration system was not initialized. Did you call _gnome_vfs_configuration_init?

(inkscape:24784): GLib-CRITICAL **: g_hash_table_lookup: assertion `hash_table != NULL' failed

(inkscape:24784): libgnomevfs-WARNING **: Internal error: the configuration system was not initialized. Did you call _gnome_vfs_configuration_init?

** (inkscape:24784): WARNING **: Invalid URI

** (inkscape:24784): WARNING **: Error: Could not open file 'svg_template/770s_1.svg' with VFS

(inkscape:24784): GLib-CRITICAL **: g_hash_table_lookup: assertion `hash_table != NULL' failed

(inkscape:24784): libgnomevfs-WARNING **: Internal error: the configuration system was not initialized. Did you call _gnome_vfs_configuration_init?

(inkscape:24784): GLib-CRITICAL **: g_hash_table_lookup: assertion `hash_table != NULL' failed

(inkscape:24784): libgnomevfs-WARNING **: Internal error: the configuration system was not initialized. Did you call _gnome_vfs_configuration_init?

(inkscape:24784): libgnomevfs-CRITICAL **: gnome_vfs_uri_is_local: assertion `uri != NULL' failed

(inkscape:24784): GLib-CRITICAL **: g_hash_table_lookup: assertion `hash_table != NULL' failed

(inkscape:24784): libgnomevfs-WARNING **: Internal error: the configuration system was not initialized. Did you call _gnome_vfs_configuration_init?

(inkscape:24784): GLib-CRITICAL **: g_hash_table_lookup: assertion `hash_table != NULL' failed

(inkscape:24784): libgnomevfs-WARNING **: Internal error: the configuration system was not initialized. Did you call _gnome_vfs_configuration_init?

** (inkscape:24784): WARNING **: Invalid URI

** (inkscape:24784): WARNING **: Error: Could not open file 'svg_template/770s_1.svg' with VFS

** (inkscape:24784): WARNING **: Specified document svg_template/770s_1.svg cannot be opened (is it valid SVG file?)

(inkscape:24784): Gtk-CRITICAL **: gtk_main_quit: assertion `main_loops != NULL' failed

// -------- END apache error.log --------- //

What can I do to fix it? Any suggestions-questions?
Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
Denis Darii
Solved:
Last query:
Last reply:
Revision history for this message
Denis Darii (dnx) said :
#1

I found the solution!

I have simply create the folders ".inkscape" and ".gnome2" in /var/www/ of my debian server.

And everything goes well.

Revision history for this message
Denis Darii (dnx) said :
#2

Is a good learned!
1. Check the free space on the server.

2. Verify if the variable memory_limit in /etc/php5/apache2/php.ini is not less than 128 mb