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 Yesterday, 11:23 AM   #1546
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: 375
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin & Kobo Glo HD
Quote:
Originally Posted by MontyJ View Post
Frustrating...
I can imagine.

I can reproduce this behaviour (enter username and password then <Sign In> then <Please Sign In> pop-up window disappears shortly and appears empty again) only if I somehow have enabled (through .htaccess) authentication and the username/password I enter are different from those in .htpasswd ("encrypted").

So try:
- comment out the lines $config['cops_basic_authentication'] = ... in all config_local.php and config_local.userX.php files and try logging in again. What happens?
or
- make the username / password the same as in .htpasswd ("unencrypted") and try again. What happens?
mariosipad is offline   Reply With Quote
Advert
Old Yesterday, 11:36 AM   #1547
MontyJ
Zealot
MontyJ began at the beginning.
 
Posts: 144
Karma: 10
Join Date: Jul 2012
Device: Kindle
Quote:
Originally Posted by mariosipad View Post
I can imagine.

I can reproduce this behaviour (enter username and password then <Sign In> then <Please Sign In> pop-up window disappears shortly and appears empty again) only if I somehow have enabled (through .htaccess) authentication and the username/password I enter are different from those in .htpasswd ("encrypted").

So try:
- comment out the lines $config['cops_basic_authentication'] = ... in all config_local.php and config_local.userX.php files and try logging in again. What happens?
or
- make the username / password the same as in .htpasswd ("unencrypted") and try again. What happens?
When I comment out all the auth config lines in the 3 files, it jumps right into "COPS 1.1.1" screen showing the 4 libraries as in config_local.php.

I have no .htaccess or .htpasswd files in the cops111 folder, OR in the parent Web folder. There was .htaccess in /Web/cops101, not being tested at the moment.

[Edit] Does ANYONE actually have this working??

Last edited by MontyJ; Yesterday at 11:58 AM. Reason: Update
MontyJ is offline   Reply With Quote
Old Yesterday, 12:08 PM   #1548
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: 375
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin & Kobo Glo HD
Yeah me! But not on a QNAP.

If you enable authentication through .htaccess/.htpasswd does that work like you want it to?
mariosipad is offline   Reply With Quote
Old Yesterday, 12:26 PM   #1549
MontyJ
Zealot
MontyJ began at the beginning.
 
Posts: 144
Karma: 10
Join Date: Jul 2012
Device: Kindle
Quote:
Originally Posted by mariosipad View Post
Yeah me! But not on a QNAP.

If you enable authentication through .htaccess/.htpasswd does that work like you want it to?
Yes, that works, but does not give me per user settings in COPS, which is my goal here!

Does this appear to be a specific Python issue? My current Python install is V2.7.12. I see there is a Python3 V3.5.2.0 available from the official QNAP install repository. Not sure of the downsides to installing the new one, but am willing to try if you think it may be specific to Python.

Last edited by MontyJ; Yesterday at 01:07 PM. Reason: Clarify
MontyJ is offline   Reply With Quote
Old Yesterday, 01:11 PM   #1550
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: 375
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin & Kobo Glo HD
python -V gives on my setup Python 2.7.9

What's your PHP version (php -v)? PHP 5.6.30-0+deb8u1
mariosipad is offline   Reply With Quote
Old Yesterday, 01:18 PM   #1551
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: 375
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin & Kobo Glo HD
With working .htaccess put this file in your cops111 directory: (assuming/knowing) you have a working user monty.

config_local.monty.php
Code:
<?php

    /*
    * Catalog's title
    */
    $config['cops_title_default'] = "MONTY COPS";
Without the line for $config['cops_basic_authentication'] = array('username' => 'monty', 'password' => 'mypwd');

In my setup if I login with user monty it works.
mariosipad is offline   Reply With Quote
Old Yesterday, 01:32 PM   #1552
MontyJ
Zealot
MontyJ began at the beginning.
 
Posts: 144
Karma: 10
Join Date: Jul 2012
Device: Kindle
Quote:
Originally Posted by mariosipad View Post
python -V gives on my setup Python 2.7.9

What's your PHP version (php -v)? PHP 5.6.30-0+deb8u1
Code:
[/share/Web] # python -V
Python 2.7.12
[/share/Web] #
Just downloaded a new version for the QNAP, Python 2.7.13 that is specific to this new version of firmware 4.3.3 x64 on the Qnap. It looks to be reasonably safe whereas Python3 seems to have some issues based on forum comments about it.

I will report back once it is installed and tested.


I tried php -v, but nothing found. I see a lot of php5 files in the qts system, but php5 -v doesn't bring up anything either. Still loading the new python 2.7.13...

Last edited by MontyJ; Yesterday at 02:08 PM. Reason: update
MontyJ is offline   Reply With Quote
Old Yesterday, 02:20 PM   #1553
MontyJ
Zealot
MontyJ began at the beginning.
 
Posts: 144
Karma: 10
Join Date: Jul 2012
Device: Kindle
Well, appears I have buggered the system somehow; now the old COPS doesn't even work after the new python update.

Back to square one....reset system, start clean.

Thanks for the help!
MontyJ is offline   Reply With Quote
Old Yesterday, 04:30 PM   #1554
MontyJ
Zealot
MontyJ began at the beginning.
 
Posts: 144
Karma: 10
Join Date: Jul 2012
Device: Kindle
@mariosipad,

Do you know if the cops authentication process depends on 1 or more specific modules in Python? I have a list of the modules and can check to make sure the right modules are there.

I have the qnap back up, in virgin state, except did load cops1.1.1 with a single calibre library for testing. It does work with the original .htaccess file left in the cops folder, but no .htpassword file.

But, it does not work when I put in cops authentication...same problem as before. This default version of Python is 2.7.5. I have queried the qnap gurus about loading the new 2.7.13 but haven't done it yet.
MontyJ is offline   Reply With Quote
Old Yesterday, 04:37 PM   #1555
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: 375
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin & Kobo Glo HD
As far as I know cops does not depend on python. No need to Install other modules just for cops.

Cops depends on PHP.
If checkconfig.php = ok in the first line, then it's ok.

Can you find out which apache modules are enabled in the QNAP webserver?

Last edited by mariosipad; Yesterday at 04:44 PM.
mariosipad is offline   Reply With Quote
Old Yesterday, 05:16 PM   #1556
MontyJ
Zealot
MontyJ began at the beginning.
 
Posts: 144
Karma: 10
Join Date: Jul 2012
Device: Kindle
Quote:
Originally Posted by mariosipad View Post
As far as I know cops does not depend on python. No need to Install other modules just for cops.

Cops depends on PHP.
If checkconfig.php = ok in the first line, then it's ok.

Can you find out which apache modules are enabled in the QNAP webserver?
FYI, attached is a jpeg of the checkconfig screen, so line 1 is ok.

However, per the hints, I checked php.ini for any mention of "intl" or "Intl" and no hits.

In previous setups I had installed Entware because it had the Intl php5 module. but I noticed that line in the check config screen never says OK, just to check Intl installed and activated.

But I am holding off Entware to keep the system as clean as possible while trying to get this to work. So I don't know if Intl ever got loaded in php.ini or not, even with Entware.

Could that be part of this problem?

I also attached a txt file of the loaded apache modules. Not sure how to tell if they are available to the "QNAP Webserver", but the list shows ALL apache modules, according to the qnap guides.

[Edit]
Forgot to mention; I setup COPS111 normally using the default port 80, no Virtual Host for it until we get this sorted out...until everyone throws up their hands in despair, that is
Attached Thumbnails
Click image for larger version

Name:	COPS111ConfigCheck.jpeg
Views:	6
Size:	107.5 KB
ID:	156944  
Attached Files
File Type: txt apache_modules.txt (9.6 KB, 2 views)

Last edited by MontyJ; Yesterday at 05:22 PM. Reason: Update
MontyJ is offline   Reply With Quote
Old Yesterday, 06:03 PM   #1557
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: 375
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin & Kobo Glo HD
1 - checkconfig.php looks OK
-> the missing intl is no problem. Probably only used with latin (French, Spanish, etc) languages. Just disregard any messages about intl. Not a part of the problem.

2 - the text file list (as you said) all the available modules not just the "active/loaded" ones. But if .htaccess authentication works(worked once) then there should be no problem.

3 - now put the line
Code:
$config['cops_basic_authentication'] = array("username" => "monty", "password" => "montyspw");
in config_local.php and login with a browser in "private" mode.

Take it step by step.

Last edited by mariosipad; Yesterday at 06:09 PM.
mariosipad is offline   Reply With Quote
Old Yesterday, 07:05 PM   #1558
MontyJ
Zealot
MontyJ began at the beginning.
 
Posts: 144
Karma: 10
Join Date: Jul 2012
Device: Kindle
Quote:
Originally Posted by mariosipad View Post
1 - checkconfig.php looks OK
-> the missing intl is no problem. Probably only used with latin (French, Spanish, etc) languages. Just disregard any messages about intl. Not a part of the problem.

2 - the text file list (as you said) all the available modules not just the "active/loaded" ones. But if .htaccess authentication works(worked once) then there should be no problem.

3 - now put the line
Code:
$config['cops_basic_authentication'] = array("username" => "monty", "password" => "montyspw");
in config_local.php and login with a browser in "private" mode.

Take it step by step.
Used private/incognito mode in 3 different browsers.

Copied the above verbatim, including password, and entered. Deleted the current config_local.monty.php I had.

No change.

[Edit]

I just tried .htaccess in local mode and it is not kicking in. I used the one that came with the cops111 zip. Then I created a new .htpasswd with my monty name and password.

If I leave the cops auth statement active in config_local.cfg, then I get the login form for cops that doesn't work. So I commented it out.

Still using incognito mode, I entered 192.168.x.xxx/COPS111. It jumps right to the test library I have setup for the test; no password form from apache. I am pretty sure it worked in local mode before, but I am absolutely sure it worked when I used it through pagekite/Internet.

Should it work locally?

Did I mention I hate Apache...?

I finally remembered that the basic apache.conf had to be modified for password protection through Apache. Here is what I now have, but it still isn't working:

Code:
<Directory "/share/Web">
    Options FollowSymLinks MultiViews
    AllowOverride All
    Require all granted
    AuthType Basic
    AuthName "RESTRICTED AREA"
    AuthUserFile /share/Web/COPS111/.htpasswd
    Require valid-user
</Directory>

Last edited by MontyJ; Yesterday at 08:18 PM. Reason: Update
MontyJ 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 01:08 AM.


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