php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1121 Show_source produces odd looking output after upgrading to 3.0.6
Submitted: 1999-02-05 05:51 UTC Modified: 1999-09-30 14:31 UTC
From: Manuel dot Hossfeld at db dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.6 and above OS: Win32
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Manuel dot Hossfeld at db dot com
New email:
PHP Version: OS:

 

 [1999-02-05 05:51 UTC] Manuel dot Hossfeld at db dot com
Problem:
After upgrading to 3.0.6, SHOW_SOURCE no longer works correctly.
Obviously it doesn't do correct syntax highlighting, and some lines are concatenated although they shouldn't.

Environment:
WinNT 4.0 SP3, Apache 1.3.4/Win32 (also tested with Apache 1.3.3 and MS PWS 4.0); PHP3.INI and everything else is quite standard.
(Second test made, see below)

Example:
For the following lines
<?php 
require ( "global.inc"); 
phpinfo(); 
page_footer(); 
?>
...Show_Source produces... 

"wrong" output (with PHP 3.0.6):

<FONT color=#000000>require<FONT color="#007700">(</FONT>global.inc<FONT color="#007700">)</FONT><FONT color="#007700">;</FONT>phpinfo<FONT color="#007700">(</FONT><FONT color="#007700">)</FONT><FONT color="#007700">;</FONT>page_footer<FONT color="#007700">(</FONT><FONT color="#007700">)</FONT><FONT color="#007700">;</FONT></FONT>

correct output (with PHP 3.0.5):


<FONT color=#000000><FONT color="#0000BB">
&lt;?php
<br>require&nbsp;<FONT color="#007700">(</FONT><FONT color="#DD0000">
<STRONG>"global.inc"</STRONG></FONT><FONT color="#007700">)</FONT><FONT color="#007700">;</FONT>
<br>phpinfo<FONT color="#007700">(</FONT><FONT color="#007700">)</FONT><FONT color="#007700">;</FONT>
<br>page_footer<FONT color="#007700">(</FONT><FONT color="#007700">)</FONT><FONT color="#007700">;</FONT>
<br>?&gt;
<br></FONT></FONT>

---
Additional Note:
I checked this again on a different machine, with NT4 Server (the test mentioned above was with NT4 Workstation - of course that shouldn't matter at all). Show_source still produces the same strange effects as described above: Show_source() on PHP/Win32 3.0.6 _definitely_ doesn't work as it should! With 3.0.5 there's no problem, and also with CAMP (an Apache/CygWin port with PHP 3.0.6 compiled as a module) it works correctly...

(Note about Show_source not in manual deleted - was to silly to  hit the "search button" <g>)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-30 14:10 UTC] Manuel dot Hossfeld at db dot com
Problem:
From 3.0.6 on, SHOW_SOURCE no longer works correctly.
Obviously it doesn't do correct syntax highlighting, and some lines are concatenated
although they shouldn't. (i.e. it does not insert linebreaks where it should)

(Remark: Please read the additional notes at the end)

Environment:
WinNT 4.0 SP3, Apache 1.3.4/Win32 (also tested with Apache 1.3.3 and MS PWS 4.0); PHP3.INI
and everything else is quite standard.

Example:
For the following lines
<?php 
require ( "global.inc"); 
phpinfo(); 
page_footer(); 
?>

...Show_Source produces... 

"wrong" output (with PHP 3.0.6):

<FONT color=#000000>require<FONT
color="#007700">(</FONT>global.inc<FONT color="#007700">)</FONT><FONT
color="#007700">;</FONT>phpinfo<FONT color="#007700">(</FONT><FONT
color="#007700">)</FONT><FONT
color="#007700">;</FONT>page_footer<FONT color="#007700">(</FONT><FONT
color="#007700">)</FONT><FONT color="#007700">;</FONT></FONT>

correct output (with PHP 3.0.5):

<FONT color=#000000><FONT color="#0000BB">
&lt;?php
<br>require&nbsp;<FONT color="#007700">(</FONT><FONT
color="#DD0000">
<STRONG>"global.inc"</STRONG></FONT><FONT
color="#007700">)</FONT><FONT color="#007700">;</FONT>
<br>phpinfo<FONT color="#007700">(</FONT><FONT
color="#007700">)</FONT><FONT color="#007700">;</FONT>
<br>page_footer<FONT color="#007700">(</FONT><FONT
color="#007700">)</FONT><FONT color="#007700">;</FONT>
<br>?&gt;
<br></FONT></FONT>

---
Additional Note:
I checked this again on a different machine, with NT4 Server (the test mentioned above was
with NT4 Workstation - of course that shouldn't matter at all). Show_source still produces
the same strange effects as described above: Show_source() on PHP/Win32 3.0.6 _definitely_
doesn't work as it should! With 3.0.5 there's no problem, and also with CAMP (an
Apache/CygWin port with PHP 3.0.6 compiled as a module) it works correctly...

---
Yet more notes:
1. Please don't write to Manuel.Hossfeld@db.com, but to Manuel@Hossfeld.de instead!
2. This is definitely a bug only present in the Win32 Versions. Other Users experienced it too.
Show_Source was and is always working fine on Unix/Linux, but not on Win32.
 [1999-09-30 14:31 UTC] eschmid at cvs dot php dot net
From the changes.php3:

A syntax highlighter has been built into PHP 3.0, which means PHP 3.0 can
display your code, syntax highlighted, instead of executing it.  Right
now, it's only easy to do this by telling apache to execute a certain
extension (e.g., .php) and syntax highilghting another extension (e.g.,
.phps).  At a future version, we'll probably add display_source(filename)
which works like include(), only it displays the syntax highlighted
source instead of executing the included code.  At this time, this is
only available in the Apache version, and not in the CGI version.

-Egon
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Jun 30 18:00:02 2026 UTC