Skip to content
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

Open
errecielle opened this issue Jan 17, 2021 · 71 comments
Open

Gray page #499

errecielle opened this issue Jan 17, 2021 · 71 comments

Comments

@errecielle
Copy link

errecielle commented Jan 17, 2021

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

17/01/2021 14:54:35 [error] [client ip_blank] - site_blank - AH01215: PHP Fatal error: Uncaught Error: Call to a member function fetchColumn() on bool in /web/htdocs/site_blank/home/cops/base.php:1295: /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/
17/01/2021 14:54:35 [error] [client ip_blank] - site_blank - AH01215: Stack trace:: /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/
17/01/2021 14:54:35 [error] [client ip_blank] - site_blank - AH01215: #0 /web/htdocs/site_blank/home/cops/base.php(1302): Base::executeQuerySingle(): /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/
17/01/2021 14:54:35 [error] [client ip_blank] - site_blank - AH01215: #1 /web/htdocs/site_blank/home/cops/author.php(43): Base::getCountGeneric(): /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/
17/01/2021 14:54:35 [error] [client ip_blank] - site_blank - AH01215: #2 /web/htdocs/site_blank/home/cops/base.php(613): Author::getCount(): /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/
17/01/2021 14:54:35 [error] [client ip_blank] - site_blank - AH01215: #3 /web/htdocs/site_blank/home/cops/JSON_renderer.php(192): Page->InitializeContent(): /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/
17/01/2021 14:54:35 [error] [client ip_blank] - site_blank - AH01215: #4 /web/htdocs/site_blank/home/cops/getJSON.php(16): JSONRenderer::getJson(): /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/
17/01/2021 14:54:35 [error] [client ip_blank] - site_blank - AH01215: #5 {main}: /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/
17/01/2021 14:54:35 [error] [client ip_blank] - site_blank - AH01215: thrown in /web/htdocs/site_blank/home/cops/base.php on line 1295: /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/
17/01/2021 14:54:30 [error] [client ip_blank] - site_blank - AH01215: PHP Fatal error: Uncaught Error: Call to a member function fetchColumn() on bool in /web/htdocs/site_blank/home/cops/base.php:1295: /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/index.php
17/01/2021 14:54:30 [error] [client ip_blank] - site_blank - AH01215: Stack trace:: /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/index.php
17/01/2021 14:54:30 [error] [client ip_blank] - site_blank - AH01215: #0 /web/htdocs/site_blank/home/cops/base.php(1302): Base::executeQuerySingle(): /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/index.php
17/01/2021 14:54:30 [error] [client ip_blank] - site_blank - AH01215: #1 /web/htdocs/site_blank/home/cops/author.php(43): Base::getCountGeneric(): /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/index.php
17/01/2021 14:54:30 [error] [client ip_blank] - site_blank - AH01215: #2 /web/htdocs/site_blank/home/cops/base.php(613): Author::getCount(): /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/index.php
17/01/2021 14:54:30 [error] [client ip_blank] - site_blank - AH01215: #3 /web/htdocs/site_blank/home/cops/JSON_renderer.php(192): Page->InitializeContent(): /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/index.php
17/01/2021 14:54:30 [error] [client ip_blank] - site_blank - AH01215: #4 /web/htdocs/site_blank/home/cops/getJSON.php(16): JSONRenderer::getJson(): /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/index.php
17/01/2021 14:54:30 [error] [client ip_blank] - site_blank - AH01215: #5 {main}: /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/index.php
17/01/2021 14:54:30 [error] [client ip_blank] - site_blank - AH01215: thrown in /web/htdocs/site_blank/home/cops/base.php on line 1295: /web/htdocs/site_blank/home/cops/getJSON.php, referer http://site_blank/cops/index.php

Thank you for your help to solve this issue.

Regards

Roberto

@marioscube
Copy link

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.
You do not want the whole world be able to access you webserver!

@errecielle
Copy link
Author

errecielle commented Jan 17, 2021

First of all thank you...
here the config_local.php

/*
 * 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'] = '../files/libri/bibliotecadicalibre/';

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

/*
 * 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";

@marioscube
Copy link

Your config_local.php file should start with:

@errecielle
Copy link
Author

config_local.php.txt

@marioscube
Copy link

That looks correct.

you could try the absolute path to the calibre library

http://........../cops/checkconfig.php gives no error?

@errecielle
Copy link
Author

Immagine 2021-01-17 193525

All seems to be ok...

@marioscube
Copy link

Did you install a release zip or git pull?

use the zip.

php 7.4 should work.

Just for testing:
Either install the calibre library in ../cops ( and adjust config_local.php ;-) )

or

chmod 777 your existing library to make sure permissions do not mess things up.
You can always change it back to what it was.

@errecielle
Copy link
Author

I've installed the release zip: cops-1.1.3.zip
The library is very large so I've changed the permissions to the library directory and all the sub to 777
Also the metadata.db have 777 as permissions.

Thanx again for your time...

rcl

@marioscube
Copy link

10000 books should be no problem, even on a slow (not very old and slow) server.
Memory could be a problem. Cops starts with reading the metadata.db in memory (In my experience).

@errecielle
Copy link
Author

The books are around 4500 so this should not be a problem

@marioscube
Copy link

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.

@errecielle
Copy link
Author

😂 😂 😂
Ok. Tomortow I'll reinstall and keep you updated.

@errecielle
Copy link
Author

Nope :-(
I've reinstall from scratch, I've tried to move the calibre directory under /cops but nothing happens and the log errors are the same...

@marioscube
Copy link

marioscube commented Jan 18, 2021

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.

@errecielle
Copy link
Author

errecielle commented Jan 18, 2021 via email

@marioscube
Copy link

I did some testing (just for fun), but it did not solve your problem.

My findings are that it is NOT:

  • cops: it just works
  • CentOS: I tested with centOS 8 (your provider probably uses centOS 7, but I see no real problem there)
  • Apache: no problems
  • PHP: i tested with one version lower and one version higher than your setup, both no problem
  • Calibre version: I installed latest version and no problem there.

What could be the problem:

  • calibre database: can you make a small (2 or 3 books and no custom things) database with calibre and test that.
  • missing php extensions (should not be, because cops said it's ok).
    Make small file in the cops directory and name it test.php
    <?php phpinfo() ?>
    then, in your browser goto this file http://<>IP or URL>/cops/info.php
    maybe post the output in a file here.
  • error in the php_config.php file (but I saw no errors there).

@errecielle
Copy link
Author

First of all thank you very much for your support
Secondly I've tried this:

  • create a calibre database with 3 books. Same gray page
  • create a test.php file and opened in the browser: attached you can find the zip file with all the page (hopefully I've blanked all the ip number :-) )
  • I can confirm the checkconfig.php file shows no errors

In addition I've posted a question to the tech of the provider but I've little hope they answer this type of questions

PHP 7.4.10 - phpinfo().zip

@marioscube
Copy link

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 not, let me know.

@errecielle
Copy link
Author

If it's a simple CTRl-C - Ctrl-V, yes I'm able to do that.

// --------------------------------------------------------------------------------
// -- Fix for incompatibility older sqlite3 & Calibre v5 database format
// true will create metadata.dbv4 and use that copy
$config['sqlite_fix'] = true;
$config['dumpfile'] = '/tmp/metadata.dump';
$config['sqlite3pgm'] = '/opt/bin/sqlite3';
// leave this false unless debugging is required with url /getJSON.php?complete=1
$config['sqlite_fix_debug'] = false;
// --------------------------------------------------------------------------------

But... where?

@marioscube
Copy link

See: https://github.com/jvanderzande/cops/commit/9abeffa462b3c72984931ac3e44300931f387767

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.

@errecielle
Copy link
Author

errecielle commented Jan 21, 2021 via email

@marioscube
Copy link

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

3 - replace the existing ../cops/lib/Base.php (or rename first to Base.php.orig)with this Base.php
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.

@errecielle
Copy link
Author

errecielle commented Jan 22, 2021 via email

@marioscube
Copy link

Is there a metadata.dump file in ../cops/tmp/ ?

@errecielle
Copy link
Author

errecielle commented Jan 22, 2021 via email

@marioscube
Copy link

The image does not work, but I believe you. Size of metadata.dump is > 0?

I will test again with my antique setup.

@errecielle
Copy link
Author

Yes...

Immagine 2021-01-22 141748

@errecielle
Copy link
Author

I don't know if this matters but the sizes of metadata.db and metadata.dump are different
The first one is 405.504.

@marioscube
Copy link

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

@errecielle
Copy link
Author

errecielle commented Jan 22, 2021 via email

@errecielle
Copy link
Author

errecielle commented Jan 24, 2021 via email

@marioscube
Copy link

marioscube commented Jan 24, 2021

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

?

@errecielle
Copy link
Author

errecielle commented Jan 25, 2021 via email

@marioscube
Copy link

marioscube commented Jan 25, 2021

I have an empty in-box on xxxxxx at gmail.com?

to run sqlite3 and try for yourself:

1 - make dumpfile:
sqlite3 metadata.db .dump > metadata.dump

2 - read txt dump in database:
sqlite3 metadata.dbv4 < metadata.dump

@DB99
Copy link

DB99 commented Oct 20, 2021

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.

@jvanderzande
Copy link

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?

@DB99
Copy link

DB99 commented Oct 21, 2021

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.

configs.zip

@jvanderzande
Copy link

I had to create a symlink to be able to access the library from the webserver.
This is what I documented in my config:

//// from command prompt: Create link in website directory for COBS to the Calibre directorie(s) to be able to view them
//~   cd /share/Web/calibre
//~   ln -s /share/Public/ebooks /share/Web/calibre/ebooks
// I have 2 directories hence the array:
$config['calibre_directory'] = array ("Nederlands" => "./ebooks/Calibrebibliotheek-NL-NAS/", "English" => "./ebooks/Calibrebibliotheek-EN-NAS/");

@marioscube
Copy link

@DB99 & @jvanderzande

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.

@DB99
Copy link

DB99 commented Oct 22, 2021

@jvanderzande

Thanks a lot for your help. My sqlite3 version is 3.21.0 2017.t
I'm sure that the cause of the problem is exactly as you describe. For the time being It works well by simply copying the database and deleting these tables. At this stage modified lib/Base.php to simply use the dbv4 metadata which I produce manually.
I tried the code from @inbux on the other thread which I incorporated into the lib/Base.php file in a second cops directory on the server. So far I haven't got it working. It fails to copy the metadata.db to metadata.dbv4. I need to check if it is a permissions problem or perhaps some syntax problem. Unfortunately I'm not a php expert.

Once again thanks for your help. if I get it working I will post the relevant code in this thread.

@marioscube
Copy link

@DB99

Tested.
Copy worked for me.
So most probably a permission issue.

@DB99
Copy link

DB99 commented Oct 22, 2021

@marioscube

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.

@jvanderzande
Copy link

@DB99 Which version of the QNAP IOS are you? I am on 4.3.4.1652.
Let me know when you like any of the files from my system to test whether these versions works.

@DB99
Copy link

DB99 commented Oct 22, 2021

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.

@DB99
Copy link

DB99 commented Oct 23, 2021

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.

@jvanderzande
Copy link

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.

@DB99
Copy link

DB99 commented Oct 23, 2021

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.

@jvanderzande
Copy link

jvanderzande commented Oct 23, 2021

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":

            // regenerate v4 db when v5 db was updated
            if ($mod_datev4 < $mod_date || filesize($dbfilenamev4 ) > filesize( $dbfilename )) {
                // create processing indicator file
                $bfile = fopen($dbdir.'updaterunning', "w");
                fwrite($bfile, "processing");
                fclose($bfile);
                //***dump current v5 db
                exec($sqlite3pgm.' '.$dbfilename.' .dump >'.$dumpfile , $out, $retval);
                if ($debug) {
                    echo("Dump $dbfilename \n");
                    echo($sqlite3pgm.' '.$dbfilename.' .dump >'.$dumpfile);
                    var_dump($retval);
                    print_r($out);
                }
                //***remove annotation records from dump
                exec('sed "/annotations/d" '.$dumpfile.' > '.$dumpfile.'_2', $out, $retval);
                if ($debug) {
                    echo("Remove records with SED from dumpfile \n");
                    echo('sed "/annotations/d" '.$dumpfile.' > '.$dumpfile.'_2');
                    var_dump($retval);
                    print_r($out);
                }
                //***remove current v4 db
                unlink($dbfilenamev4);
                //***Import dump from v5 db which will remove the: near "without": syntax error
                exec($sqlite3pgm.' '.$dbfilenamev4.' < '.$dumpfile.'_2', $out, $retval);
                if ($debug) {
                    echo("Create $dbfilenamev4 \n");
                    var_dump($retval);
                    print_r($out);
                }
                // remove processing indicator file
                unlink($dbdir.'updaterunning');
            }

EDIT: Code updated a little after further testing.

@DB99
Copy link

DB99 commented Oct 23, 2021

@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.

@jvanderzande
Copy link

jvanderzande commented Oct 25, 2021

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?
Try doing a copy of the DB to the dbv4 name and running these sqlite commands:

drop table annotations_fts;
drop table annotations_fts_stemmed;

I can't test this as I can't do any batch commands on the copied db as those tables aren't supported. :)

@DB99
Copy link

DB99 commented Oct 25, 2021

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.

@DB99
Copy link

DB99 commented Oct 27, 2021

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
< if ($mod_datev4 < $mod_date || filesize($dbfilenamev4 ) > filesize( $dbfilename )) {

        if ($mod_datev4 < $mod_date) {

143a144,153

            //***remove annotation records from dump
            exec('sed "/annotations/d" '.$dumpfile.' > '.$dumpfile.'_2', $out, $retval);
            $dumpfile2 = $dumpfile.'_2';
            if ($debug) {
                echo("Remove records with SED from dumpfile \n");
                echo('sed "/annotations/d" '.$dumpfile.' > '.$dumpfile.'_2');
                echo("Dumpfile2 --- $dumpfile2 \n");
                var_dump($retval);
                print_r($out);
            }

147c157
< exec($sqlite3pgm.' '.$dbfilenamev4.' < '.$dumpfile, $out, $retval);

            exec($sqlite3pgm.' '.$dbfilenamev4.' < '.$dumpfile2, $out, $retval);

This fixes a number of problems with my particular setup. Firstly, the date comparison was combined with a check for size in an or statement. As my metadata.dbv4 version was always larger than the version 5 version, a new .dbv4 was being produced on every call. I can't see what function the size comparison performs other than to ensure the new code runs every time. Was this a debugging change which should be removed from the version in the repository?

Secondly I needed to make the import use the tmp/netadata.dump_2 without the annotations tables rather than the tmp/metadate.dump file.

Thanks once again for your help.

@jvanderzande
Copy link

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.
Not sure about your second comment as you seem to have made changes to the code I posted which I think did import the correct $dumpfile.'_2' file ... bit hey..when it works it works. ;)

@DB99
Copy link

DB99 commented Oct 27, 2021

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.

@jvanderzande
Copy link

You are welcome. :)
Same here, my QNAP TS269l is also already for a couple of years out of service, but it still runs fine so no need to upgrade yet.

enjoy :)

@marioscube
Copy link

@jvanderzande

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 :-)

@jvanderzande
Copy link

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. :)

@marioscube
Copy link

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).

@randomwraith
Copy link

randomwraith commented Nov 17, 2021

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:

add_header Content-Security-Policy "default-src 'self';";

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants