![]() |
#166 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Dec 2011
Device: Android
|
Quote:
![]() Thanks! |
|
![]() |
![]() |
![]() |
#167 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
![]() |
![]() |
Advert | |
|
![]() |
#168 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Nov 2011
Device: kindle 2011
|
Thanks for the feedback, I will have a look over the smarty template system this weekend and test if I can find a valid solution
|
![]() |
![]() |
![]() |
#169 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Nov 2011
Device: kindle 2011
|
Quote:
I just had another more deep look at the script .. there was no need for a fix. The Problem rather occured when using lighttpd 1.5 + php-fastcgi ![]() |
|
![]() |
![]() |
![]() |
#170 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Dec 2011
Device: Android
|
404 error when download
Hello,
I have the software installed and work fine. But when I click on a link to download, the server give me a 404 error. The links have this format: http://my.server.com/index.php/book_...ge_Orwell.epub ¿Some of url rewrite? I don't see any .htaccess file Greetings |
![]() |
![]() |
Advert | |
|
![]() |
#171 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
There should be a folder named "George Orwell" (or something like that) in the folder pointed at by config['library_dir']. Is there? That folder should contain the folder "1984 (19)" (or something like that). Does it? Does that folder contain the file "1984 - George Orwell.epub". Does it? Does your web server have read permission on all these folders and files? |
|
![]() |
![]() |
![]() |
#172 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Dec 2011
Device: Android
|
Quote:
2011/12/10 20:11:32 [error] 27913#0: *986 open() "/var/www/books/htdocs/index.php/book_format/3/Linux_Pocket_Guide___Daniel_J__Barrett.pdf" failed (20: Not a directory), client: 192.168.10.6, server: my.server.com, request: "GET /index.php/book_format/3/Linux_Pocket_Guide___Daniel_J__Barrett.pdf HTTP/1.1", host: "my.server.com", referrer: "http://my.server.com/index.php?m=catval&id=PDF&p=1&cat=formats&v=PDF" And yes, the library_dir contains this folder and the file. I think that is the translation. The server looks for /index.php/book_format/19/1984___George_Orwell.epub and think that index.php is a folder. I think that this must be rewrited to something also /index.php?book=book_format/19/1984___George_Orwell.epub to work. But I don't know the rewrite rule. Can you help me?. Tanks. Last edited by ogarcia; 12-10-2011 at 02:13 PM. Reason: Added 404 error description |
|
![]() |
![]() |
![]() |
#173 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Your configuration is clearly different from mine and several others that I know of. Your web server appears to be broken. What versions of what web server and php are you using? Is php a module, or are you using CGI? |
|
![]() |
![]() |
![]() |
#174 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Dec 2011
Device: Android
|
SOLVED!
I'm using php-fastcgi with nginx frontend. The problem is that the part of url book_format/19/1984___George_Orwell.epub must be passed as PATH_INFO to the CGI. I give you my config for other users. ![]() Code:
server {
listen 80; ## listen for ipv4
listen [::]:80; ## listen for ipv6
server_name books.myserver.com;
access_log /var/log/nginx/books.access.log;
error_log /var/log/nginx/books.error.log;
root /var/www/books/htdocs;
location / {
index index.php index.html index.htm;
}
location ~ ^.+\.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include /etc/nginx/fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
This confirms that it work fine with nginx and php-fastcgi. Thanks!!!! |
![]() |
![]() |
![]() |
#175 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 51
Karma: 94224
Join Date: Dec 2009
Location: UK
Device: Likebook Ares, Kindle 3G, Nook STR, 511eb
|
Can you explain how the restrict_display_to section works?
What I want to do is make the user "fred" only be able to see works tagged as fiction. I'm using the line $config['restrict_display_to'] = array('fred'=>'tags:"=fiction"'); But it just returns no titles whatsoever. Am I being a bit thick? Ideally, what I want to do is exclude all books tagged "ignore". Is that possible? |
![]() |
![]() |
![]() |
#176 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
In your case, use Code:
$config['restrict_display_to'] = array('fred'=>'tags:=ignore'); Code:
$config['restrict_display_to'] = array('fred'=>'tags:="ignore"'); |
|
![]() |
![]() |
![]() |
#177 | |
Member
![]() Posts: 12
Karma: 10
Join Date: Jan 2012
Device: samsung galaxy 10.1
|
Quote:
Environment: - Windows2008 R2; IIS 7.5; PHP 5.3.8; Smarty 2.6.26; pdo_sqlite 3.7.7.1 Config_local: $config['web_dir'] = 'c:/inetpub/wwwroot/calibre'; $config['smarty_web_dir'] = $config['web_dir'] . '/smarty'; $config['smarty_dir'] = 'c:/tmp'; $config['smarty'] = 'c:/inetpub/wwwroot/calibre/smarty/libs'; IIS user has RW rights on c:\tmp UPDATE: former Http error 500 is gone... how hard can it be... forgottten to enable the php extension sqlite3.dll in php.ini... ;-) Now, something else is wrong.. my website displays the template in stead of opening it. So it displays: {config_load file=test.conf section="setup"} {include file="header.tpl" title=foo} {* bold and title are read from the config file *} {if #bold#}{/if} {* capitalize the first letters of each word of the title *} Title: {#title#|capitalize} {if #bold#}{/if} The current date and time is {$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"} etc. etc. Do I have to change index.tpl ??? thanks Henny Last edited by hekom; 01-07-2012 at 08:43 AM. |
|
![]() |
![]() |
![]() |
#178 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#179 | |
Member
![]() Posts: 12
Karma: 10
Join Date: Jan 2012
Device: samsung galaxy 10.1
|
Quote:
I have replaced Smarty 2.6.26 into version 3.1.7 and ![]() ![]() So now, your content server is running perfecly on Windows2008 R2; IIS 7.5; PHP 5.3.8; Smarty 3.1.7; pdo_sqlite 3.7.7.1 Thanks for all your work, I'm a happy user now! Henny. |
|
![]() |
![]() |
![]() |
#180 | |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Jan 2012
Device: iPad1
|
Quote:
library_dir contains the author folder and within a folder with the epub file. My vServer runs under PHP 5.3 and cgiwrap. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |