Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

error loading page @ configuration #14

Closed
rudyh opened this issue Sep 28, 2012 · 22 comments
Closed

error loading page @ configuration #14

rudyh opened this issue Sep 28, 2012 · 22 comments

Comments

@rudyh
Copy link

rudyh commented Sep 28, 2012

Hi, I justed 'installed' BicBusStriim on my nas. (it says v 0.9.2 on the bottom of the page)

When I go to http://nas/bbs I get the configuration screen. But I'm not able to save my settings.
It keeps telling me: 'error loading page' after I've filled in the Calibre library path (being /volume1/ebooks) and hitting 'save'. So I didn't change anything else.

My bbs/data dir is set to '777' so it should be writable.

@rvolz
Copy link
Owner

rvolz commented Sep 28, 2012

Hello,
then the other possibility is the database itself: data/data.db
That one should be writeable too.

@rudyh
Copy link
Author

rudyh commented Sep 28, 2012

It is writable for everybody

/volume1/web/bbs> ls -slart
4 -rw-rw-rw- 1 admin users 934 Sep 28 12:33 ChangeLog
4 -rw-rw-rw- 1 admin users 204 Sep 28 12:33 .htaccess
40 -rw-rw-rw- 1 admin users 38064 Sep 28 12:33 index.php
8 -rw-rw-rw- 1 admin users 4217 Sep 28 12:33 README.md
16 -rw-rw-rw- 1 admin users 12447 Sep 28 12:33 NOTICE
4 -rw-rw-rw- 1 admin users 1208 Sep 28 12:33 LICENSE
4 drwxrwxrwx 2 admin users 4096 Sep 28 12:33 data
4 drwxrwxrwx 2 admin users 4096 Sep 28 12:34 templates
4 drwxrwxrwx 3 admin users 4096 Sep 28 12:34 js
4 drwxrwxrwx 3 admin users 4096 Sep 28 12:34 lib
4 drwxrwxrwx 3 admin users 4096 Sep 28 12:34 style
4 drwxrwxrwx 5 admin users 4096 Sep 28 12:34 vendor

/volume1/web/bbs> ls -slart data
8 -rw-rw-rw- 1 admin users 8192 Sep 28 12:33 data.db

@rvolz
Copy link
Owner

rvolz commented Sep 28, 2012

Hm, previous strange installation problems reported by users (on Synology NAS) disappeared right after rebooting. Could you please try that? What kind of NAS are you using?

@rudyh
Copy link
Author

rudyh commented Sep 28, 2012

I'm using also a Synology Nas...
I shall reboot it now and report back.

@BWortelboer
Copy link

On my Synology, I had to add the calibre database (/volume1/ebooks)
(if not in the web dir) to the PHP open_basedir

(config -> webservices -> PHP settings)

@rvolz
Copy link
Owner

rvolz commented Sep 28, 2012

True, I should add that to the Github wiki.

@rudyh
Copy link
Author

rudyh commented Sep 28, 2012

Unfortunately I get the same error message.
See: http://imageshack.us/f/812/bbsq.png/

Even after adding /volume1/ebooks and /volume1/web to open_basedir and reboot of NAS

@rudyh
Copy link
Author

rudyh commented Sep 28, 2012

I've created an extra dir in /volume1/web/ebooks and now it is saving.
But it is not the location I want. Any further ideas?

the open_basedir is now set to:
/etc.defaults:/usr/bin/php:/usr/syno/synoman:/etc:/var/run:/tmp:/var/spool/php:/volume1/@tmp/php:/var/services/web:/var/services/photo:/var/services/blog:/var/services/homes;/volume1/ebooks;/volume1/web

@rvolz
Copy link
Owner

rvolz commented Sep 28, 2012

That should be colons ':' in open_basedir --- not semicolons ';'

Change that and try /volume1/ebooks again

@rudyh
Copy link
Author

rudyh commented Sep 28, 2012

That's it! It works now like a charm. Even without having to reboot the NAS (the last time I changed the open_basedir).

Thanks a bunch!

@rvolz
Copy link
Owner

rvolz commented Sep 28, 2012

Ok, thx for the reminder to add open_basedir to the documentation.

@rvolz rvolz closed this as completed Sep 28, 2012
jampot5000 pushed a commit to jampot5000/BicBucStriim that referenced this issue Jul 17, 2014
"error loading page" if searching for strings with ' in it:
exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1 near "brian": syntax error' in C:\Apache24\htdocs\bbs122\lib\BicBucStriim\calibre.php:292
Stack trace:
#0 ..\lib\BicBucStriim\calibre.php(292): PDO->query('select count(*)...')
#1 ..\lib\BicBucStriim\calibre.php(275): Calibre->count('select count(*)...')
#2 ..\lib\BicBucStriim\calibre.php(556): Calibre->findSliceFiltered('Book', 0, 30, Object(CalibreFilter), 'o'brian')
rvolz#3 ..\index.php(911): Calibre->titlesSlice('de', 0, 30, Object(CalibreFilter), 'o'brian')
rvolz#4 [internal function]: globalSearch()
rvolz#5 ..\vendor\slim\slim\Slim\Route.php(436): call_user_func_array('globalSearch', Array)
rvolz#6 ..\vendor\slim\slim\Slim\Slim.php(1307): Slim\Route->dispatch()
rvolz#7 ..\vendor\slim\slim\Slim\Middleware\Flash.php(85): Slim\Slim->call()
rvolz#8 ..\vendor\slim\slim\Slim\Middleware\MethodOverride.php(92): Slim\Middleware\Flash->call()
rvolz#9 ..\lib\BicBucStriim\calibre_config_middleware.php(50): Slim\Middleware\MethodOverride->call()
rvolz#10 ..\lib\BicBucStriim\login_middleware.php(33): CalibreConfigMiddleware->call()
rvolz#11 ..\lib\BicBucStriim\own_config_middleware.php(33): LoginMiddleware->call()
rvolz#12 ..\lib\BicBucStriim\caching_middleware.php(41): OwnConfigMiddleware->call()
rvolz#13 ..\vendor\slim\slim\Slim\Middleware\PrettyExceptions.php(67): CachingMiddleware->call()
rvolz#14 ..\vendor\slim\slim\Slim\Slim.php(1254): Slim\Middleware\PrettyExceptions->call()
rvolz#15 ..\index.php(196): Slim\Slim->run()
rvolz#16 {main}
@t0000
Copy link

t0000 commented Oct 21, 2015

how can help me?
I have BicBucStriim installed from packages http://packages.synocommunity.com on my ds213j.
on installcheck.php is all green.
on /bbs/admin/configuration/ say by save "Änderungen gespeichert"
when i klick on start button
then "Error loading page"

I have nas restartet.
PHP open_basedir :
/etc.defaults:/etc:/usr/syno/synoman:/tmp:/var/services/tmp:/var/services/web:/var/services/homes:/volume1/books

Diskstation> ll
drwxr-xr-x 10 root root 4096 Oct 21 19:37 .
drwxr-xr-x 23 root root 4096 Oct 21 19:36 ..
drwxr-xr-x 2 root root 4096 Oct 19 20:27 @s2s
drwxrwxrwx 3 root root 4096 Oct 21 18:22 @appstore
drwxr-xr-x 4 admin users 4096 Oct 19 20:27 @database
drwxrwxrwx 4 root root 4096 Oct 21 18:13 @eadir
drwxrwxrwt 4 root root 4096 Oct 21 19:38 @tmp
-rw------- 1 root root 7168 Oct 21 19:35 aquota.group
-rw------- 1 root root 8192 Oct 21 19:35 aquota.user
d--------- 4 root root 4096 Oct 20 17:52 books
drwx------ 2 root root 16384 Oct 19 20:27 lost+found
-rw------- 1 root root 5120 Oct 19 20:36 synoquota.db
d--------- 5 root root 4096 Oct 21 18:22 web

Diskstation> ll
d--------- 5 root root 4096 Oct 21 18:22 .
drwxr-xr-x 10 root root 4096 Oct 21 19:37 ..
drwxrwxrwx 3 root root 4096 Oct 21 19:37 @eadir
drwxr-xr-x 11 http root 4096 May 27 18:19 bbs
-rwxrwxrwx 1 root root 1538 Oct 19 20:30 index.html
drwxr-xr-x 2 root root 4096 Oct 19 20:30 web_images

Diskstation> ll
drwxr-xr-x 11 http root 4096 May 27 18:19 .
d--------- 5 root root 4096 Oct 21 18:22 ..
-rw-r--r-- 1 http root 120 May 27 18:19 .gitignore
-rw-r--r-- 1 http root 543 May 27 18:19 .htaccess
-rw-r--r-- 1 http root 4176 May 27 18:19 ChangeLog
-rw-r--r-- 1 http root 246 May 27 18:19 Gemfile
-rw-r--r-- 1 http root 1399 May 27 18:19 Gemfile.lock
-rw-r--r-- 1 http root 122 May 27 18:19 Guardfile
-rw-r--r-- 1 http root 1214 May 27 18:19 LICENSE
-rw-r--r-- 1 http root 12855 May 27 18:19 NOTICE
-rw-r--r-- 1 http root 6351 May 27 18:19 README.md
-rwxr-xr-x 1 http root 5395 May 27 18:19 Rakefile.rb
-rw-r--r-- 1 http root 45606 May 27 18:19 bbs-icon.png
-rw-r--r-- 1 http root 212 May 27 18:19 composer.json
-rw-r--r-- 1 http root 11761 May 27 18:19 composer.lock
drwxrwxrwx 4 http root 4096 Oct 21 19:38 data
-rw-r--r-- 1 http root 2238 May 27 18:19 favicon.ico
drwxr-xr-x 8 http root 4096 May 27 18:19 features
drwxr-xr-x 2 http root 4096 May 27 18:19 img
-rw-r--r-- 1 http root 62722 May 27 18:19 index.php
-rw-r--r-- 1 http root 3468 May 27 18:19 installcheck.php
drwxr-xr-x 3 http root 4096 May 27 18:19 js
drwxr-xr-x 3 http root 4096 May 27 18:19 lib
-rw-r--r-- 1 http root 43704 May 27 18:19 messages.yml
drwxr-xr-x 4 http root 4096 May 27 18:19 style
drwxr-xr-x 2 http root 4096 May 27 18:19 templates
drwxr-xr-x 5 http root 4096 May 27 18:19 tests
drwxr-xr-x 8 http root 4096 May 27 18:19 vendor

Diskstation> ll
drwxrwxrwx 4 http root 4096 Oct 21 19:38 .
drwxr-xr-x 11 http root 4096 May 27 18:19 ..
drwxrwxrwx 2 http http 4096 Oct 21 18:49 authors
-rwxrwxrwx 1 http root 18432 Oct 21 19:38 data.db
-rwxrwxrwx 1 http root 9 May 27 18:19 index.php
-rwxrwxrwx 1 http root 1633 May 27 18:19 schema.sql
drwxrwxrwx 2 http http 4096 Oct 21 18:49 titles

here pics :
http://www0.xup.in/exec/ximg.php?fid=21120202
http://www0.xup.in/exec/ximg.php?fid=11096168

big thx for help

@rvolz
Copy link
Owner

rvolz commented Oct 22, 2015

The easiest way is to diagnose the problem is to look into the error log of your web server. If this isn't enabled on your NAS then you could enable error logging in BicBucStriim. Change index.php (from line 38)

# Init app and routes
$app = new \Slim\Slim(array(
    'view' => new \Slim\Views\Twig(),
    'mode' => 'production',
    #'mode' => 'debug',
    #'mode' => 'development',
));

to

    #'mode' => 'production',
    'mode' => 'debug',

Then the data directory will contain log files with error information.

@t0000
Copy link

t0000 commented Oct 22, 2015

this is now the error:

Details

Type: PDOException
Code: HY000
Message: SQLSTATE[HY000]: General error: 1 no such table: books
File: /volume1/web/bbs/lib/BicBucStriim/calibre.php
Line: 79
Trace

#0 /volume1/web/bbs/lib/BicBucStriim/calibre.php(79): PDO->query('select * from b...', 8, 'Book')
#1 /volume1/web/bbs/lib/BicBucStriim/calibre.php(341): Calibre->find('Book', 'select * from b...')
#2 /volume1/web/bbs/index.php(903): Calibre->last30Books('de', 30, Object(CalibreFilter))
#3 [internal function]: main()
#4 /volume1/web/bbs/vendor/slim/slim/Slim/Route.php(462): call_user_func_array('main', Array)
#5 /volume1/web/bbs/vendor/slim/slim/Slim/Slim.php(1326): Slim\Route->dispatch()
#6 /volume1/web/bbs/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call()
#7 /volume1/web/bbs/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
#8 /volume1/web/bbs/lib/BicBucStriim/calibre_config_middleware.php(50): Slim\Middleware\MethodOverride->call()
#9 /volume1/web/bbs/lib/BicBucStriim/login_middleware.php(33): CalibreConfigMiddleware->call()
#10 /volume1/web/bbs/lib/BicBucStriim/own_config_middleware.php(33): LoginMiddleware->call()
#11 /volume1/web/bbs/lib/BicBucStriim/caching_middleware.php(41): OwnConfigMiddleware->call()
#12 /volume1/web/bbs/vendor/slim/slim/Slim/Middleware/PrettyExceptions.php(67): CachingMiddleware->call()
#13 /volume1/web/bbs/vendor/slim/slim/Slim/Slim.php(1271): Slim\Middleware\PrettyExceptions->call()
#14 /volume1/web/bbs/index.php(200): Slim\Slim->run()
#15 {main}

@rvolz
Copy link
Owner

rvolz commented Oct 22, 2015

That error means that something is wrong with your Calibre db, which ist stored in file metadata.db in the Calibre library directory. Can you open this library with Calibre?
If you are not familiar with Calibre's data, check this http://textmulch.de/blog/2012/calibres-daten

@t0000
Copy link

t0000 commented Oct 22, 2015

i have only the BicBucStriim in my packetcentre intstalled. I need to install another package additionally ? how can opeing the metadata.db?

@rvolz
Copy link
Owner

rvolz commented Oct 22, 2015

No additional package. I was talking about your Calibre library, that you installed in /volume1/books, right?

@t0000
Copy link

t0000 commented Oct 22, 2015

yes is right.
Diskstation> ll /volume1/books/
drwxrwxrwx 2 root root 4096 Oct 20 17:50 #recycle
d--------- 4 root root 4096 Oct 20 17:52 .
drwxr-xr-x 10 root root 4096 Oct 21 20:06 ..
drwxrwxrwx 3 root root 4096 Oct 21 20:06 @eadir
-rwxrwx--- 1 admin users 0 Oct 20 17:52 metadata.db
Diskstation>

@rvolz
Copy link
Owner

rvolz commented Oct 22, 2015

Not right. metadata.db is empty (0), and where are the books? It seems you haven't copied your library. BicBucStriim can't work without a valid library.

You have to create a Calibre library first, add your books, and copy it to that directory.

@t0000
Copy link

t0000 commented Oct 22, 2015

i have i pub uploadet over the webbrower in Filestation. and now is metadata.db still 0

drwxrwxrwx 2 root root 4096 Oct 20 17:50 #recycle
d--------- 4 root root 4096 Oct 22 18:42 .
drwxr-xr-x 10 root root 4096 Oct 22 18:46 ..
drwxrwxrwx 3 root root 4096 Oct 22 18:46 @eadir
-rwxrwx--- 1 admin users 750832 Sep 12 15:59 Robinson, Maggie - Ein Skandal in Schottland.epub
-rwxrwx--- 1 admin users 0 Oct 20 17:52 metadata.db

Do I need to do something else?
will be created the metadata.db automatically?
i have metadata.db created with touch metadata.db

@rvolz
Copy link
Owner

rvolz commented Oct 22, 2015

You need a library created with (Calibre)[http://calibre-ebook.com/]. Calbre will create a metadata.db fo you. Maybe this helps:

BicBucStriim ist eine Web-Anwendung, die eine digitale Büchersammlung im Calibre-Format publiziert und für mobile Geräte bequem zugänglich macht. Calibre, die weit verbreitete Software für die Verwaltung von elektronischen Bibliotheken (für Linux, Windows und OSX verfügbar), wird mit den meisten gängigen Buchformaten fertig. Als PC-Anwendung besitzt es auch einen eingebauten HTTP-Server, der funktioniert aber eben nur, solange der PC eingeschaltet ist und Calibre läuft. BicBucStriim wurde dagegen dafür konzipiert, auf eher schwach ausgestatteten NAS-Laufwerken zu laufen und die dort gespeicherte Calibre-Bibliothek per Web-Schnittstelle verfügbar zu machen. Der PC kann also ausgeschaltet bleiben, man kommt aber trotzdem jederzeit an seine Bücher heran.

@t0000
Copy link

t0000 commented Oct 22, 2015

i have my nas new installed, and all data deletet. after install have the packed BicBucStriim installed from packages http://packages.synocommunity.com.
Do I need to install something else?

edit:
when cp from /volume1/@appstore/bicbucstriim/share/bbs/tests/fixtures/lib2/metadata.db to
/volume1/books/metadata.db working alle perfect.

big thx for help

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

No branches or pull requests

4 participants