View Single Post
Old 10-06-2013, 09:33 PM   #646
StickyC
Junior Member
StickyC began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2008
Device: Kindle
QNap install steps? PDOException

Trying to get COPS working on my QNap 419 w/firmware 4.02. I'm pretty sure I followed all the correct steps, but am being bugged by the DB access error.

My install is in
Code:
/share/QWeb/cops
I did a git clone because the QNap's zip couldn't process the posted release.
My Calibre library is in
Code:
/share/Public/eBooks/Calibre\ Library/
which is also
Code:
/share/MD0_DATA/Public/eBooks/Calibre\ Library/
All files in Calibre Library are world read/writeable.

When I hit http://192.168.1.105:8082/cops/feed.php, I get the common error:
Code:
Check if Calibre database file exists and is readable
File ../../../MD0_DATA/Public/eBooks/Calibre\ Library/metadata.db not found, Please check
Value of $config['calibre_directory'] in config_local.php Value of
open_basedir
in your php.ini The access rights of the Calibre Database Synology users please read
this
Check if Calibre database file can be opened with PHP
If the file is readable, check your php configuration. Exception detail : exception 'PDOException' with message 'safe_mode/open_basedir prohibits opening ../../../MD0_DATA/Public/eBooks/Calibre\ Library/metadata.db' in /share/MD0_DATA/Qweb/cops/checkconfig.php:136 Stack trace: #0 /share/MD0_DATA/Qweb/cops/checkconfig.php(136): PDO->__construct('sqlite:../../.....') #1 {main}
Check if Calibre database file contains at least some of the needed tables
If the file is readable, check your php configuration. Exception detail : exception 'PDOException' with message 'safe_mode/open_basedir prohibits opening ../../../MD0_DATA/Public/eBooks/Calibre\ Library/metadata.db' in /share/MD0_DATA/Qweb/cops/checkconfig.php:149 Stack trace: #0 /share/MD0_DATA/Qweb/cops/checkconfig.php(149): PDO->__construct('sqlite:../../.....') #1 {main}
My config_local.php:
Code:
<?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'] = '../../../MD0_DATA/Public/eBooks/Calibre\ Library/';

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

    /*
     * use URL rewriting for downloading of ebook in HTML catalog
     * See README for more information
     *  1 : enable
     *  0 : disable
     */
    $config['cops_use_url_rewriting'] = "0";
I added the following to the top of the php.ini via QNap's UI (under the [PHP] section):
Code:
open_basedir="/share/Qweb:/share/MD0_DATA/Public/eBooks/Calibre\ Library/"
I've tried all varieties of parameters for the path to the data folder (and updated the php.ini to match), absolute path, relative path, 'normal' path, aliased path... Still always getting that error (updated to reflect whatever paths I plugged in). I'm pretty sure I've got the right syntax for the open_basedir directive as it failed completely before I put the web home in it.

Any ideas what I'm missing?
StickyC is offline   Reply With Quote