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 05-04-2012, 03:30 AM   #226
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,268
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by micster View Post
This question is for ilovejedd, vlad59 , chaley or anyone else who is interested in templates...

Earlier in this thread it was suggested that it would be possible to create a new template that would make this PHP catalog OPDS 1.1 compatible. I would like to have this. I started thinking about how I would go about it and I got stuck when I realized I would like my catalog to be both browsable threw the web AND searchable with an ereader device using OPDS. Calibre2opds achieves this by generating html for the website and creating xml for the opds catalog.

How could we achieve this using this PHP scipt and the smarty templates?
If I were interested in doing this (which I am not), I wouldn't implement the OPDS version with the templates. There is no reason to do so because the content and format is fixed. Instead I would write PHP "modules" that produce OPDS categories and book lists, integrated with the existing search.

You could avoid doing anything by running COPS (http://www.mobileread.com/forums/sho...d.php?t=170903) along side the standard web server. Of course they would need to be on different ports, or alternatively use a reverse proxy scheme.
chaley is offline   Reply With Quote
Old 05-20-2012, 11:00 AM   #227
sennierer
Junior Member
sennierer began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2012
Device: prs-650
strange php error

First of all, thank you for the server, it is exactly what I was looking for.
I installed it and everything ist working fine, I can log in and it seem that the server is reading my database...it shows me that I have 3 different titles, two languages and so on. But when I click on "3 Titles" I get an html 500 error. My apache log is showing an strange php error: "PHP Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct():..." and so on.

Anyone an idea what I can do about it?
sennierer is offline   Reply With Quote
Old 05-20-2012, 11:56 AM   #228
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,268
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by sennierer View Post
But when I click on "3 Titles" I get an html 500 error. My apache log is showing an strange php error: "PHP Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct():..." and so on.
When you say you are clicking on "3 Titles", are you really clicking on "Titles [3]"? If so, then post the entire error. It is difficult to know what happened without the rest of the exception. If not, then what are you clicking on?

What version of calibre was used to create the database?

Have you changed the format of the published date or the timestamp in calibre? If so, then you should change the configuration variables "pubdate_format" and "timestamp_format" to the same string.
chaley is offline   Reply With Quote
Old 05-20-2012, 01:27 PM   #229
sennierer
Junior Member
sennierer began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2012
Device: prs-650
thank you very much for your fast reply. Yes I really clicked on "Titles [3]". The Database was generated with calibre 0.8.46, afterwards I moved the whole database with ftp to the server.
I didnt change anything in the database.
The whole error:
Quote:
[Sun May 20 16:32:41 2012] [error] PHP Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.' in /home/.../calibre/utilities.php:113\nStack trace:\n#0 /home/.../calibre/utilities.php(113): DateTime->__construct('2012-05-20 12:2...')\n#1 /home/.../calibre/utilities.php(143): MyDate->__construct('2012-05-20 12:2...')\n#2 /home/sennierer/calibre/db.php(672): format_date('2012-05-20 12:2...', 'dd-MMM-yyyy')\n#3 /home/.../calibre/db.php(766): CalDatabase->book(1408, true, false)\n#4 /home/.../calibre/modules/titles.php(31): CalDatabase->all_books(true, false)\n#5 /home/.../calibre/index.php(126): DoTitles->do_work(Object(Smarty), Object in /home/.../calibre/utilities.php on line 113
Thanks a lot!
sennierer is offline   Reply With Quote
Old 05-21-2012, 03:49 AM   #230
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,268
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
@sennierer: Remove E_STRICT from the php.ini setting "error_reporting".
chaley is offline   Reply With Quote
Old 05-21-2012, 07:02 AM   #231
sennierer
Junior Member
sennierer began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2012
Device: prs-650
that didnt change anything. the error.log is reporting the same error and it is still not working...
sennierer is offline   Reply With Quote
Old 05-21-2012, 07:02 AM   #232
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,268
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
Did you restart apache?

The other thing you can do is set the timezone in PHP.
---
[Date]
; Defines the default timezone used by the date functions
date.timezone = 'Europe/London'
---
Of course you should put the timezone string that makes sense for you.

Last edited by chaley; 05-21-2012 at 07:15 AM. Reason: Add timezone comment
chaley is offline   Reply With Quote
Old 05-21-2012, 07:14 AM   #233
sennierer
Junior Member
sennierer began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2012
Device: prs-650
partly solved..

ok, when I switch in the config file to 'use_short_form' I get an overview with short descriptions and so on. When I click on Book Details I get the same error as before, but as I dont need the details that doesnt matter.
I still cant download a book as the server cant find the books.
I am using symlinks on my server, is it possible that this causes a problem with the path to the files?

Many thanks for your help!
sennierer is offline   Reply With Quote
Old 05-21-2012, 07:27 AM   #234
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,268
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by sennierer View Post
ok, when I switch in the config file to 'use_short_form' I get an overview with short descriptions and so on. When I click on Book Details I get the same error as before, but as I dont need the details that doesnt matter.
I still cant download a book as the server cant find the books.
I am using symlinks on my server, is it possible that this causes a problem with the path to the files?

Many thanks for your help!
See my edit of my last post for another fix for the date problem. Also, if you google
php exception "It is not safe to rely"
you will find a lot of comments on this problem.

As for following symlinks, I have never tried it. I am not surprised it doesn't work. You might try adding FILEINFO_SYMLINK to the option on line 61 on book_format.php, but I am not at all sure that this is enough to fix it. Alternatively, you could use the real calibre library instead of a symlinked version of it, which is what the server expects.
chaley is offline   Reply With Quote
Old 05-21-2012, 07:48 AM   #235
sennierer
Junior Member
sennierer began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2012
Device: prs-650
thanks a lot, I already solved the date issue with your last post and I am going to try your symlink suggestion...if its not working I am going to put it in the www directory.
Thank you very much for your help.
sennierer is offline   Reply With Quote
Old 05-21-2012, 07:55 AM   #236
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,268
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by sennierer View Post
I am going to try your symlink suggestion...if its not working I am going to put it in the www directory.
Don't put the library in the www directory. Doing that will open your library to everyone on the internet.

The library_dir config parameter should contain the full path to the directory containing your library, which should not be in web space (visible to your web server). If use_internal_login is true, then password_file should contain a full path to a file built with ht_passwd that also is not in web space.
chaley is offline   Reply With Quote
Old 05-21-2012, 08:05 AM   #237
sennierer
Junior Member
sennierer began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2012
Device: prs-650
moving to the webserver didnt help anything...he is searching for strange urls:

Quote:
/library/calibre/index.php/book_format/1411/Spiegel angep [Sun, 20 May 2012] - calibre.epub was not found on this server.
sennierer is offline   Reply With Quote
Old 05-21-2012, 08:07 AM   #238
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,268
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
My guess is that you are using a CGI solution for PHP instead of an apache module. If you do this, then you must take steps to ensure that the php script in the middle of the URL is executed, passing along the rest of the URL to that script. There are several posts on this thread about how to do that.
chaley is offline   Reply With Quote
Old 05-21-2012, 08:32 AM   #239
sennierer
Junior Member
sennierer began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2012
Device: prs-650
oThat helped, thank you very much. I enabled the mod and now everything is working fine!
sennierer is offline   Reply With Quote
Old 07-26-2012, 05:48 AM   #240
Fooligan
Junior Member
Fooligan began at the beginning.
 
Fooligan's Avatar
 
Posts: 3
Karma: 10
Join Date: Jul 2012
Device: iPhone 4S
Search function

First of all thanks for the great work you did on this. Especially the different user (.htpasswd) function made my life a lot easier.
There's only one thing; I seem to have some problems with the search function in the PHP version. If I conduct a search all is well, if I conduct a second search, without logging out and in again, it only searches within the first search results. Is there a way, like in the original (kovidgoyal) version, to search from scratch?
Fooligan is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre Command Line usage with PHP artoros Related Tools 13 07-01-2010 09:57 AM
Web Content Server mezme Calibre 7 01-08-2010 09:59 PM
Calibre web server on MAC I cant get to work.. any help appreciated. stustaff Calibre 5 01-06-2010 06:05 PM
Calibre - web server problems eclpmb Calibre 9 11-28-2008 02:04 PM


All times are GMT -4. The time now is 04:29 AM.


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