#21497 [Bgs]: include() of XML document fails

2003-03-25 Thread jtate
 ID:   21497
 Updated by:   [EMAIL PROTECTED]
 Reported By:  polone at townnews dot com
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: RedHat Linux 6.2
 PHP Version:  4.3.0
 New Comment:

This will not be fixed by any current member of the PHP development
group.  If you desire a fix, submit a patch (though some have already
tried and haven't been sucessfull in getting the patches accepted),
otherwise, remove all your short tags.  There are a number of problems
with using short tags, and therefore reasons that you shouldn't use
them in your code.  The most prominent is that using short tags makes
your code essentially non-portable.  This from the current php.ini:

; Allow the ? tag.  Otherwise, only ?php and script tags are
recognized.  
; NOTE: Using short tags should be avoided when developing applications
or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable
code,
; be sure not to use short tags.



Previous Comments:


[2003-03-24 20:29:47] mike at sydel dot net

I am also experiencing this problem.  Indeed, polone is right that
disabling short tags shouldn't be the solution.  I say this because a
lot of people are already using ?=$var? to simply echo variables.  If
they for one case also encountered the same problem as we have, then he
has to rewrite the code where ?= is located.

Besides, short tags is a feature that helps a lot.



[2003-01-07 14:17:17] polone at townnews dot com

That does fix the problem, but enabling short open tags shouldn't
invalidate properly formatted processing instructions for something
other than PHP.

In addition, this cannot be altered or disabled by ini_set() from a PHP
script (perhaps a security risk?) at run-time.



[2003-01-07 13:17:31] [EMAIL PROTECTED]

Disable short_open_tags in your php.ini and the problem will go away.



[2003-01-07 13:15:12] polone at townnews dot com

When using the include(), include_once(), require(), or require_once()
functions, documents beginning with:

?xml version=1.0?

fail to be loaded. I'm guessing this might have to do with PHP trying
to interpret the ?xml as ?php, causing a fatal error. Proper
operation should check for the processing instruction (PI) value of ?,
that is:

? or ?php

maybe interpreted as PHP, but not,

?some_other_text

at the very least, not:

?xml




-- 
Edit this bug report at http://bugs.php.net/?id=21497edit=1



#21497 [Bgs]: include() of XML document fails

2003-03-25 Thread jay
 ID:   21497
 Updated by:   [EMAIL PROTECTED]
 Reported By:  polone at townnews dot com
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: RedHat Linux 6.2
 PHP Version:  4.3.0
 New Comment:

There's no such thing as ?php=, just ?=. You'll have to 
use ?php echo or something.  
 
J 


Previous Comments:


[2003-03-25 11:08:23] mike at sydel dot net

oh i forgot!

this however still does not solve the problem of ?xml...

many php hosting providers enable short tags.

anyway, guess that's their problem.  other than that, i just have to
look for workarounds since ini_set doesn't appear to work.



[2003-03-25 11:05:54] mike at sydel dot net

argument seems valid.  guess, i just have to make one big search and
replace on all my code and replace
?=
with
?php=

:-)

Thanks.



[2003-03-25 09:16:43] [EMAIL PROTECTED]

This will not be fixed by any current member of the PHP development
group.  If you desire a fix, submit a patch (though some have already
tried and haven't been sucessfull in getting the patches accepted),
otherwise, remove all your short tags.  There are a number of problems
with using short tags, and therefore reasons that you shouldn't use
them in your code.  The most prominent is that using short tags makes
your code essentially non-portable.  This from the current php.ini:

; Allow the ? tag.  Otherwise, only ?php and script tags are
recognized.  
; NOTE: Using short tags should be avoided when developing applications
or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable
code,
; be sure not to use short tags.




[2003-03-24 20:29:47] mike at sydel dot net

I am also experiencing this problem.  Indeed, polone is right that
disabling short tags shouldn't be the solution.  I say this because a
lot of people are already using ?=$var? to simply echo variables.  If
they for one case also encountered the same problem as we have, then he
has to rewrite the code where ?= is located.

Besides, short tags is a feature that helps a lot.



[2003-01-07 14:17:17] polone at townnews dot com

That does fix the problem, but enabling short open tags shouldn't
invalidate properly formatted processing instructions for something
other than PHP.

In addition, this cannot be altered or disabled by ini_set() from a PHP
script (perhaps a security risk?) at run-time.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21497

-- 
Edit this bug report at http://bugs.php.net/?id=21497edit=1



#21497 [Bgs]: include() of XML document fails

2003-01-07 Thread polone
 ID:   21497
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: RedHat Linux 6.2
 PHP Version:  4.3.0
 New Comment:

That does fix the problem, but enabling short open tags shouldn't
invalidate properly formatted processing instructions for something
other than PHP.

In addition, this cannot be altered or disabled by ini_set() from a PHP
script (perhaps a security risk?) at run-time.


Previous Comments:


[2003-01-07 13:17:31] [EMAIL PROTECTED]

Disable short_open_tags in your php.ini and the problem will go away.



[2003-01-07 13:15:12] [EMAIL PROTECTED]

When using the include(), include_once(), require(), or require_once()
functions, documents beginning with:

?xml version=1.0?

fail to be loaded. I'm guessing this might have to do with PHP trying
to interpret the ?xml as ?php, causing a fatal error. Proper
operation should check for the processing instruction (PI) value of ?,
that is:

? or ?php

maybe interpreted as PHP, but not,

?some_other_text

at the very least, not:

?xml




-- 
Edit this bug report at http://bugs.php.net/?id=21497edit=1