Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 11-20-2016, 01:18 AM   #1
FittersGuy
Junior Member
FittersGuy began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2016
Device: none
command line tools are not working with php's exec() function

Hi,

I'm trying to run a script that I've created to add some metadata to ebook files using calibre's command line tools. The script is working fine on my test machine, however when I put it live on my host it does not work.

Here's the command I want to run:
Code:
/path/to/calibre/ebook-meta /path/to/ebook/file.mobi --tags "test"
Here's my PHP:
PHP Code:
$command '/path/to/calibre/ebook-meta /path/to/ebook/file.mobi --tags "test"';
exec$command  ' 2>&1'$output$return_val); 
The $output is as follows:
Code:
Traceback (most recent call last):
File "site.py", line 59, in main
File "site-packages/calibre/ebooks/metadata/cli.py", line 12, in
File "site-packages/calibre/customize/ui.py", line 15, in
File "site-packages/calibre/customize/builtins.py", line 654, in
File "site-packages/calibre/devices/apple/driver.py", line 8, in
File "ctypes/__init__.py", line 555, in
File "ctypes/__init__.py", line 279, in _reset_cache
MemoryError
The $return_val is 1 (not incredibly useful).

Any idea what's causing this? Or, alternatively, has it been fixed since calibre-1.48.0-x86_64? I must use the older version since my host is on an older centos.
FittersGuy is offline   Reply With Quote
Old 11-22-2016, 11:17 PM   #2
FittersGuy
Junior Member
FittersGuy began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2016
Device: none
Bump, any ideas on this or any idea where I could look for more information? Been trying to fix this for about a full work day now without any luck yet.
FittersGuy is offline   Reply With Quote
Advert
Old 11-23-2016, 12:02 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,337
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That appears to be an error importing the ctypes standard python module. Most likely an issue with libffi incompatibility -- but given that 1.48 is so old you're not going to get any help with it.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
docx to epub conversion working from command-line but not from PHP velsankar ePub 2 11-20-2016 01:06 AM
Command Line Tools in 2.0 ssholloway Calibre 2 08-24-2014 04:20 PM
Calibre Command Line usage with PHP artoros Related Tools 13 07-01-2010 09:57 AM
Where are the command line tools? PaulChernoch Calibre 17 10-23-2009 12:08 PM
command-line conversion tools in 0.6.0? WayneD Calibre 3 06-03-2009 01:30 PM


All times are GMT -4. The time now is 04:14 AM.


MobileRead.com is a privately owned, operated and funded community.