Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-09-2017, 03:51 PM   #1471
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
Hello, here is my config_local.php (there is no config_user.php, i said a mistake) :

<?php
if (!isset($config))
$config = array();

/*
* The directory containing calibre's metadata.db file, with sub-directories
* containing all the formats.
* BEWARE : it has to end with a /
*/
$config['calibre_directory'] = './calibre_database_test/';

/*
* Catalog's title
*/
$config['cops_title_default'] = "COPS_test";

/*
* use URL rewriting for downloading of ebook in HTML catalog
* See README for more information
* 1 : enable
* 0 : disable
*/
$config['cops_use_url_rewriting'] = "1";
?>

nothing that could explain the blank page...

I use last version of Calibre. Could it be possible that database of last calibre version is not ok with COPS ?
iostrym is offline   Reply With Quote
Old 03-09-2017, 06:54 PM   #1472
mariosipad
Guru
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: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
I cannot find any error in your config_local.php.

Regarding Calibre: I just tested with the latest version of Calibre and made a new library. There was no problem reading the database (eventually).

However when I added the new database to cops I experienced a strange thing, a blank (white) page. But after some regular checks of the data and config_local.php file cops went back to normal operation and the calibre database showed as usual.

My checks were:
- SSH into the OS (Linux Debian Wheezy on an old test server)
- go to the database library and check for rights (r,w) -> all ok, checked with "ls -la"
- re-edited (and saved again) the config_local.php file to eliminate possible typing errors (not that there were any)
- opened cops in firefox in privacy mode (to eliminate all old caching client side) ...... and now it worked.

I was unable to reproduce this error (white page).
mariosipad is offline   Reply With Quote
Old 03-10-2017, 03:23 AM   #1473
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
Thanks for your test. So first time you were able to reproduce my issue (blank page). So even if I don't understand why, I need to try the privacy mode of Mozilla like you...
Could it be possible that the check of 'kobo usage' during cops install make the PHP working only on Kobo browser ?
iostrym is offline   Reply With Quote
Old 03-10-2017, 06:12 AM   #1474
mariosipad
Guru
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: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
No, for Kobo you need $config['cops_use_url_rewriting'] = "1"; in config_local.php. This is not needed for regular browsers like Firefox.

The white browser screen I got has (in my humble opinion) something to do with the web server cache on the server (you: Synology with Apache based web server; me: Debian OS with Apache).
Therefore restarting the webserver or the whole device sometimes works to solve this problem (in my case). Maybe even opening and saving config_local.php with nano on the server (new config file is loaded in cache) helped.
mariosipad is offline   Reply With Quote
Old 03-10-2017, 10:22 AM   #1475
plasmid
Junior Member
plasmid began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Dec 2014
Device: TrekStor Pyrus
Is it possible to implement Calibre subgroups management feature (display a hierarchical structure for dot separated categories)?
plasmid is offline   Reply With Quote
Old 03-10-2017, 05:20 PM   #1476
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
hi all, concerning my blank page problem, I resolved it by installing apache 2.2 server on DSM 6.1 and then select it instead of NGINX in web station of my Synology...
Was it documented that NGINX has problem with COPS ?

=> It is working with a database stored inside cops directory.

I'm going to try with a database in my shared folder...
iostrym is offline   Reply With Quote
Old 03-10-2017, 06:16 PM   #1477
mariosipad
Guru
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: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
Well, the developer of cops uses NGINX (not Apache), so it should work if setup right for cops (as an apache 2.4 user I don't know how).

I assumed that Synology works with an apache (like) web server, but apparently as of DSM 6 you have a choice.

If possible try to use Apache 2.4 instead of 2.2.
mariosipad is offline   Reply With Quote
Old 03-10-2017, 06:43 PM   #1478
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
I don't succeed to make my calibre database in sharefolder /volume2/ebook to work.
I suspect open_basedir problem.

In Synology there is a GUI ton configure open_basedir but maybe this GUI is not modifying the correct file ? For instance, my modification in the GUI lead to the modification of :

/usr/syno/etc/packages/WebStation/php56/conf.d/user_settings.ini =

zend_extension = opcache.so
extension = apcu.so

date.timezone = Europe/Amsterdam
display_errors = On
open_basedir = /tmp:/var/services/tmp:/var/services/web:/var/services/homes:/volume2/ebook



whereas in the COPS checkconfig.php it is said to check value of open_basedir in php.ini.

There are several php.ini in my synology. one is located in :

/usr/syno/etc/packages/WebStation/php56/php.ini and don't contain any open_basedir configuration.

there are also some other php.ini :

/etc/php/php.ini
/etc.defaults/php/php.ini
/usr/syno/etc/packages/WebStation/php56/php.ini
/usr/syno/etc/packages/WebStation/php70/php.ini
/usr/local/etc/php56/php.ini

And I don't know which one to modify.

Concerning the rights of /volume2/ebook I think there are OK as I did a chmod -R 777, also add http group (instead of http user that is a synocommunities mistake I think)
iostrym is offline   Reply With Quote
Old 03-10-2017, 07:12 PM   #1479
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
I reinstalled cops from synocommunities and I notice that this installation change the owner of the database in shared folder (directories+files) by "http" user. it is strange because in my synology there is a "http" group but not a "http" user. isn't there a problem here ?

(even if it should not be a problem as I gived also all access to everyone)
iostrym is offline   Reply With Quote
Old 03-11-2017, 05:16 PM   #1480
mariosipad
Guru
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: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
In http://....../cops/checkconfig.php what version of php is used?

If version 7 is used that might be the problem. Open_basedir looks to be edited for php 5.6 (maybe not for php 7).

Try editing again with the Synology menu.
mariosipad is offline   Reply With Quote
Old 03-12-2017, 06:16 PM   #1481
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
reading some post on the web I found the solution:
manual modification of open_basedir in :
/usr/local/etc/php56/conf.d/user_settings.ini

and after a reboot (before rebooting => no change) => it works !!! (about one weeks on this problem...)

I don't know why synology config in webstation don't edit the correct file. If you know it, I am very interested...

anyway thanks a lot for your help during my COPS configuration.
iostrym is offline   Reply With Quote
Old 03-13-2017, 08:32 AM   #1482
mariosipad
Guru
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: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
On my Synology I run DSM 5.2 (the latest available for my model).

My open_basedir line is in /etc/php/conf.d/user-settings.ini
Maybe you can check if this file exists on your Synology?
On my Synology (DSM 5.2) the directory/file /usr/local/etc/php56/conf.d/user_settings.ini does not exist.
(Neither does /usr/syno/....).

Perhaps there are more differences between DSM 5 and DSM 6 than expected? And is the cops-package you used set up for DSM 5 or DSM 6. That should not but might explain your difficulties with setting up a working version of cops. I never used the package(s), set up cops from source. that's probably why I never encountered your problems.

And if I change open_basedir I need a reboot (or restart of the Synology web server).

Well, that you were able to solve the problem and cops on your Synology works now.
mariosipad is offline   Reply With Quote
Old 03-13-2017, 11:20 AM   #1483
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
thanks a lot. yes, I agree. A modification of open_basedir need a reboot. what I'm facing is kind of DSM 6.X bug because open_basedir modification from Synology GUI is not working (I'm not the only one in this case).

Do you know what is port forward to use to use COPS from outside ? I wanted to do this port forward AFTER having secure cops (add authentification process) but I discover that I can reach cops from outside right now without having done the needed port forward.

The only one port forward made is the one needed to access my NAS from outside (the GUI). Is COPS working with the same port than the NAS GUI ?
iostrym is offline   Reply With Quote
Old 03-13-2017, 11:30 AM   #1484
mariosipad
Guru
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: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
The Synology GUI works (DSM 5) on port 5000 (unless you changed it?

The (apache) webserver on the Synology should work with port 80 (or 443 for https: access).

When you try to access your Synology GUI from outside of your LAN (through internet) do you use:
http://<your-external-url-or-ip>:5000 ?
And for cops?
http://<your-external-url-or-ip>:5000/cops ?
mariosipad is offline   Reply With Quote
Old 03-13-2017, 05:24 PM   #1485
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
Hello,

yes I use another port than 5000. But let say 5000 for the example.
In fact I forgot that I have a redirection for 80 and 443 because of the use of photostation....
Is it possible to have photostation working with another port ? so that I could avoid the 80 and 443 redirection to cops ?

one stuff that I don't control also is the automatic use of the port + adress modification

For instance when I type externally toto.tk and then enter, i will be redirected to toto.tk:5000 and some other time to toto.tk/cops ... it is very strange. it is also a problem because if I change 5000 port it is to avoid the port to be set automatically for an unknown user... Do you know if it is possible to disable every automatic address completion ?
iostrym is offline   Reply With Quote
Reply

Tags
calibre opds, dns, kobo aura, synology


Forum Jump

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


All times are GMT -4. The time now is 02:05 AM.


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