View Single Post
Old 07-01-2010, 07:41 AM   #12
Junior Member
ryanlee began at the beginning.
Posts: 6
Karma: 10
Join Date: Jun 2010
Device: none
command line problem with php shell_exec

I'm using ubuntu server 10.04

I need to convert pdf to txt. so hardly installed calibre not windows ;-)
But I should use it on linux..

then I have a new problem like below when I'm using shell_exec() with PHP.

================================================== =====

Traceback (most recent call last):
File "/usr/bin/ebook-convert", line 18, in <module>
from calibre.ebooks.conversion.cli import main
File "/usr/lib/calibre/calibre/", line 14, in <module>
from calibre.startup import plugins, winutil, winutilerror
File "/usr/lib/calibre/calibre/", line 51, in <module>
File "/usr/lib/calibre/calibre/utils/", line 66, in set_translators
lang = get_lang()
File "/usr/lib/calibre/calibre/utils/", line 27, in get_lang
from calibre.utils.config import prefs
File "/usr/lib/calibre/calibre/utils/", line 698, in <module>
tweaks = read_tweaks()
File "/usr/lib/calibre/calibre/utils/", line 681, in read_tweaks
File "/usr/lib/calibre/calibre/utils/", line 40, in make_config_dir
os.makedirs(plugin_dir, mode=CONFIG_DIR_MODE)
File "/usr/lib/python2.6/", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib/python2.6/", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib/python2.6/", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/root/.config'

================================================== ======

How can I use it with PHP shell_exec?
ryanlee is offline   Reply With Quote