PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Tools and Utilities » PhpDocumentor » Bug #9129

XHTML pages being parsed as PHP

Details

Request #9129XHTML pages being parsed as PHP
Submitted2006-10-22 02:09 UTC
Frompear at lehi dot ath dot cx
Assignedashnazg
StatusWont fix
PackagePhpDocumentor
PHP Version5.1.6
OSFC5
Roadmaps(Not assigned)

Comments

[2006-10-22 02:09 UTC] pear at lehi dot ath dot cx

Description:
------------
I just installed PHPDocumentor 1.3.0RC6 by following the INSTALL instructions. Everything seems to function properly, except when I try to view documentation on individual files. I believe the problem is because the pages being generated are xhtml pages and have the <?xml
version="1.0" encoding="iso-8859-1"?> at the beginning of the document. I know this is causing the problem because removing that first line makes the page come up just fine.

Even though the page is just html, apache is interpreting it as php because it is called something like _filename.php.html. I think a possible solution would be to rename the file to something like _filename_php.html so that the web server doesn't get confused what file type it is. I tried renaming the files and they load properly, but of course they aren't linked anymore.

Turning off short_open_tags in php.ini would also fix this problem, but most of my code uses short_open_tags, so it would break more than it would fix if I changed it.

Expected result:
----------------
Pages that don't contain a parse error.

Actual result:
--------------
Documentation for individual pages produce a parse error. These pages have a filename of the following format: _filename.php.html

[2006-10-22 02:12 UTC] pear at lehi dot ath dot cx

Description:
------------
I just installed PHPDocumentor 1.3.0RC6 by following the INSTALL instructions. Everything seems to function properly, except when I try to view documentation on individual files. I believe the problem is because the pages being generated are xhtml pages and have the <?xml version="1.0" encoding="iso-8859-1"?> at the beginning of the document. I know this is causing the problem because removing that first line makes the page come up just fine.

Even though the page is just html, apache is interpreting it as php because it is called something like _filename.php.html. I think a possible solution would be to rename the file to something like _filename_php.html so that the web server doesn't get confused what file type it is. I tried renaming the files and they load properly, but of course they aren't linked anymore.

Turning off short_open_tags in php.ini would also fix this problem, but most of my code uses short_open_tags, so it would break more than it would fix if I changed it.

Expected result:
----------------
Pages that don't contain a parse error.

Actual result:
--------------
Documentation for individual pages produce a parse error. These pages have a filename of the following format: _filename.php.html

[2006-10-22 19:09 UTC] pear at lehi dot ath dot cx

If anyone runs into this problem, you can just add a .htaccess file with the following directive to fix it. The file belongs in the same folder where the documentation is being generated.

php_flag short_open_tag Off

This file will then allow you to keep the rest of your code using the short_open_tag but selectively change it for just the documentation.