Bug #72556 [NEW]: php using .xml file as source tries to execute header
| From: | jim dot michaels at Jesusnjim dot com | Date: | Wed, 06 Jul 2016 19:11:29 +0000 |
| Subject: | Bug #72556 [NEW]: php using .xml file as source tries to execute header | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-202105@lists.php.net to get a copy of this message | ||
From: jim dot michaels at Jesusnjim dot com
Operating system:
PHP version: 7.0Git-2016-07-06 (snap)
Package: Scripting Engine problem
Bug Type: Bug
Bug description:php using .xml file as source tries to execute header
Description:
------------
1. 7.1Git-2016-07-06 isn't even on your site - no dir for it.
2. php using .xml file as source tries to execute XML header because of
<? and ?> but xml header says <?xml version='1.0' encoding='UTF-8'?>
don't blast me because they are not separate bugs please. you know what
happens if too many are put in on the same day.
Test script:
---------------
<?xml version='1.0' encoding='UTF-8'?>
Expected result:
----------------
<?xml should be differentiated from <?php. in fact, it might be a lex
priority issue where <? is lexed before <?php but XML and XHTML are not
detected properly due to same problem. what is the header for XHTML
1.1/1.0? what about XHTML5? XHTML5.1? 5.2? see whatwg.org
php should completely ignore the xml file since there is no PHP in it.
or so I had thought. and it's not just a simple .xml file extension
detection, it's an ENBF change, yes?
Actual result:
--------------
Wed 07/06/2016 11:49:00.42|C:\w\Jesusnjim|>php menu7a.xml
Parse error: syntax error, unexpected 'version' (T_STRING) in
C:\w\Jesusnjim\menu7a.xml on line 1
--
Edit bug report at https://bugs.php.net/bug.php?id=72556&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72556&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72556&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72556&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72556&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72556&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72556&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72556&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72556&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72556&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72556&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72556&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72556&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72556&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72556&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72556&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72556&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72556&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72556&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72556&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72556&r=mysqlcfg