Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load external entity components.xsl #255

Closed
jrobens opened this issue Nov 26, 2015 · 15 comments
Closed

Failed to load external entity components.xsl #255

jrobens opened this issue Nov 26, 2015 · 15 comments
Assignees
Labels

Comments

@jrobens
Copy link

jrobens commented Nov 26, 2015

Just a dump of my output... Not that much information from what I can see.

[26.11.2015 - 21:00:28] Collector process completed

[26.11.2015 - 21:00:28] Starting generator
[26.11.2015 - 21:00:28] Loading enrichers
[26.11.2015 - 21:00:28] Enricher Build Information initialized successfully
[26.11.2015 - 21:00:28] Starting event loop.

....I/O warning : failed to load external entity "phar://phpdox.phar/templates/html/components.xsl"
I/O warning : failed to load external entity "phar://phpdox.phar/templates/html/functions.xsl"
I/O warning : failed to load external entity "phar://phpdox.phar/templates/html/synopsis.xsl"

Oups... phpDox encountered a problem and has terminated!

It most likely means you've found a bug, so please file a report for this
and paste the following details and the stacktrace (if given) along:

PHP Version: 5.4.45 (Darwin)
PHPDox Version: 0.8.1.1
ErrorException: E_WARNING
Location: phar:///usr/local/bin/phpdox/vendor/theseer/fxsl/src/fxsltprocessor.php (Line 192)

XSLTProcessor::transformToDoc(): No stylesheet associated to this object
#0 phar:///usr/local/bin/phpdox/vendor/theseer/fxsl/src/fxsltprocessor.php(192): XSLTProcessor->transformToDoc()
#1 phar:///usr/local/bin/phpdox/phpdox/generator/engine/html/Html.php(208): TheSeer\fXSL\fXSLTProcessor->transformToDoc()
#2 unknown(0): TheSeer\phpDox\Generator\Engine\Html->buildClass()
#3 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(203): call_user_func()
#4 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(277): TheSeer\phpDox\Generator\Generator->handleEvent()
#5 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(249): TheSeer\phpDox\Generator\Generator->processClass()
#6 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(142): TheSeer\phpDox\Generator\Generator->processWithNamespace()
#7 phar:///usr/local/bin/phpdox/phpdox/Application.php(241): TheSeer\phpDox\Generator\Generator->run()
#8 phar:///usr/local/bin/phpdox/phpdox/CLI.php(165): TheSeer\phpDox\Application->runGenerator()
#9 /usr/local/bin/phpdox(451): TheSeer\phpDox\CLI->run()

@theseer
Copy link
Owner

theseer commented Dec 15, 2015

This seems to be a MacOS specific problem as I fail to reproduce this problem under Linux.
I saw this on another OSX installation though and need to investigate.

@theseer theseer self-assigned this Dec 15, 2015
@Konafets
Copy link

Konafets commented Feb 4, 2016

I have the same issue with PHAR and GIT version.

@theseer
Copy link
Owner

theseer commented Feb 10, 2016

I still have no idea as to why this happens or how to avoid it from happening.
I'll have to continue to investigate this.

Can any of you, by any chance, verify if the problem is PHP 5.4 specific?

@jrobens
Copy link
Author

jrobens commented Feb 10, 2016

5.5.3

PHP Version: 5.5.30 (Darwin)
PHPDox Version: 0.8.1.1
ErrorException: E_WARNING
Location: phar:///usr/local/bin/phpdox/vendor/theseer/fxsl/src/fxsltprocessor.php (Line 192)

XSLTProcessor::transformToDoc(): No stylesheet associated to this object

#0 phar:///usr/local/bin/phpdox/vendor/theseer/fxsl/src/fxsltprocessor.php(192): XSLTProcessor->transformToDoc()
#1 phar:///usr/local/bin/phpdox/phpdox/generator/engine/html/Html.php(208): TheSeer\fXSL\fXSLTProcessor->transformToDoc()
#2 unknown(0): TheSeer\phpDox\Generator\Engine\Html->buildClass()
#3 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(203): call_user_func()
#4 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(277): TheSeer\phpDox\Generator\Generator->handleEvent()
#5 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(249): TheSeer\phpDox\Generator\Generator->processClass()
#6 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(142): TheSeer\phpDox\Generator\Generator->processWithNamespace()
#7 phar:///usr/local/bin/phpdox/phpdox/Application.php(241): TheSeer\phpDox\Generator\Generator->run()
#8 phar:///usr/local/bin/phpdox/phpdox/CLI.php(165): TheSeer\phpDox\Application->runGenerator()
#9 /usr/local/bin/phpdox(451): TheSeer\phpDox\CLI->run()

@Konafets
Copy link

[10.02.2016 - 19:14:05] Collector process completed

[10.02.2016 - 19:14:05] Starting generator
[10.02.2016 - 19:14:05] Loading enrichers
[10.02.2016 - 19:14:05] Enricher Build Information initialized successfully
[10.02.2016 - 19:14:05] Starting event loop.

....I/O warning : failed to load external entity "phar://phpdox.phar/templates/html/components.xsl"
I/O warning : failed to load external entity "phar://phpdox.phar/templates/html/functions.xsl"
I/O warning : failed to load external entity "phar://phpdox.phar/templates/html/synopsis.xsl"


Oups... phpDox encountered a problem and has terminated!

It most likely means you've found a bug, so please file a report for this
and paste the following details and the stacktrace (if given) along:

PHP Version: 5.6.17 (Darwin)
PHPDox Version: 0.8.1.1
ErrorException: E_WARNING
Location: phar:///usr/local/bin/phpdox/vendor/theseer/fxsl/src/fxsltprocessor.php (Line 192)

XSLTProcessor::transformToDoc(): No stylesheet associated to this object

#0 phar:///usr/local/bin/phpdox/vendor/theseer/fxsl/src/fxsltprocessor.php(192): XSLTProcessor->transformToDoc()
#1 phar:///usr/local/bin/phpdox/phpdox/generator/engine/html/Html.php(208): TheSeer\fXSL\fXSLTProcessor->transformToDoc()
#2 unknown(0): TheSeer\phpDox\Generator\Engine\Html->buildClass()
#3 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(203): call_user_func()
#4 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(277): TheSeer\phpDox\Generator\Generator->handleEvent()
#5 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(249): TheSeer\phpDox\Generator\Generator->processClass()
#6 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(142): TheSeer\phpDox\Generator\Generator->processWithNamespace()
#7 phar:///usr/local/bin/phpdox/phpdox/Application.php(241): TheSeer\phpDox\Generator\Generator->run()
#8 phar:///usr/local/bin/phpdox/phpdox/CLI.php(165): TheSeer\phpDox\Application->runGenerator()
#9 /usr/local/bin/phpdox(451): TheSeer\phpDox\CLI->run()

@jrobens
Copy link
Author

jrobens commented Feb 10, 2016

I did a latest git pull version to see if I could run a debugger and it ran OK.

  1. git pull https://github.com/theseer/phpdox.git
  2. ./phploc.phar --names="*.php" --log-xml phploc.xml src
  3. Edit default phpdox.xml

`

` 1. run phpdox/phpdox

Have no phploc summary, but do have phpdox output.

@jrobens
Copy link
Author

jrobens commented Feb 10, 2016

I extracted the phar - the templates directory is one level up from the source version. I don't know how the templates location is configured though.

@theseer
Copy link
Owner

theseer commented Feb 10, 2016

The bug only manifests itself when phpdox is run from a phar.

The problem seems to be that for a yet to be determined reason the PHP I/O-Subsystem aka the phar stream wrapper does have issues with libxml under MacOS and possibly windows. I'm already considering to add a build step that replaces the includes into a static when creating the phar.

@Solomonic
Copy link

I just encountered the very same issue on Mac OS.
Is there any known workaround?

I/O warning : failed to load external entity "phar://phpdox.phar/templates/html/components.xsl"
I/O warning : failed to load external entity "phar://phpdox.phar/templates/html/functions.xsl"
I/O warning : failed to load external entity "phar://phpdox.phar/templates/html/synopsis.xsl"

Oups... phpDox encountered a problem and has terminated!

It most likely means you've found a bug, so please file a report for this
and paste the following details and the stacktrace (if given) along:

PHP Version: 5.6.17 (Darwin)
PHPDox Version: 0.8.1.1
ErrorException: E_WARNING 
Location: phar:///usr/local/bin/phpdox/vendor/theseer/fxsl/src/fxsltprocessor.php (Line 192)

@fullybaked
Copy link

@Solomonic installing from composer then using vendor/bin/phpdox did work on Mac OSX, when phar was failing. That would be the workaround

@adesai2
Copy link

adesai2 commented Dec 28, 2016

I still have this issue and I am unable to resolve it even after using composer to install PHPDox on MAC. Any further clues?

The above suggested workaround is not working. Is there anything specific that needs to be done while using above workaround?

@adesai2
Copy link

adesai2 commented Jan 3, 2017

Is this resolved? I just faced this issue and above information is not clear on how to address the problem. I am on MAC and what I am reading above is that this only manifests on MAC. Any pointer?

@theseer
Copy link
Owner

theseer commented Jan 3, 2017

I do not own a Mac so I cannot debug this any further or actively try out additional solutions.
As written above, the problem seems to lay in the fact that the XSL templates use includes which seem to fail when they are supposed to be loaded from within a phar on OS X only.

For the time being, the only two workaround are to a) not use the phar version but install phpDox via composer or b) extract the templates and give a custom directory within phpdox.xml that is outside the phar.

@adesai2
Copy link

adesai2 commented Jan 4, 2017

Thanks for your response. I used method b) to solve my problem. It worked !!!

@theseer
Copy link
Owner

theseer commented Mar 21, 2017

I implemented a workaround that resolves the includes manually rather than having libxslt do it.
I presume that will fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants