Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Related Tools

Notices

Reply
 
Thread Tools Search this Thread
Old 08-08-2016, 03:27 PM   #1306
mariosipad
Addict
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 302
Karma: 10680
Join Date: Nov 2012
Device: iPad & iPhone with Marvin & Kobo Glo HD
From the COPS wiki-link:

If you use apache as webserver on your Raspberry just change a setting in config_local.php
Code:
    /*
     * use URL rewriting for downloading of ebook in HTML catalog
     * See Github wiki for more information
     *  1 : enable
     *  0 : disable
     */
    $config['cops_use_url_rewriting'] = "0";
to
Code:
$config['cops_use_url_rewriting'] = "1";
That should fix it.
mariosipad is offline   Reply With Quote
Old 08-08-2016, 04:43 PM   #1307
superturrican
Junior Member
superturrican began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2016
Device: Kobo Touch
Quote:
Originally Posted by mariosipad View Post
If you use apache as webserver
Unfortunately, as I posted, that isn't the case:

Quote:
Originally Posted by superturrican View Post
The log entry in nginx's log folder
I'm using the same rpi for a bunch of services using openmediavault, so changing everything over to apache isn't a viable option at this point. Any ideas for why COPS under nginx might be misbehaving like this?
superturrican is offline   Reply With Quote
Old 08-09-2016, 03:50 AM   #1308
mariosipad
Addict
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 302
Karma: 10680
Join Date: Nov 2012
Device: iPad & iPhone with Marvin & Kobo Glo HD
Yeah, my mistake. I missed the nginx in
Quote:
The log entry in nginx's log folder looked like this


But did you miss my link to https://github.com/seblucas/cops/wik...ting-with-COPS?

Maybe this can help you?
mariosipad is offline   Reply With Quote
Old 08-13-2016, 08:08 AM   #1309
superturrican
Junior Member
superturrican began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2016
Device: Kobo Touch
I did, but it didn't help - for some reason the links still don't download.
superturrican is offline   Reply With Quote
Old 08-14-2016, 08:02 AM   #1310
mariosipad
Addict
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 302
Karma: 10680
Join Date: Nov 2012
Device: iPad & iPhone with Marvin & Kobo Glo HD
@superturrican

That's a bummer.

I do not use nginx myself, so I cannot help you with testing.

I am sure you did, but just to be on the safe side, did you also change the config_local.php file?

You could always go to https://github.com/seblucas/cops/issues and ask your question there.
mariosipad is offline   Reply With Quote
Old 08-18-2016, 02:49 PM   #1311
Pachuqismo
Junior Member
Pachuqismo began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Nov 2009
Device: TF700T, Galaxy SIII
NAS4Free with COPS: Does anyone have this working using HTTPS?

Hi there,

I'd appreciate some help. I've followed the guidelines and have COPS working on my NAS using any PCs, iOS and Android devices on my LAN.

However, if I make my web server use https then Android devices will not download (the download manager shows files as being 'Queued' and, after a while, they are marked 'Unsuccess...'.

I have the following settings:

-1-
In config_local.php last line -> $config['cops_use_url_rewriting'] = "1"

I suppose it should be "1" so that the 'Auxiliary parameters' will work, but I've also tried to
put it to "0" with no difference (it still works for PCs but not Android devices).

-2-
In NAS4Free webGUI -> Services -> Auxiliary parameters ->

url.rewrite-once = ("/cops/download/(.*)/.*\.(.*)$" => "/cops/fetch.php?data=$1&type=$2",
"^/cops/download/(\d+)/(\d+)/.*\.(.*)$" => "/cops/fetch.php?data=$1&db=$2&type=$3")


Since '/cops/download' doesn't exist I've created it under '/usr/local/www/cops', but I don't think
it would make a difference.

-3-
I've also registered the (self-signed) certificate (part of my NAS4Free install) in my PC's browser
and in Android (i.e. Settings -> Security -> Credential storage -> Install from SD card).

I consider https a must before my server gets online, but I have little idea about how to make COPS downloads available for also Android devices. Any ideas?

Last edited by Pachuqismo; 08-18-2016 at 05:49 PM. Reason: Clarifications
Pachuqismo is offline   Reply With Quote
Old 08-19-2016, 08:49 AM   #1312
mariosipad
Addict
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 302
Karma: 10680
Join Date: Nov 2012
Device: iPad & iPhone with Marvin & Kobo Glo HD
Your case (if I read and understood correctly):

1 - everything works without https (self-signed-certificate) on Android, PC and iOS

2 - with https (self-signed-certificate) all (navigating and downloading) works on PC and iOS, but downloading does work in Android

To me (and google) it seems a problem of Android with self-signed-certificates.

You could try to install Let's Encrypt on your server. It solves the problem of a self-signed-certificate.

I have neither Nas4Free nor Android (an Android VirtualBox refused to work on my outdated hardware) so I cannot help you testing.
mariosipad is offline   Reply With Quote
Old 08-19-2016, 07:39 PM   #1313
superturrican
Junior Member
superturrican began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2016
Device: Kobo Touch
Quote:
Originally Posted by mariosipad View Post
I am sure you did, but just to be on the safe side, did you also change the config_local.php file?
Yeah, of course? Why would you think anything else? I'm not completely stup -



Anyway, the URLs are rewritten okay, but the files dont download on anything any more, I get a 404 error page instead. Any ideas? Or is github my only hope?
superturrican is offline   Reply With Quote
Old 08-21-2016, 04:18 AM   #1314
CHBMB
Junior Member
CHBMB began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Apr 2014
Device: Kindle Paperwhite 2
Hi guys,

Long time COPS user here and thought I'd direct you to a couple of docker containers that linuxserver.io (a group I'm involved with) have created for COPS.

I know others have already done so, but I believe ours has a few advantages,

Firstly we allow the end user to edit config_local.php as we have allowed access to this from a mount point on the host, rather than hiding it in the docker container itself.

Secondly, we have included the dependencies required to enable the email feature.

Thirdly, we have produced an ARM version as well as an x86 version to enable running on the RaspberryPi.

Fourthly, it is based on Alpine Linux so has a small footprint and shares a base image with our other containers (we have over 50) Check them out here.

Here are the relevant links.

COPS docker github repository and here is the
COPS dockerhub page for x86 and the
COPS dockerhub page for ARM.

Hope some of you find it useful.

chbmb.
CHBMB is offline   Reply With Quote
Old 08-21-2016, 06:52 AM   #1315
mariosipad
Addict
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 302
Karma: 10680
Join Date: Nov 2012
Device: iPad & iPhone with Marvin & Kobo Glo HD
@CHBMB

Thank you for "dockerizing" COPS and some other stuff I sometimes use.

Though Docker is (not yet) my cup of tea, I like it that it supports COPS.
mariosipad is offline   Reply With Quote
Old 08-22-2016, 05:45 PM   #1316
CHBMB
Junior Member
CHBMB began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Apr 2014
Device: Kindle Paperwhite 2
Quote:
Originally Posted by mariosipad View Post
@CHBMB

Thank you for "dockerizing" COPS and some other stuff I sometimes use.

Though Docker is (not yet) my cup of tea, I like it that it supports COPS.
I was sceptical at first, but once you get your head around it, it's a really simple way of deploying stuff.

I'm currently running COPS as a docker and then reverse proxying it with an Apache docker. Can install it within minutes now my config is saved. But that's a digression from this thread.

COPS is awesome and I can't imagine using my Kindle without it now, so wanted to give COPS the container it deserves.
CHBMB is offline   Reply With Quote
Old 08-31-2016, 08:21 PM   #1317
dscottf
Member
dscottf began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Oct 2003
Device: Palm Tungsten T
Raspberry Pi: Can't get cops past configuration check

I'm trying to get COPS running on a Raspberry Pi
I've installed Apache and all the dependencies. I've edited the config_local.php and tried using a symlink and the actual path to the calibre library. I have verified that the path is correct. I have tried changing the owner and group of metadata.db. I've chmod 777 the whole damn calibre directory. I've confirmed that my "open_basedir" is commented out in php.ini I have whitelisted my calibre directory in apache.conf.

I am still getting the error in the COPS configuration check:
"File /media/pi/MEDIA/calibre_ebooks/metadata.db not found, Please check"

The problem is clearly not that it is "not found"
I'm stumped and not sure where to look next.

Any got more to look for?

SOLVED! See post #1332

Last edited by dscottf; 09-02-2016 at 04:23 PM.
dscottf is offline   Reply With Quote
Old 09-01-2016, 04:22 AM   #1318
mariosipad
Addict
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 302
Karma: 10680
Join Date: Nov 2012
Device: iPad & iPhone with Marvin & Kobo Glo HD
@dscottf

Can you post the relevant part of your config_local.php (that what you have changed)?

You probably just missed a "/" at the end of a line.
mariosipad is offline   Reply With Quote
Old 09-01-2016, 10:28 AM   #1319
dscottf
Member
dscottf began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Oct 2003
Device: Palm Tungsten T
"Can you post the relevant part of your config_local.php (that what you have changed)?"

* BEWARE : it has to end with a /
*/
$config['calibre_directory'] = '/media/pi/MEDIA/calibre_ebooks/';

I can confirm it's the correct path:
pi@van:/var/www/html/ebooks $ cd /media/pi/MEDIA/calibre_ebooks/
pi@van:/media/pi/MEDIA/calibre_ebooks $ ls -l
total 14120
drwxrwsrwx 4 pi pi 4096 Aug 31 19:29 Aaron Anderson
drwxrwsrwx 70 pi pi 4096 Aug 31 19:29 Agatha Christie
...
-rwxrwxrwx 1 pi pi 11832320 Aug 31 19:23 metadata.db
-rwxrwxrwx 1 pi pi 14853 Aug 31 19:24 metadata_db_prefs_backup.json
...
dscottf is offline   Reply With Quote
Old 09-01-2016, 06:07 PM   #1320
mariosipad
Addict
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 302
Karma: 10680
Join Date: Nov 2012
Device: iPad & iPhone with Marvin & Kobo Glo HD
@dscottf

You are right. There should be nothing wrong with your setup.
Maybe the metadata.db and/or metadata_db_prefs_backup.json are "broken" in some way or there might be something wrong with cops or apache?

What I do when testing cops is: (adapted for your situation)
1 - install cops in /var/www/html/ebooks (or whatever you want to call this directory)
2 - makedir /var/www/html/ebooks/calibre_ebooks
3 - only copy the database files for testing
cp /media/pi/MEDIA/calibre_ebooks/metadata.db /var/www/html/ebooks/calibre_ebooks/metadata.db and
cp /media/pi/MEDIA/calibre_ebooks/metadata_db_prefs_backup.json /var/www/html/ebooks/calibre_ebooks/metadata_db_prefs_backup.json
4 - edit config_local.php
$config['calibre_directory'] = './calibre_ebooks//';

In a browser goto cops (ebooks).

If there is an error then if possible try with other database files (just make a library in Calibre with no more than a few books).

Only on a Synology I had to "fiddle" with "open_basedir". Never on my Raspberry Pi. It should "just work". Ok, maybe change some permissions.
mariosipad is offline   Reply With Quote
Reply

Tags
calibre opds, dns, kobo aura, synology

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[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 OPDS server with windows apps? nickdma Related Tools 9 02-02-2011 03:09 PM
Calibre Command Line usage with PHP artoros Related Tools 13 07-01-2010 09:57 AM


All times are GMT -4. The time now is 11:39 PM.


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