ID:               44655
 User updated by:  william at ash dot id dot au
 Reported By:      william at ash dot id dot au
 Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: Windows XP SPII
 PHP Version:      5.2.5
 New Comment:

Looks like I won't need to do a backtrace - as nothing crashes! It just
interprets information incorrectly - resulting in incorrect output!


Previous Comments:
------------------------------------------------------------------------

[2008-04-07 01:42:02] william at ash dot id dot au

I also have PEAR installed

------------------------------------------------------------------------

[2008-04-07 01:38:23] william at ash dot id dot au

Looks like I left the ' off my original script - I was cutting and
pasting.

In the Reproduce Code: section
echo '<p>This also is PHP</p>; should have a ' between </p> and ;
like
echo '<p>This also is PHP</p>';

------------------------------------------------------------------------

[2008-04-07 00:31:28] william at ash dot id dot au

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 this bug report at http://bugs.php.net/?id=44655&edit=1

Reply via email to