Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a1

Request #9129 XHTML pages being parsed as PHP
Submitted: 2006-10-22 02:09 UTC
From: pear at lehi dot ath dot cx Assigned: ashnazg
Status: Wont fix Package: PhpDocumentor (version 1.3.0)
PHP Version: 5.1.6 OS: FC5
Roadmaps: (Not assigned)    
Subscription  


 [2006-10-22 02:09 UTC] pear at lehi dot ath dot cx (James)
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

Comments

 [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 05:24 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [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.
 [2007-09-14 14:58 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-09-14 15:21 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2008-03-01 19:55 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2012-09-01 00:47 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!