10-14-2011, 11:43 AM | #136 | |
Member
Posts: 21
Karma: 10
Join Date: Jun 2011
Device: none
|
Finally got this fixed. This error was appearing because I had PHP error reporting set to e_all.
I back it down to just fatal errors, and it went away. I did poke around a bit, and found this on the smarty website: Quote:
|
|
10-14-2011, 12:41 PM | #137 |
Grand Sorcerer
Posts: 11,693
Karma: 6240117
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Glad you worked it out.
|
Advert | |
|
10-14-2011, 12:50 PM | #138 |
Member
Posts: 21
Karma: 10
Join Date: Jun 2011
Device: none
|
Me too, I was seriously pounding my head against a wall.
I'd like to thank you, Charles. I can now use this and tie it into my website/forum. Just have to modify the colors/etc. You're a prince. |
10-14-2011, 01:51 PM | #139 |
Member
Posts: 21
Karma: 10
Join Date: Jun 2011
Device: none
|
OK, stupid questions:
1) How do I change the background color of the main page? 2) Change colors of the font. Obviously, I'm not an HTML guy. |
10-15-2011, 02:35 AM | #140 |
Grand Sorcerer
Posts: 11,693
Karma: 6240117
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
All the presentation (color, layout, fonts, etc) are controlled by the smarty templates (smarty/templates/*.tpl). Change things there. For example, the "<div" on line 15 of header.tpl controls the font and color of the header block. Unfortunately, that does require html knowledge.
I didn't bother setting up a common .css for the templates, something that might have made this job easier. It isn't something I care about. |
Advert | |
|
11-08-2011, 03:39 AM | #141 |
Junior Member
Posts: 2
Karma: 10
Join Date: Nov 2011
Device: none
|
I have an Windows 2003 system, with php 5.3.
All other sites configured (using mysql) working like a charm but i am not able to get the php-calibre operational. I keep getting the following error message (turned e_all on under the php config): Fatal error: Uncaught exception 'Exception' with message 'Unable to open database: unable to open database file' in D:\....\db.php:160 Stack trace: #0 D:\....\db.php(160): SQLite3->__construct('t:\ebooks\Calib...', 1) #1 D:\....\db.php(195): MySQLite->open('t:\ebooks\Calib...') #2 D:\....\index.php(51): CalDatabase->__construct('t:\ebooks\Calib...') #3 {main} thrown in D:\....\db.php on line 160 I have started the sqlite3 executable on the web server. A thing i don't understand why it tries to make an database file at the location where my ebooks are located (network share with write access). Any help to get it running under iiS is appreciated. |
11-08-2011, 04:01 AM | #142 | |
Grand Sorcerer
Posts: 11,693
Karma: 6240117
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
No executable is required, at least on any configuration that I have seen.
Quote:
|
|
11-08-2011, 04:17 AM | #143 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
|
11-19-2011, 11:11 AM | #144 |
Enthusiast
Posts: 48
Karma: 12654
Join Date: Dec 2009
Location: UK
Device: Likebook Ares, Kindle 3G, Nook STR, 511eb
|
No output from index.php
Hi,
Having a slight problem - when I access index.php I'm not getting any output, not even error messages. I wonder if someone can tell me what incredibly simple thing I've done wrong? Ubuntu Server, Apache/2.2.17, PHP Version 5.3.5-1ubuntu7.3, sqlite3, smarty 2.6.26-0.2ubuntu1, GD 2.0 - so I think that's everything I should need! I've restarted Apache. config_local.php is Code:
$config['library_dir'] = '/data/Dropbox/eBooks/Calibre Library'; $config['web_dir'] = '/data/www/calibre'; $config['smarty_web_dir'] = $config['web_dir'] . '/smarty'; $config['smarty_dir'] = '/data/www/calibre/.cache'; $config['smarty'] = '/usr/share/php/smarty/'; Code:
$config['library_dir'] = '/data/Dropbox/eBooks/Calibre\ Library'; Go on - what obvious thing have I overlooked? T Last edited by edent; 11-19-2011 at 11:31 AM. Reason: Added GD & Apache info |
11-19-2011, 12:24 PM | #145 |
Enthusiast
Posts: 48
Karma: 12654
Join Date: Dec 2009
Location: UK
Device: Likebook Ares, Kindle 3G, Nook STR, 511eb
|
I've stuck a try...catch loop on
PHP Code:
Code:
"Unable to open database: unable to open database file" /data/Dropbox/eBooks/Calibre Library I'm utterly stumped. Any help? |
11-19-2011, 12:28 PM | #146 |
Grand Sorcerer
Posts: 11,693
Karma: 6240117
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Check permissions. Normally the web server would not have permission to read Dropbox files.
|
11-19-2011, 04:11 PM | #147 |
Enthusiast
Posts: 48
Karma: 12654
Join Date: Dec 2009
Location: UK
Device: Likebook Ares, Kindle 3G, Nook STR, 511eb
|
D'oh! That did the trick. Thanks!
Is there any way to get the size of a file out of the DB? So I can format it "MOBI 2.5MB" etc? It doesn't seem to work when I change the DB query to PHP Code:
EDIT: the column name is "uncompressed_size" - using that works to get file size. Love the server - is there a more formal way to contribute patches / bugs / change request? Last edited by edent; 11-19-2011 at 04:45 PM. |
11-20-2011, 03:15 AM | #148 | |
Grand Sorcerer
Posts: 11,693
Karma: 6240117
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
This thread is a good place for bug reports and change requests. Patches can also go through here, either by including the entire files (I will do the diffs) or a 'patch'. If the volume gets high enough then I could probably set something up using launchpad & bzr, but it is hard to imagine the need given history. |
|
11-20-2011, 05:39 AM | #149 |
Enthusiast
Posts: 48
Karma: 12654
Join Date: Dec 2009
Location: UK
Device: Likebook Ares, Kindle 3G, Nook STR, 511eb
|
Show the size of the file
The attached patch shows the size of the file next to each filetype.
So, if you're on a limited bandwidth connection, you may choose the epub over the PDF etc. Screenshot shows a demonstration using the free "Hacking The BBC" eBook. |
11-20-2011, 06:02 AM | #150 |
Enthusiast
Posts: 48
Karma: 12654
Join Date: Dec 2009
Location: UK
Device: Likebook Ares, Kindle 3G, Nook STR, 511eb
|
Escape Ampersands
Patches to modules and index.tpl - to ensure that all & are correctly escaped as &
|
Thread Tools | Search this Thread |
|
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 |