From:             william at ash dot id dot au
Operating system: Windows XP SPII
PHP version:      5.2.5
PHP Bug Type:     Scripting Engine problem
Bug description:  > closes PHP script rather than ?>

Description:
------------
I have two scripts that work fine on my website hosted by outside server.
I installed to PHP on home computer for testing future scripts. The two
scripts I do have use a > from a html tag within the PHP script to close
the PHP script. There is no ? before the > so it should not do this. 

for some reason the PHP is terminating with the first > it comes across
instead of needing a ?> - please help.

Modules that I installed with PHP 5.2.5 for Windows running Apache 2.2.8
are:
cvsclient, dio, docblock, event, EXIF, FDF, Fileinfo, GD2, Gettext,
htscanner, pecl_http, id3, IMAP, Java, mailparse, Mimetype, MySQLi, ntuser,
oggvorbis, OpenSSL, Operator, parsekit, PDFlib, phar, PHPDoc, POP3,
Printer, sdo, Shared Memory, SMTP, SOAP, Sockets, Standard PHP, SQLite,
ssh2, Tidy, threads, timezonedb, win32ps, win32schedule, win32service,
win32std, zip and zlib_filter.

This problem occured before making any changes to my php.ini file - I have
tried making changes to it to correct it but nothing I have done has made a
difference.

I haven't done a backtrace yet as I am hoping that this isn't the first
issue and I couldn't locate the bug relating to this and there is a simple
answer - if a backtrace is needed please let me know.

Reproduce code:
---------------
Script that does cause the problem. 
<?php
echo '<p>This is PHP</p>';
echo '<p>This also is PHP</p>;
?>



Expected result:
----------------
This should output "This is PHP" and "This also is PHP" to the screen 


Fix implemented to make it work (below) - which won't help on complicated
scripts so I would appreciate a fix!
<?php
echo '<p>This is PHP</p>
<?php
echo '<p>This also is PHP</p>

Actual result:
--------------
but it outputs 

This is PHP

'; echo '

This also is PHP

'; ?>


the > at the </p> on the first <p>...</p> html tag is closing the PHP
script - it is identical problem on my other script - it's not actually the
first > as there is one in the opening <p> tag - it's the one (>) after a
closing </p> tag so I expect that the / (forward slash) might have
something to do with it too!

-- 
Edit bug report at http://bugs.php.net/?id=44655&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44655&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44655&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44655&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44655&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44655&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44655&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44655&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44655&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44655&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44655&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44655&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44655&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44655&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44655&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44655&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44655&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44655&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44655&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44655&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44655&r=mysqlcfg

Reply via email to