Debian Bug report logs -
#405338
php5: ini setting 'highlight.bg' being ignored
Reported by: Mathias Brodala <info@noctus.net>
Date: Tue, 2 Jan 2007 18:33:06 UTC
Severity: minor
Tags: confirmed, fixed-upstream, upstream
Found in version php5/5.2.0-8
Fixed in version 5.4.0~rc8-1
Done: Lior Kaplan <kaplanlior@gmail.com>
Bug is archived. No further changes may be made.
Forwarded to http://bugs.php.net/40776
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#405338; Package php5.
(full text, mbox, link).
Acknowledgement sent to Mathias Brodala <info@noctus.net>:
New Bug report received and forwarded. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: php5
Version: 5.2.0-8
Severity: minor
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The ini setting 'highlight.bg' gets ignored and thus highlighted files and
strings always have a white background instead of the color which was set.
- -- System Information:
Debian Release: 4.0
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-k7
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to de_DE.UTF-8)
Versions of packages php5 depends on:
ii libapache2-mod-php5 5.2.0-8 server-side, HTML-embedded scripti
ii php5-common 5.2.0-8 Common files for packages built fr
php5 recommends no packages.
- -- no debconf information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFFmqO2YfUFJ3ewsJgRAoBQAJ9v00IJW3vJ3BB4/E+w5Qm7KQv1NACdFoXQ
k5sJN7ipwYMmT2FHjHq3VIY=
=bu5b
-----END PGP SIGNATURE-----
Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#405338; Package php5.
(full text, mbox, link).
Acknowledgement sent to Mathias Brodala <info@noctus.net>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(full text, mbox, link).
Message #10 received at 405338@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hello Sean.
sean finney, 11.03.2007 12:16:
> sorry for the delay in response... if you're still having this problem
> could you please send a small example script where the problem is made
> clear?
The problem can be reproduced easily. First the section from the php.ini:
> ; Colors for Syntax Highlighting mode. Anything that's acceptable in
> ; <span style="color: ???????"> would work.
> highlight.string = #FFA0A0
> highlight.comment = #87CEEB
> highlight.keyword = #CD5C5C
> highlight.bg = #333333
> highlight.default = #98FB98
> highlight.html = #ffffff
The script:
> <?php
>
> # Comment
> highlight_file($_SERVER['SCRIPT_FILENAME']);
>
> ?>
The result:
<http://download.noctus.net/gallery/caps/php_highlight_wrong_bg.png>
Although the background was set to dark grey it still is being showed as white.
Regards, Mathias
PS: Why did I receive a mail delivery failure for this mail from the Mail
Delivery System?
--
debian/rules
[signature.asc (application/pgp-signature, attachment)]
Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#405338; Package php5.
(full text, mbox, link).
Acknowledgement sent to sean finney <seanius@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(full text, mbox, link).
Message #15 received at 405338@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
hi mathias,
On Sun, 2007-03-11 at 13:40 +0100, Mathias Brodala wrote:
> The problem can be reproduced easily. First the section from the php.ini:
>
> > ; Colors for Syntax Highlighting mode. Anything that's acceptable in
> > ; <span style="color: ???????"> would work.
> > highlight.string = #FFA0A0
> > highlight.comment = #87CEEB
> > highlight.keyword = #CD5C5C
> > highlight.bg = #333333
> > highlight.default = #98FB98
> > highlight.html = #ffffff
>
> The script:
>
> > <?php
> >
> > # Comment
> > highlight_file($_SERVER['SCRIPT_FILENAME']);
> >
> > ?>
thanks for the concise result, and i can confirm the problem, it doesn't
seem the highlight.bg is used at all. it is indeed read from the
php.ini file (phpinfo() confirms this), but it's not used in the actual
code in question. poking around in the source code i don't find any
references to highlight.bg apart from the ini file and some test cases.
i'll forward this upstream and see what they think.
> PS: Why did I receive a mail delivery failure for this mail from the Mail
> Delivery System?
i hear from folks on irc that the bts is having some issues this
afternoon, maybe it's just temporary...
sean
[signature.asc (application/pgp-signature, inline)]
Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#405338; Package php5.
(full text, mbox, link).
Acknowledgement sent to Mathias Brodala <info@noctus.net>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(full text, mbox, link).
Message #20 received at 405338@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hello Sean.
sean finney, 11.03.2007 14:35:
> thanks for the concise result, and i can confirm the problem, it doesn't
> seem the highlight.bg is used at all. it is indeed read from the
> php.ini file (phpinfo() confirms this), but it's not used in the actual
> code in question. poking around in the source code i don't find any
> references to highlight.bg apart from the ini file and some test cases.
> i'll forward this upstream and see what they think.
Thanks. Will there be some upstream bugreport anywhere I can watch?
>> PS: Why did I receive a mail delivery failure for this mail from the Mail
>> Delivery System?
>
> i hear from folks on irc that the bts is having some issues this
> afternoon, maybe it's just temporary...
Ah, I see. I hope this one gets through directly.
Regards, Mathias
--
debian/rules
[signature.asc (application/pgp-signature, attachment)]
Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#405338; Package php5.
(full text, mbox, link).
Acknowledgement sent to sean finney <seanius@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(full text, mbox, link).
Message #25 received at 405338@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
tags 405338 upstream confirmed
forwarded 405338 http://bugs.php.net/40776
thanks
hi,
On Sun, 2007-03-11 at 14:41 +0100, Mathias Brodala wrote:
> Thanks. Will there be some upstream bugreport anywhere I can watch?
i just reported it at the above url.
sean
[signature.asc (application/pgp-signature, inline)]
Tags added: upstream, confirmed
Request was from sean finney <seanius@debian.org>
to control@bugs.debian.org.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#405338; Package php5.
(full text, mbox, link).
Acknowledgement sent to Mathias Brodala <info@noctus.net>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(full text, mbox, link).
Message #34 received at 405338@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi.
I dug through the code and came up with a solution. I’ll attach the patch.
Regards, Mathias
--
debian/rules
[118-highlight_bg.patch (text/x-patch, inline)]
diff -Nur orig/Zend/zend_highlight.h new/Zend/zend_highlight.h
--- orig/Zend/zend_highlight.h 2006-01-05 00:53:04.000000000 +0100
+++ new/Zend/zend_highlight.h 2007-04-06 18:07:40.000000000 +0200
@@ -31,6 +31,7 @@
typedef struct _zend_syntax_highlighter_ini {
+ char *highlight_bg;
char *highlight_html;
char *highlight_comment;
char *highlight_default;
diff -Nur orig/Zend/zend_highlight.c new/Zend/zend_highlight.c
--- orig/Zend/zend_highlight.c 2006-01-05 00:53:04.000000000 +0100
+++ new/Zend/zend_highlight.c 2007-04-06 17:31:29.000000000 +0200
@@ -92,11 +92,12 @@
{
zval token;
int token_type;
- char *last_color = syntax_highlighter_ini->highlight_html;
+ char *last_color = syntax_highlighter_ini->highlight_bg;
char *next_color;
int in_string=0;
- zend_printf("<code>");
+ zend_printf("<body style=\"background-color: %s\"><code>", last_color);
+ last_color = syntax_highlighter_ini->highlight_html;
zend_printf("<span style=\"color: %s\">\n", last_color);
/* highlight stuff coming back from zendlex() */
token.type = 0;
@@ -182,7 +183,7 @@
zend_printf("</span>\n");
}
zend_printf("</span>\n");
- zend_printf("</code>");
+ zend_printf("</code></body>");
}
diff -Nur orig/ext/standard/basic_functions.c new/ext/standard/basic_functions.c
--- orig/ext/standard/basic_functions.c 2006-10-13 03:42:19.000000000 +0200
+++ new/ext/standard/basic_functions.c 2007-04-06 17:39:29.000000000 +0200
@@ -5370,6 +5370,7 @@
ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini)
{
+ syntax_highlighter_ini->highlight_bg = INI_STR("highlight.bg");
syntax_highlighter_ini->highlight_comment = INI_STR("highlight.comment");
syntax_highlighter_ini->highlight_default = INI_STR("highlight.default");
syntax_highlighter_ini->highlight_html = INI_STR("highlight.html");
[signature.asc (application/pgp-signature, attachment)]
Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#405338; Package php5.
(full text, mbox, link).
Acknowledgement sent to sean finney <seanius@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(full text, mbox, link).
Message #39 received at 405338@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
On Fri, 2007-04-06 at 20:02 +0200, Mathias Brodala wrote:
> Hi.
>
> I dug through the code and came up with a solution. I’ll attach the patch.
thanks! i've forwarded it upstream for comment.
sean
[signature.asc (application/pgp-signature, inline)]
Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#405338; Package php5.
(full text, mbox, link).
Acknowledgement sent to sean finney <seanius@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(full text, mbox, link).
Message #44 received at 405338@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
hi mathias,
upstream requested some changes/modifications to the patch. could you
directly comment to their bug entry at:
http://bugs.php.net/bug.php?id=40776
thanks,
sean
On Sat, 2007-04-07 at 01:16 +0200, sean finney wrote:
> On Fri, 2007-04-06 at 20:02 +0200, Mathias Brodala wrote:
> > Hi.
> >
> > I dug through the code and came up with a solution. I’ll attach the patch.
>
> thanks! i've forwarded it upstream for comment.
>
>
> sean
> _______________________________________________
> pkg-php-maint mailing list
> pkg-php-maint@lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-php-maint
[signature.asc (application/pgp-signature, inline)]
Tags added: fixed-upstream
Request was from bts-link-upstream@lists.alioth.debian.org
to control@bugs.debian.org.
(Mon, 20 Jul 2009 20:15:06 GMT) (full text, mbox, link).
Reply sent
to Lior Kaplan <kaplanlior@gmail.com>:
You have taken responsibility.
(Mon, 20 Feb 2012 22:27:07 GMT) (full text, mbox, link).
Notification sent
to Mathias Brodala <info@noctus.net>:
Bug acknowledged by developer.
(Mon, 20 Feb 2012 22:27:07 GMT) (full text, mbox, link).
Message #51 received at 405338-done@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Version: 5.4.0~rc8-1
hi,
highlight.bg was removed sometime in the past (old php.net trunk), and
definitely removed in PHP 5.4.0.
See
http://il.php.net/manual/en/misc.configuration.php#ini.syntax-highlighting
Kaplan
[Message part 2 (text/html, inline)]
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Tue, 03 Apr 2012 07:42:04 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sun Jul 2 00:30:27 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.