-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gray page #499
Comments
A grey screen is usually caused by an error in the settings in config_local.php please post your config_local.php NB: edit out your domain name and external IP from your post above. |
First of all thank you...
|
Your config_local.php file should start with: |
That looks correct. you could try the absolute path to the calibre library http://........../cops/checkconfig.php gives no error? |
Did you install a release zip or git pull? use the zip. php 7.4 should work. Just for testing: or chmod 777 your existing library to make sure permissions do not mess things up. |
I've installed the release zip: cops-1.1.3.zip Thanx again for your time... rcl |
10000 books should be no problem, even on a slow (not very old and slow) server. |
The books are around 4500 so this should not be a problem |
Sometimes if something does not work a reinstall and new setup of config files fixes the problem. the error with the base.php file suggest that something with a php file does not work as it should. What? I do not know. |
😂 😂 😂 |
Nope :-( |
What OS (Linux debian, ubuntu, centos, etc) do you use? And what webserver (if Apache I can try to help)? Maybe I can recreate and test your setup in a VM. Calibre 5.9 works (just tested), so not the problem. |
I'm using a server provided by a server farm here in Italy. Aruba. So I'm
not able to answer this type of questions.
It's an hosted solution.
I'll check with the provider.
Thank you again.
Roberto
Il giorno lun 18 gen 2021 alle ore 11:37 marioscube <
[email protected]> ha scritto:
… What OS (Linux debian, ubuntu, centos, etc) do you use? And what webserver
(if Apache I can try to help)?
Maybe I can recreate and test your setup in a VM.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#499 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACD7SDPPROFO44EUSPW4GXDS2QFNDANCNFSM4WGETGXA>
.
|
I did some testing (just for fun), but it did not solve your problem. My findings are that it is NOT:
What could be the problem:
|
First of all thank you very much for your support
In addition I've posted a question to the tech of the provider but I've little hope they answer this type of questions |
Aaahhrrrggg I should have thought of this earlier (I must be getting old and forgetfull). It's this #48 problem all over again with.centOS 7! The calibre database made with Calibre 5 does not work with the php-sqlite3 version included in centOS 7. I think, based on their website, that Aruba uses centOS 7 as OS. This thread in #487 gives a nice solution to your problem if you are comfortable with changing some of the COPS code. |
If it's a simple CTRl-C - Ctrl-V, yes I'm able to do that. // -------------------------------------------------------------------------------- But... where? |
The above part in config_local.php The larger part in ../cops/lib/base.php I have not tried this last iteration of this solution. |
we, you, are close, I feel it :-)
Now the error is in the path for the db:
"
File ../files/libri/calibre/metadata.dbv4 not found, Please check
I've tried to modify the path in $config['dumpfile'] =
'/tmp/metadata.dump'; because I don't have a tmp directory so I've put the
same of the db but it seems not working
Il giorno gio 21 gen 2021 alle ore 19:32 marioscube <
[email protected]> ha scritto:
… See:
jvanderzande@9abeffa
<http://url>
The above part in config_local.php
The larger part in ../cops/lib/base.php
I have not tried this last iteration of this solution.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#499 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACD7SDOUSSC4YZVRKSAFJD3S3BXNPANCNFSM4WGETGXA>
.
|
What worx for me: 1 - make e tmp directory in ../cops 2 - copy the config_local.php file in ../cops (or after evaluating my changes copy the changes to your config_local.php 3 - replace the existing ../cops/lib/Base.php (or rename first to Base.php.orig)with this Base.php 4 - check if it works. There is one problem with this fix. It only works if you use just one calibre library in COPS. I use multiple, so I do not use this fix. |
I checked your files with mine and I don't see any particular differences
but some must be there because now I have this error message:
-
Check if Calibre database file contains at least some of the needed tablesNot
all Calibre tables were found. Are you sure you're using the correct
database.
It actually created the .dbv4 file but created it empty.
I also tried to move the calbre folder under /cops but the error remains
the same.
I've checked the permissions and all 777
[image: Immagine 2021-01-22 075226.png]
Il giorno ven 22 gen 2021 alle ore 00:13 marioscube <
[email protected]> ha scritto:
… What worx for me:
1 - make e tmp directory in ../cops
2 - copy the config_local.php file in ../cops (or after evaluating my
changes copy the changes to your config_local.php
config_local.php.txt
<https://github.com/seblucas/cops/files/5852607/config_local.php.txt>
3 - replace the existing ../cops/lib/Base.php (or rename first to
Base.php.orig)with this Base.php
Base.php.txt <https://github.com/seblucas/cops/files/5852610/Base.php.txt>
4 - check if it works.
There is one problem with this fix. It only works if you use just one
calibre library in COPS. I use multiple, so I do not use this fix.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#499 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACD7SDIXFEPOXIDMJC5GP7LS3CYKXANCNFSM4WGETGXA>
.
|
Is there a metadata.dump file in ../cops/tmp/ ? |
Yes. There is
[image: Immagine 2021-01-22 141748.png]
Il giorno ven 22 gen 2021 alle ore 08:24 marioscube <
[email protected]> ha scritto:
… Is there a metadata.dump file in ../cops/tmp/ ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#499 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACD7SDKL4SJ6KZ6T3YH3673S3ER2LANCNFSM4WGETGXA>
.
|
The image does not work, but I believe you. Size of metadata.dump is > 0? I will test again with my antique setup. |
I don't know if this matters but the sizes of metadata.db and metadata.dump are different |
That is ok. You have tried to delete metadata.dump and metadata.dbv4 and then tried it again |
Yes, more or less five times switching the calibre folder up and down...
I'll retry again now
Il giorno ven 22 gen 2021 alle ore 16:42 marioscube <
[email protected]> ha scritto:
… That is ok.
The size of metadata.dump seems a bit small though.....
You have tried to delete metadata.dump and metadata.dbv4 and then tried it
again
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#499 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACD7SDKQTWGRD3FH7AZMFHLS3GMFNANCNFSM4WGETGXA>
.
|
Here or where?
Il giorno dom 24 gen 2021 alle ore 18:19 marioscube <
[email protected]> ha scritto:
… The problem is the splite3, or when making the metadata.dbv4 file your
metadata.db file.
You could try sending it to me and see if I can convert it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#499 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACD7SDMGTFQOJ5WDSJ6HQX3S3RJCFANCNFSM4WGETGXA>
.
|
Mail to my username at gmail.com if you want to mail metadata.db to me can you send me: 1 metadata.db from the server and 2 metadatadb from calibre5 ? |
Done.
In parallel I've installed sqlite3 on my pc and, searching the web, I've
found some help on how to use it.
sqlite> .open metadata.db
sqlite> .output metadata.dbv4
sqlite> .dump
sqlite> .output stdout
Probably in the commands I'm missing something because the dbv4 file is not
working
Il giorno dom 24 gen 2021 alle ore 18:32 marioscube <
[email protected]> ha scritto:
… Mail to my username at gmail.com
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#499 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACD7SDIMIBDDYRRQMK5VOJLS3RKUJANCNFSM4WGETGXA>
.
|
I have an empty in-box on xxxxxx at gmail.com? to run sqlite3 and try for yourself: 1 - make dumpfile: 2 - read txt dump in database: |
I have a somewhat datted QNAP NAS TS-421 running the latest COPS version installed from source from Jos jvanderzande's fork which incorporate the fixes to lib/Base.php and config_local.php. Ther process works flawlessly and createts a correct metadata.dbv4 file. However, the grey page persists and checkconfig.php cannot verify the database. A check of the v4 database shows the annotations tables still present. Removing the new annotations tables results in proper functioning. Is there any step in the process which is intended to delete these tables or should COPS be able to function with them in the dbv4 database? Thanks in anticipation of assistance. |
I am running it on a QNAP TS269L (Also pretty dated) and do not have issues and checkconfig.php works fine. Maybe you can share your config so I can compare it with mine? |
I've attached a zip file with my config_local.php, the debug log and the resulting metadata.dbv4 file. The metadata.dbv4 contains the fts annotations tables and does not work. However, removing these tables does result in it working with COPS. It seems that on my \ QNAP the dump is creating the dbv4 metadata with all of the fts annotations tables without actually fixing them. I'd like to know why. If not I might try modifying your code to simply copy the metadate.db to metadata.dbv4 rather than creating the latter via the dump command, then dropping the offending tables in the dbv4 file and using that for COPS. As the dbv4 file is used only for COPS I don't see any real downside to this approach. Thanks for your hard work on this. I'd love to know what's causing the problem. |
I had to create a symlink to be able to access the library from the webserver.
|
I had a hunch and did some testing. I think that @DB99 uses a sqlite3 command line interface (CLI) that is newer than the php5-sqlite module for php5. What is the output of sqlite3 -- version ? A newer sqlite3 (CLI) does not strip out the "unrecognized" annotation tables while the older sqlite3 does. for the newer sqlite3 those tables are not "unrecognized" so it leaves them in when using the code of @jvanderzande. The code given at the bottom of #487 by user @inbux might work in your use-case with a newer sqlite3. It did not work for me with the older sqlite3. |
Thanks a lot for your help. My sqlite3 version is 3.21.0 2017.t Once again thanks for your help. if I get it working I will post the relevant code in this thread. |
Tested. |
Thanks for your help. I'd meant to put your name on my previous post as well. I have copy working now.by way of a shell script. For some reason no matter what I do I can't seem to get php copy to work. I even checked php.ini. However, I did mantage to get it to run a shell script which did hte copy. However, the version of sqlite3 on my QNAP cannot delete the fts tables with an error message that it lacks an fts5 module. If I want it to work I'm going to have to get a more up to date arm v5 binary, or if I find more time cross-compile one. Once again thanks for your help. |
@DB99 Which version of the QNAP IOS are you? I am on 4.3.4.1652. |
4.3.3.1693 of 24 June 2021. A check shows this is the most up to date version for TS=421. The sqlite3 cli seems to be from optware/entware. It seems that it is just new enough not to drop the fts tables during the dump process but too old to support fts5, and so cannot drop the fts tables from the database. The later version on my desktop deals with these tables without problems. |
A quick update. I tried installing old binaries of sqlite3 and libsqlite3 from the entware archives with a view to finding one that dumped the database without the fts tables. Even the oldest, dating back to 2016, dumped the database with the fts tables. I think the best solution is to install a newer version. However, as I have been unable to find a later working binary I will have to cross compile, which I will try when I get some time. Any other suggestions are of course welcome. |
The FTS tables are also in my dumpfile, but I think it is the IMPORT that will skip them as it doesn't understand the statements. |
Sorry. My previous post incorrectly referred to the dumped database rather than the imported one. I ran your code with the various binaries installed and the fts tables were still in the metadata.dbv4 files. |
Maybe this could be an alternative to get rid of those annotate records, it still works for me but can't test with your setup version. Added s SED step to base.php to get rid of the records in the dump containing "annotations":
EDIT: Code updated a little after further testing. |
@jvanderzande Thank you very much for the code. It works but is very slow on a large database. It appears that the metadate.dbv4 is being recreated with every web access. The database is large enough that I can actually see this happening in an ssh shell, which shows metadata.dbv4 with a journal file and growing in size as the data is imported. I doubt this ia problem introduced by the new code, but probably with the date comparison function. It well only be apparent with a large database. On another issue, it appears that the latest sqlite3 cli for arm5 on entware is compiled with support only for fts3. Unfortunately neither this or earlier entware versions drop the annotations tables on either dumping or importing. Once again thanks for your help. |
Ah ok .... for me it was pretty quick when testing and didn't have the date check issue. Maybe you can copy the database and remove the FTS stuff from the copy with some SQLITE commands?
I can't test this as I can't do any batch commands on the copied db as those tables aren't supported. :) |
Once again thanks for your interest and help. I currently have it working very well by simply manually copying metadata.db to metadata.dbv4 and removing those tables with either sqlite3 or sqlitebrowser from m main Manjaro box as the binary sqlite3 on the qnap will not even drop the tables. I've changed Main.php to simply use the dbv4 version. It's now working very well and very fast. I have a second version with your modified code which works but slowly. I'm no php expert but plan to investigate why it seems to regenerate the database on every call. I don't see any problem with the logic of your code so am wondering if the problem is with the database on the QNAP. When testing COPS yesterday I came across an author where only 1 book out of a large number was shown. I ultimately solved this after some frustration by deleting the database completely and restoring it from the local database. I've yet to run your code against the new database but would not be surprised if it does now work as expected. |
All is now working perfectly, at least so far. This is the output of diff comparing the lib/Base.php as it stands in your repository with my new lib/Base.php which works on my QNAP TS-421: 131c131
|
In my case the v4 db is smaller and I honestly am not sure anymore why I added that. If you version works for you then that's great. |
On my particular setup it was importing the original dump file without the removal of the annotations tables rather than the one produced after running the sed statement. But as you said, if it works it works! The QNAP and likely other NAS appliances certainly have their particularities. The QNAP forums show requests for updated packages going back years with no results. My TS-421 uses arm5 and support has ended, so there is little chance of updated software. It's great to have COPS working with the latest Calibre. Once again my thanks. I really appreciate your help and your code. The use of sed on the dumpfile was a great approach. Without this I would either t been manually preparing metadata.dbv4 files or trying to cross-compile sqlite3 for arm5! Once again thanks to you and to marioscube for your help. |
You are welcome. :) enjoy :) |
Just to confirm that your latest code (to be honest I just took the 2 relevant lines out of it, commented out the replaced lines and added the lines to ../lib/Base.php) still works with my ancient Tonido2 device (runs on Debian squeeze, wich is oldoldoldoldoldstable ;-) ). Thank you for your code :-) |
Nice ... I still prefer the original one when that works as that seems a bit faster, but the addition of the sed step should make it work on any system irrelevant of the commandline mysql version. :) |
On this device speed and faster is not an issue. It's ... just ... slow. For small libraries that's not an issue, for big ones ....., grab a coffee! However with COPS that's just a one time caffeine overdose. After the database conversion the device is fast enough (if you cache the thumbnails). |
Whilst not related to the code errors if you using a "Content Security Policy" then this could cause a grey page. I have just migrated from apache to nginx and this frustrating problem surfaced. It was only by chance that I noticed that an unrelated page required a long scroll to reach the content and wondered if it was a manifestation of the same problem. It turns out in my case the following server directive in my page configuration was interfering with the page load:
If you have this or similar in your config, try commenting it out. Doing so solved the problem for me and cops is working AOK again. Fully commenting out should only be considered a stop gap - ideally you would tailor the directive appropriately. For what its worth, I'm using Debian 11 (bullseye) with PHP 7.4, nginx 1.18 |
I have Cops installed on my web server but the only thing I see is a gray page. My server log reports these errors which, you will excuse me, I am absolutely unable to decipher.
The metadata.db file is from Calibre 5.9. The PHP version is 7.4
Thank you for your help to solve this issue.
Regards
Roberto
The text was updated successfully, but these errors were encountered: