08-25-2022, 10:15 PM | #1876 | |
Enthusiast
Posts: 27
Karma: 10
Join Date: Aug 2022
Device: Kobo Clara 2E
|
Quote:
|
|
10-31-2022, 03:26 AM | #1877 |
Junior Member
Posts: 3
Karma: 10
Join Date: Oct 2022
Device: Kindle
|
Hi everyone,
I am newbie, and I am using COPS to manage my books via personal website. But I have problem: if the size of book is over 150MB, I can not download it, the website said error. So, how can I edit in source .php to increase file size download? THanks and best regards, |
Advert | |
|
10-31-2022, 08:06 AM | #1878 |
Guru
Posts: 721
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@khoinguyen1407
In ../cops/config_local.php set (if using apache) Code:
/* * Wich header to use when downloading books outside the web directory * Possible values are : * X-Accel-Redirect : For Nginx * X-Sendfile : For Lightttpd or Apache (with mod_xsendfile) * No value (default) : Let PHP handle the download */ $config['cops_x_accel_redirect'] = "X-Sendfile"; In apache2 first enable mod_xsendfile (from terminal: a2enmod x-sendfile) Hope this works, let us know. |
11-01-2022, 04:35 AM | #1879 | |
Junior Member
Posts: 3
Karma: 10
Join Date: Oct 2022
Device: Kindle
|
Quote:
Thanks for your reply, in your comment "In apache2 first enable mod_xsendfile (from terminal: a2enmod x-sendfile)", I understand that I will use SSH, then run "a2enmod x-sendfile", is it right? |
|
11-01-2022, 04:56 AM | #1880 |
Junior Member
Posts: 3
Karma: 10
Join Date: Oct 2022
Device: Kindle
|
Dear @mariosipad
From idea in your comment, I go to Web Station, then edit PHP Setting and change the value of memory_limit to 1024M And everything is fine, Thanks |
Advert | |
|
11-09-2022, 07:52 AM | #1881 |
Junior Member
Posts: 3
Karma: 10
Join Date: Nov 2022
Device: Raspberry Pi
|
COPS error/No metadata.db file on Raspberry Pi
Hello, I've read through some similar situations on configuring RPi installations but there's nothing I've found that can help me progress hence my plea here. Total CLI noob so go easy.
I'm trying to set up the COPS through a domain so I can access my ebooks on any device anywhere. I've got the domain set up, SSL certs installed, Calibre installed I believe correctly but I'm now confronted with the following situation when I access the domain when trying to run and configure my setup (see attached file - COPS error) I've put a couple of ebooks in the folder and as far as I understand the calibre database file is generated as a result of the presence of books. Now what I'm unsure about is that whether I somehow need to run Calibre first to generate the file and then run the COPS bit but I'm at a loss as how to do it.
So yeah I'm kinda stuck. Any pointers would be greatly appreciated. Moderator Notice
I am moving this post to the COPs thread Last edited by chaley; 11-09-2022 at 08:25 AM. |
11-09-2022, 05:39 PM | #1882 |
Guru
Posts: 721
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@simonbuttress
How does all this work? simple if you know it. I will try to explain. 1 - Download calibre on a PC (Windows/ Mac or Linux) https://calibre-ebook.com/ 2 - add e-books to calibre through the gui menu. Then close calibre. 3 - copy the directory with the calibre database and the e-books in subdirectories to your Raspberry Pi. 4 - point COPS to the directory where you copied point 3 to. 5 enjoy COPS Do not forget to protect your e-books from unwanted visitors with a password. |
11-11-2022, 05:05 AM | #1883 | |
Member
Posts: 23
Karma: 10
Join Date: May 2010
Device: Kindle Paperwhite
|
What I did was install Calibre on my local machine and add my books using the program interface, then upload the complete library to my remote machine. This transfers the missing file as well and worked on my remote headless server. Alternatively, if your remote server has a gui then you could run Calibre on it and add the books through the calibre interface. This would generate the missing file.
Quote:
|
|
11-11-2022, 08:02 AM | #1884 | ||
Junior Member
Posts: 3
Karma: 10
Join Date: Nov 2022
Device: Raspberry Pi
|
That is creative genius!
Quote:
Quote:
|
||
11-11-2022, 04:20 PM | #1885 |
Junior Member
Posts: 3
Karma: 10
Join Date: Nov 2022
Device: Raspberry Pi
|
Helllo, it worked. Love you guys, thank you!!
|
11-22-2022, 07:35 PM | #1886 |
Junior Member
Posts: 3
Karma: 10
Join Date: Apr 2011
Device: Viewsonic g-Tablet
|
Using a raspberry Pi with NGINX. I have no difficulty accessing various test .html and .php files (currently just from within my LAN or on the rPi itself).
IF I go to 127.0.0.1/ebooks, I get the following error (and everything else says "OK" or "Client side rendering"): File /media/pi/external/ebooks/metadata.db not found, Please check Value of $config['calibre_directory'] in config_local.php (Does it end with a '/'?) Value of open_basedir in your php.ini The access rights of the Calibre Database However, ls -l /media/pi/external/ebooks/metadata.db correctly returns -rwxrwxrwx 1 pi pi 7076864 Nov 20 23:48 /media/pi/external/ebooks/metadata.db (so clearly it CAN be found) The directory in config_local.php is: $config['calibre_directory'] = '/media/pi/external/ebooks/'; I'm not really sure what to make of the "open_basedir" message (it makes no difference if it's left unset or set to /media/pi/external/ebooks or /media/pi/external/ebooks/), nor the "The access rights of the Calibre Database" (since the rights are pretty wide open): drwxrwxrwx 1 pi pi 159744 Nov 21 00:16 ebooks (and all directories are files below are the same permissions) Before upgrading to Bullseye, I was running calibre-server with no issues. I can't run Calibre or calibre-server on that rPi now, which is why I'm trying COPS. My books are on an external USB hard drive both because of space and because of MUCH faster speed when using rsync to synchronize books among my MacBook, this rPi, and a backup rPi located in another country. Any ideas? I have a sinking feeling there's something it doesn't like about having the library directory on an external drive. |
11-22-2022, 10:04 PM | #1887 | |
Junior Member
Posts: 3
Karma: 10
Join Date: Apr 2011
Device: Viewsonic g-Tablet
|
Quote:
Unfortunately, I can't use that poster's solution (moving the library to the rPi's SD card) because my library is much too large to fit in the available space. In any event, I think it's much better to put things that require frequent writes (such as my almost-daily Calibre updates) on disk drives rather than SD cards. Surely somebody else has tried to use COPS on a raspberry Pi with the library on an external drive? |
|
11-23-2022, 05:47 AM | #1888 |
Guru
Posts: 721
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@mstevens
I am using apache2 and not NGINX so there might be a difference there, but I have no problems accessing Calibre directories on mounted drives with COPS. A few questions (Q) and remarks (R): 1 - (R) forget (for now) about "open_basedir". On a sinology it is important, but to on a pi. 2 - (Q) what is ls -l /media/pi/external/ebooks/? The directory should be readable by COPS (and NGINX and PHP). 3 - (Q) how did you mount the USB drive? 4 - (Q) Calibre directories on the SD card work (as a test) with COPS? 5 - (R) The best way to run an OS on a pi is through a external SSD. Put the system (raspbian) on a SSD just like you would on a SD card, boot from the SSD and if the SSD is large enough (256GB) you can put the calibre directory on the SSD. (Buy a cheap SSD from a "local" reseller and a uGreen USB 2.5" enclosure from AliExpress and it should work.) 6- (Q) how is the external USB drive formatted (exfat, ntfs, ext4)? 7 - (R) if a symlink does not work, maybe a "mount bind" (in /etc/fstab) will. |
12-14-2022, 11:43 AM | #1889 |
Junior Member
Posts: 9
Karma: 10
Join Date: Jul 2022
Device: samsung galaxy Z fold 2 5G
|
compatibilty with php 8.x ?
hi,
Is Cops compatible with php 8 ? specifically, version 8.2 |
12-15-2022, 05:56 AM | #1890 |
Guru
Posts: 721
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@jajaX
Question: Is Cops compatible with php 8 ? Answer: NO, not with the original code from https://github.com/seblucas/cops However (YES) if you are willing to dive into the code and edit 1 line. Then COPS should work with PHP 8 (never tried with PHP 8.2). Reference: https://github.com/seblucas/cops/issues/492 How: 1 - open file ../cops/vendor/seblucas/dot-php/doT.php 2 - change line 94 Code:
return @create_function ('$it', $func); Code:
return @function ($it) use ($func) {
return eval($func);
};
Code:
// For PHP 8 replace this line //return create_function ('$it', $func); // with return function ($it) use ($func) { return eval($func); }; // end replace Last edited by mariosipad; 01-12-2023 at 09:35 AM. |
Tags |
calibre opds, dns, kobo aura, synology |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre OPDS server with windows apps? | nickdma | Related Tools | 10 | 03-03-2024 02:53 PM |
[Old Thread] Android FBreader and Calibre OPDS server question | kalex | Calibre | 5 | 12-24-2015 10:16 PM |
PHP+Apache web server for calibre ... | chaley | Related Tools | 254 | 04-28-2014 08:18 PM |
External OPDS catalogue in Calibre | bolton | Calibre | 1 | 09-05-2012 06:14 AM |
Calibre Command Line usage with PHP | artoros | Related Tools | 13 | 07-01-2010 09:57 AM |