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 02-29-2012, 10:07 AM   #211
CyberMike
Junior Member
CyberMike began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2012
Location: Germany
Device: Sony PRS-T1
Quote:
Originally Posted by chaley View Post
The server is saying that it cannot find or cannot open the database metadata.db in your calibre library. Either the path in $config['library_dir'] is wrong or the web server does not have permissions to read the files in that directory.
I copied the file to my content and Calibre directory. The path information is correct, but I still get the error message. The Meta I'm entitled to 777 CHMOD.

I know not why.

I use Calibre to the latest version


MIKE
CyberMike is offline   Reply With Quote
Old 02-29-2012, 11:16 AM   #212
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,688
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by CyberMike View Post
I copied the file to my content and Calibre directory. The path information is correct, but I still get the error message. The Meta I'm entitled to 777 CHMOD.

I know not why.

I use Calibre to the latest version


MIKE
Watch out for filename Case (I have beednbit sooooo many times, I am not sure there is anything left )
theducks is offline   Reply With Quote
Old 02-29-2012, 11:29 AM   #213
chaley
Grand Sorcerer
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: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by CyberMike View Post
I copied the file to my content and Calibre directory. The path information is correct, but I still get the error message. The Meta I'm entitled to 777 CHMOD.
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.
chaley is offline   Reply With Quote
Old 02-29-2012, 12:55 PM   #214
CyberMike
Junior Member
CyberMike began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2012
Location: Germany
Device: Sony PRS-T1
Sorry

I write you an IM.


Quote:
Ich schreibe dir eine IM, chaley
MIKE

Last edited by CyberMike; 02-29-2012 at 01:23 PM.
CyberMike is offline   Reply With Quote
Old 02-29-2012, 01:01 PM   #215
chaley
Grand Sorcerer
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: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by CyberMike View Post
Ich schreibe dir eine IM, chaley
Désolé, mais je ne parle pas l’allemand.
chaley is offline   Reply With Quote
Old 03-30-2012, 09:35 PM   #216
Azrhei
Member
Azrhei began at the beginning.
 
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.
Azrhei is offline   Reply With Quote
Old 03-30-2012, 09:53 PM   #217
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,688
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Azrhei View Post
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.
777 should take care of it, but you might look at who owns the file and chown to you or your group.

Do the books that were copied have proper looking names, or windows 8.3, short nameslike) thebo~01.epub
theducks is offline   Reply With Quote
Old 03-30-2012, 10:09 PM   #218
Azrhei
Member
Azrhei began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Mar 2012
Device: Kindle
Quote:
Originally Posted by theducks View Post
777 should take care of it, but you might look at who owns the file and chown to you or your group.

Do the books that were copied have proper looking names, or windows 8.3, short nameslike) thebo~01.epub
All files are 777. The file names and paths are long names (Windows) which include spaces.

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)
Azrhei is offline   Reply With Quote
Old 03-31-2012, 02:21 AM   #219
chaley
Grand Sorcerer
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: 11,703
Karma: 6658935
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.
chaley is offline   Reply With Quote
Old 03-31-2012, 09:46 PM   #220
Azrhei
Member
Azrhei began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Mar 2012
Device: Kindle
Quote:
Originally Posted by chaley View Post
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.
File names are correct and unchanged from what Calibre set them, I mis-typed them in the post (I didn't C/P). All files are accessible to the web (I can download them directly if I just type the exact path rather than using the script mock path)

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).
Azrhei is offline   Reply With Quote
Old 04-01-2012, 02:26 AM   #221
Azrhei
Member
Azrhei began at the beginning.
 
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
Azrhei is offline   Reply With Quote
Old 04-01-2012, 03:37 AM   #222
chaley
Grand Sorcerer
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: 11,703
Karma: 6658935
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.
chaley is offline   Reply With Quote
Old 04-01-2012, 01:14 PM   #223
Azrhei
Member
Azrhei began at the beginning.
 
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.
Azrhei is offline   Reply With Quote
Old 04-01-2012, 01:43 PM   #224
chaley
Grand Sorcerer
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: 11,703
Karma: 6658935
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.
chaley is offline   Reply With Quote
Old 05-04-2012, 01:13 AM   #225
micster
Enthusiast
micster began at the beginning.
 
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?
micster 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 08:07 AM.


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