Login   Register  
PHP Classes
elePHPant
Icontem

Undefined variable: isFileGetContentsInstalled

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      EPub  >  All threads  >  Undefined variable: isFileGetContentsInstalled  >  (Un) Subscribe thread alerts  
Subject:Undefined variable: isFileGetContentsInstalled
Summary:Undefined variable: isFileGetContentsInstalled
Messages:9
Author:Raqefet A. Yedidia
Date:2013-02-22 23:52:15
Update:2013-02-23 19:01:50
 

  1. Undefined variable: isFileGetContentsInstalled   Reply   Report abuse  
Picture of Raqefet A. Yedidia
Raqefet A. Yedidia
2013-02-22 23:52:15
Hi
After installing v 209, i got the following error:
Undefined variable: isFileGetContentsInstalled in /...../EPub.php on line 117

I thought something was wrong with my files, since I've altered them greatly, but this occurred also with your original files.

The only way to make the script work was to note the line:
error_reporting(E_ALL | E_STRICT);

Any idea why this is happening?


  2. Re: Undefined variable: isFileGetContentsInstalled   Reply   Report abuse  
Picture of Asbjorn Grandt
Asbjorn Grandt
2013-02-23 00:33:24 - In reply to message 1 from Raqefet A. Yedidia
I have a very good idea what happened. I'm fixing it now. 2.10 should be up shortly

  3. Re: Undefined variable: isFileGetContentsInstalled   Reply   Report abuse  
Picture of Asbjorn Grandt
Asbjorn Grandt
2013-02-23 00:41:24 - In reply to message 2 from Asbjorn Grandt
2.10 is up on PHPClasses now. Sorry for that. I don't know why my own testing didn't catch that. It really should have.

Thanks for pointing it out. Enjoy the weekend.

  4. Re: Undefined variable: isFileGetContentsInstalled   Reply   Report abuse  
Picture of Raqefet A. Yedidia
Raqefet A. Yedidia
2013-02-23 13:11:38 - In reply to message 3 from Asbjorn Grandt
Hi,
Thank for rapid response.
Unfortunately, the script now is working, but it is making a mistake and attach the
media-type="application/octet-stream"
to the jpg files in manifest.
This cause a validation arror in idpf epub validator.
http://validator.idpf.org/

Any idea?

Thanks in advance.




  5. Re: Undefined variable: isFileGetContentsInstalled   Reply   Report abuse  
Picture of Asbjorn Grandt
Asbjorn Grandt
2013-02-23 13:24:40 - In reply to message 4 from Raqefet A. Yedidia
I'll look at it.

  6. Re: Undefined variable: isFileGetContentsInstalled   Reply   Report abuse  
Picture of Asbjorn Grandt
Asbjorn Grandt
2013-02-23 15:32:50 - In reply to message 4 from Raqefet A. Yedidia
I just ran some tests and haven't been able to recreate the problem. I'd like some information on what you are doing, a little code example you use that creates the problem.
As you get the mime type as an octet stream, there is a bug, and I'd love to squash that.

  7. Re: Undefined variable: isFileGetContentsInstalled   Reply   Report abuse  
Picture of Asbjorn Grandt
Asbjorn Grandt
2013-02-23 15:34:40 - In reply to message 6 from Asbjorn Grandt
And while I remember it. Can I get you to tell me what these 5 variables contain after EPub have been initialized:
$isCurlInstalled
$isGdInstalled
$isExifInstalled
$isFileGetContentsInstalled
$isFileGetContentsExtInstalled

  8. Re: Undefined variable: isFileGetContentsInstalled   Reply   Report abuse  
Picture of Raqefet A. Yedidia
Raqefet A. Yedidia
2013-02-23 18:45:45 - In reply to message 7 from Asbjorn Grandt
hi

according to output I've created (extend rights notice...):
isCurlInstalled 1
isGdInstalled 1
isExifInstalled
isFileGetContentsInstalled 1
isFileGetContentsExtInstalled 1

i got those error from validator:
ERROR CoverPage.html 18 80 non-standard image resource 'images/Nerves800-567.jpg' of type 'application/octet-stream'
ERROR Chapter001.html 13 164 non-standard image resource 'images/http/www.grandt.com/ePub/ePubAnotherHappilyMarriedCouple.jpg' of type 'application/octet-stream'
ERROR Chapter002.html 12 67 'demo/DemoInlineImage.jpg': referenced resource missing in the package.
ERROR Chapter007.html 13 69 'demo/DemoInlineImage.jpg': referenced resource missing in the package.

i used your original files, only use
$book->setCoverImage("epub/images/Nerves800-567.jpg");
instead of
//$book->setCoverImage("Cover.jpg", file_get_contents("demo/cover-image.jpg"), "image/jpeg");

hope it helps

  9. Re: Undefined variable: isFileGetContentsInstalled   Reply   Report abuse  
Picture of Asbjorn Grandt
Asbjorn Grandt
2013-02-23 19:01:50 - In reply to message 8 from Raqefet A. Yedidia
The missing references are images referenced in the HTML that aren't included in the build, or where there is a filename discrepancy, or the image wasn't found. That is probably one of the things I need to do, remove images that couldn't be located by the script.

I'm at a loss as to why both the Nerves800-567.jpg and PubAnotherHappilyMarriedCouple.jpg are not correctly detected as image/jpeg. They are included in the archive and valid images after import? (It could be a bug loading the files, resulting in invalid images.)


Can I get you to send me that ePub to php@grandt.com ?