seblucas / cops

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)
http://blog.slucas.fr/en/oss/calibre-opds-php-server
GNU General Public License v2.0
1.43k stars 229 forks source link

Cannot access files, but can access the library #408

Closed dxcore35 closed 5 years ago

dxcore35 commented 6 years ago

Hello,

When I put my server address http://SERVER.synology.me/cops into Marvin 3 reader on iOS the app successfully find the server and show all the categories. But after choosing any category the app throw the error, that the feed cannot be downloaded. I tired to replicate with the same calibre library via Calibre server, but this works perfect. The page is also fully accessible and everything works in browser. So the error is somewhere in config file.

Platforms:

SERVER: Synology (COPS)
READER: Marvin 3 (iOS app)

I'm especially highlighting this setting from the config file: $config['cops_full_url'] = 'http://SERVER.synology.me/cops/';

Full config file: config_default.txt

marioscube commented 6 years ago

Did you follow this howto"?

https://github.com/seblucas/cops/wiki/Howto---Synology

dxcore35 commented 6 years ago

Sure. But there is no solution to this problem, it is not Synology specific problem. I'm running COPS with no problem, only when connecting via Marvin App I cannot access the files.

marioscube commented 6 years ago

I did some testing on ym own setup(s) with Marvin3 and I think it's not a cops or synology problem, but a Marvin3 problem (just like with the kobo browser).

To make it all work we need to change this line in cops: /*

So change "0" to "1" and it should work. It did for me.

dxcore35 commented 6 years ago

I have tried to set

$config['cops_use_url_rewriting'] = '1';

But I'm still getting same error. I can access the main categories but when i want to go deeper inside the category, the Marvin throw error.

marioscube commented 6 years ago

Can you try with a bare minimum of altered settings in config_local.php? Maybe just:

Leave the rest default (and return the file config_default.php to it's original state).

It;s my suspicion that Marvin 3 does not cooperate well with custom columns, so just try without.

seblucas commented 6 years ago

Do you use password protection ?

marioscube commented 6 years ago

I do (as a setting in config_local.php).

But I suspect it’s a Marvin 3 problem, nothing to do with cops.

dxcore35 commented 5 years ago

The password is removed. But still get:

image

I've contact Marvin developer and point him to this issue.

marioscube commented 5 years ago

I tested on:

Installed COPS in /volume1/web/cops Put the calibre libraries in /volume1/web/cops/Books (for testing purposes) Used this config_local.php (and changed nothing else):

<?php
/**
 * COPS (Calibre OPDS PHP Server) class file
 *
 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
 * @author     Sébastien Lucas <sebastien@slucas.fr>
 */

    if (!isset($config)) {
        $config = array();
    }

    $config['calibre_directory'] = array ("Calibretest" => "./Books/calibretest/",
                                          "COPStest" => "./Books/COPStest/");

    $config['cops_full_url'] = 'http://192.168.1.XXX/cops/';

    $config['cops_recentbooks_limit'] = '1000';

    $config['cops_title_default'] = 'COPS 1.1.2 Synology';

    $config['default_timezone'] = 'Europe/Amsterdam';

    $config['cops_use_url_rewriting'] = '1';

    $config['cops_thumbnail_handling'] = '1';

Started Marvin3 on my iPad (iOS 12) used the webbrowser: http://192.168.1.XXX/cops/ And I could download my epubs to Marvin3.

To test if it works for you I suggest you try to do the same. You can add other options later.

marioscube commented 5 years ago

@dxcore35 I have reproduced your error and it’s a COPS error!

Version 1.1.2 (zip file) seems to be ok, but later versions (git clone etc.) give errors.

EDIT Even version 1.1.2 has a lot of problems. Cops seems to be partly broken :(

I’m going back to an earlier version.

marioscube commented 5 years ago

@dxcore35

On my config I traced the problem to a not working .htaccess.

On Synology .htaccess should be enabled, because to work Marvin 3 needs: $config['cops_use_url_rewriting'] = '1'; in config_local.php and all the rewrite rules in .htaccess.

There are still one or two smaller problems, but the developer of COPS is working on it.