Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#436289: libphp-jpgraph: succeed to install on lenny with php5, but not compatible with php5

15 views
Skip to first unread message

Bastien Durel

unread,
Aug 6, 2007, 4:10:09 PM8/6/07
to
Package: libphp-jpgraph
Version: 1.5.2-11
Severity: important

As stated on jpgraph website, "Note: The 1.x series is only for PHP4. It will not work on PHP5."
On my etch server, libphp-jpgraph requires downgrade to php4, but on my lenny laptop, it installed without complaining.
But it doesn't work.
We need to install jpgraph 2.x with php5, or 1.x with php4.

-- System Information:
Debian Release: lenny/sid
APT prefers testing-proposed-updates
APT policy: (500, 'testing-proposed-updates'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.21-2-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libphp-jpgraph depends on:
ii libapache2-mod-php5 5.2.3-1+b1 server-side, HTML-embedded scripti
ii php5-gd 5.2.3-1+b1 GD module for php5

libphp-jpgraph recommends no packages.

-- no debconf information


--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Moritz Muehlenhoff

unread,
Jan 4, 2009, 4:30:13 PM1/4/09
to
severity 436289 grave
thanks

On Mon, Aug 06, 2007 at 09:58:37PM +0200, Bastien Durel wrote:
> Package: libphp-jpgraph
> Version: 1.5.2-11
> Severity: important
>
> As stated on jpgraph website, "Note: The 1.x series is only for PHP4. It will not work on PHP5."
> On my etch server, libphp-jpgraph requires downgrade to php4, but on my lenny laptop, it installed without complaining.
> But it doesn't work.
> We need to install jpgraph 2.x with php5, or 1.x with php4.

I noticed this bug when checking a potential security issue.

This is release-critical, since Lenny no longer includes php4.

Cheers,
Moritz

Evgeni Golov

unread,
Jan 6, 2009, 3:10:07 AM1/6/09
to
On Mon, Jan 05, 2009 at 07:05:39PM +0100, Bastien Durel wrote:
> Le lundi 05 janvier 2009 à 18:21 +0100, Evgeni Golov a écrit :
> > Hi *,
> >
> > while looking at RC-bugs I stumbled over this one.
> > Yupp, the long descriptions only mentions PHP4. But look at the
> > changelog, the latest entry says:
> > * Added support for php5(-gd), reviewed all example that seems to work
> > (Closes: #424795) affected by php4-removal
> > And indeed, I tested and the examples seem to work fine (some fail with
> > an caching error, but thats something different AFAICT).
> >
> > Bastien, did you actually test jpgraph with PHP5 on Lenny? Upstream can
> > tell much, but we can patch more :)
> Hello,
>
> I did not used it much, but one of my projects require it for cron jobs
> execution. I cannot remember if I actually used debian packaged version,
> or if I downloaded one from upstream.
> Infortunatly, my laptop is now out of order, then I cannot verify this.

Could you by any chance test the current version in Lenny? I'd like to
close this bug, so it would be great if one could have a confirmation
from you (as you submitted it) whether it works, or what has to be done
to see that it does not work :)

Regards
Evgeni

signature.asc

Christian Hammers

unread,
Jan 9, 2009, 7:00:10 PM1/9/09
to
tags 436289 + patch
stop

Hello

I tested all 94 examples and they all worked very well on Lenny *but* the
library installs its own error handler that, before anything else, checks
if there have been any compile time errors and if so displays them regardless
of the current "error_reporting" or "display_errors" settings.

As the library was designed for PHP4 it calls methods statically which are not
declared using the new "static" keyword which leads to warnings like:
General PHP error:
Non-static method JpGraphError::Install() should not be called statically
Those warnings were printed to stdout and the Browser could not identify the output
as PNG or JPG any more which effectively renders the current version of the
library pretty useless on Lenny.

The below patch does neither prevent the display of compile time errors like:
Parse error: syntax error, unexpected ';' in backgroundex01.php on line 2
nor runtime errors like:
Fatal error: Call to undefined function foo() backgroundex01.php on line 2
So I would consider it not to be harmful or to produce much problems on upgrades.

bye,

-christian-

P.S.: A graphic library shouldn't mess around with error handlers anyway,
this alone would justify a bug report.


diff -u libphp-jpgraph-1.5.2/src/jpgraph.php libphp-jpgraph-1.5.2/src/jpgraph.php
--- libphp-jpgraph-1.5.2/src/jpgraph.php
+++ libphp-jpgraph-1.5.2/src/jpgraph.php
@@ -246,7 +246,9 @@
//user
//
if( isset($GLOBALS['php_errormsg']) ) {
- JpGraphError::Raise("<b>General PHP error:</b><br>".$GLOBALS['php_errormsg']);
+ // Disabled by Debian to prevent showing PHP5 warnings
+ // ("Non-static method called statically")
+ // JpGraphError::Raise("<b>General PHP error:</b><br>".$GLOBALS['php_errormsg']);
}

//
diff -u libphp-jpgraph-1.5.2/debian/changelog libphp-jpgraph-1.5.2/debian/changelog
--- libphp-jpgraph-1.5.2/debian/changelog
+++ libphp-jpgraph-1.5.2/debian/changelog
@@ -1,3 +1,14 @@
+libphp-jpgraph (1.5.2-11+u1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Applied patch that prevented PHP5 compile time generated warning
+ "Non-static method called statically" to appear on screen and corrupts
+ the output of graphics. The usual error_reporting and display_errors
+ had no effect as a custom error handler was installed by the library.
+ Closes: #436289
+
+ -- Christian Hammers <c...@debian.org> Sat, 10 Jan 2009 00:10:30 +0100
+
libphp-jpgraph (1.5.2-11) unstable; urgency=low



* Added support for php5(-gd), reviewed all example that seems to
work

--

0 new messages