02-29-2012, 10:07 AM | #211 | |
Junior Member
Posts: 5
Karma: 10
Join Date: Feb 2012
Location: Germany
Device: Sony PRS-T1
|
Quote:
I know not why. I use Calibre to the latest version MIKE |
|
02-29-2012, 11:16 AM | #212 |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Watch out for filename Case (I have beednbit sooooo many times, I am not sure there is anything left )
|
02-29-2012, 11:29 AM | #213 |
Grand Sorcerer
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Another thing to check is that the web server can go through all the directories on the path to the library. It is common that /home/foo is mode 700. Remember that the web server is almost certainly not running as you, but is instead running as a user with a very limited set of privileges.
|
02-29-2012, 12:55 PM | #214 | |
Junior Member
Posts: 5
Karma: 10
Join Date: Feb 2012
Location: Germany
Device: Sony PRS-T1
|
Sorry
I write you an IM. Quote:
Last edited by CyberMike; 02-29-2012 at 01:23 PM. |
|
02-29-2012, 01:01 PM | #215 |
Grand Sorcerer
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
03-30-2012, 09:35 PM | #216 |
Member
Posts: 11
Karma: 10
Join Date: Mar 2012
Device: Kindle
|
I'm having an issue. When I click on a link to download a book, I get a blank page with only "No input file specified."
I have all files set to 777 permissions WHat I am thinking (but not sure how you or Calibre does this) is that I have all the books in subfolders (ie: Author/Book/Book.mobi) which was configure per Calibre in Windows. I copied the files exactly as they were on my desktop machine and the metadata.db as well. |
03-30-2012, 09:53 PM | #217 | |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Do the books that were copied have proper looking names, or windows 8.3, short nameslike) thebo~01.epub |
|
03-30-2012, 10:09 PM | #218 | |
Member
Posts: 11
Karma: 10
Join Date: Mar 2012
Device: Kindle
|
Quote:
The page showing the message is [noneyobusinich]/calibre/index.php/book_format/1/Some%20Book%20Title.mobi The mobi file is located /calibre/books/Author/Author - Title/Author - Some Book Title.mobi Which is how Calibre set it. Everything else seems to work. (If I chose safe link as I get a file with the same message inside) (I obfuscate because this is on a test server that is private....however there are real mobi books on it) |
|
03-31-2012, 02:21 AM | #219 |
Grand Sorcerer
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
In most of the cases where we have seen something like this before it has been caused by the web server configuration not passing the extra information after index.php.
What web server are you using? Is PHP a module in that web server, or are you using some sort of CGI setup? Does the web server have permissions *all the way* from the root to the book? You mention Windows path names: does the case of the letters match? There can be no end of trouble moving windows libraries to linux, because windows is very happy to use "author" while the folder is named "Author". Linux doesn't like this at all. I also note that the title in the URL does not match the title in the file system. The link is missing the "Author -" in front of "Some Book Title". This is strange, because it indicates that the info in metadata.db does not match the info in the file system. |
03-31-2012, 09:46 PM | #220 | |
Member
Posts: 11
Karma: 10
Join Date: Mar 2012
Device: Kindle
|
Quote:
I'm gonna start going through the code myself and adding the necessary error handling and some debug code to see if I can improve it. I will keep you posted. Oh, It's Linux PHP (module). |
|
04-01-2012, 02:26 AM | #221 |
Member
Posts: 11
Karma: 10
Join Date: Mar 2012
Device: Kindle
|
Ok, so I created a fresh install on a different server (same config)
Site is http://slaveway.org/_ebooks Still on Apache for Linux with PHP module If you want the phpinfo, just goto http://slaveway.org The files are ALL rwx 777 for USER, GROUP, WORLD and I am the own of the files. When the link is created for the file/format it becomes something like: http://slaveway.org/_ebooks/index.ph...20Unknown.epub Which just says "No input file specified." That above files is physically called: "[path to home]/_ebooks/library/Test/Unknown/ChoreSchedule (1)/ChoreSchedule - Unknown.mobi or http://slaveway.org/_ebooks/index.ph...- Unknown.mobi (which does download the file if you go to it) It seems to me (but I could be mistaken) that when the script is trying to resolve the URL : http://slaveway.org/_ebooks/index.ph...20Unknown.epub that it should resolve to: http://slaveway.org/_ebooks/library/...- Unknown.mobi but instead the server is saying it can't find the .../index.php/book_format/..... part. I am curious why you don't use index.php?m=book_format&id=.... etc instead? I changed the code to do that and it did work (except it download the file name index.php, but it was the book) I made changes to db.php line 584 to generate teh url as index.php?m=book_format&fmt=MOBI&id=1 and it downloaded the books as index.php, but it was a mobi book (changed the extension allowed me to recognize it in my ereader) I reverted my changes as I posted this. The url http://slaveway.org/_ebooks/index.ph...&fmt=MOBI&id=1 still works even now. Last edited by Azrhei; 04-01-2012 at 01:39 PM. Reason: fixed site for copy rights |
04-01-2012, 03:37 AM | #222 |
Grand Sorcerer
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
You have PHP configured to use CGI. From your phpinfo: "Server API CGI/FastCGI". Also note that there is no Apache configuration information in your phpinfo output.
Whatever you are using for rewriting and dispatching is not recognizing php files in the middle of the path, which is what I said in my original answer to you. The message "No input file specified" is not generated by my server. FWIW: I think that your library should not be kept in webspace (files visible by the web server). This is an invitation for piracy, because people can go directly to the books. The reason that the title is provided as extended path is to give browsers a file name. Some browsers ignore the name in the content-disposition header. |
04-01-2012, 01:14 PM | #223 |
Member
Posts: 11
Karma: 10
Join Date: Mar 2012
Device: Kindle
|
I went ahead and removed all copyrighted info from the site and updated the previous post accordingly. I put that there as just a test sample, the final version will be in a private site (as was originally stated).
Moving forward...I would like to make this work, and moreover make it work for anybody and everybody. I do know PHP, however I am not familiar with Smarty. It seems from the script that the filename is taken from somewhere other than the extended path. When I checked to make sure, I was correct that the full path was available to DoBookFormat::do_work() even without it being in the URL anywhere. In what configurations would this not also be the case? I'm going to attempt to make it happen with a new tpl and meta refresh. Will let you know how it goes (or just check it out, the links are above) Would it be possible to make a tpl that starts the download using META REFRESH and also gives a link ("The file should download, but if it doesn't, click this link" kind of thing) or just place direct links in the book lists? (perhaps a config option to do one or the other) Last edited by Azrhei; 04-01-2012 at 01:38 PM. |
04-01-2012, 01:43 PM | #224 |
Grand Sorcerer
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The physical path to the book format is found by grabbing info out of the DB using the passed numeric primary key, and concatenating that info with the library path. Direct links should never work, because the library books should not be visible to the web server as files.
You are welcome to do whatever you want with the templates. I can say that your installation is not one that is supported by the server, because it does not support php embedded in the URL and, by extension, $_SERVER['PATH_INFO']. That is what your web server is complaining about when it says ""No input file specified." Sorry, but I am not interested in doing any work to support what appears to be a broken (from my php code's point of view) configuration. |
05-04-2012, 01:13 AM | #225 |
Enthusiast
Posts: 39
Karma: 10
Join Date: May 2012
Device: none
|
OPDS Template?
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? |
|
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 |